fix the error of arabic charset

This commit is contained in:
VincentWei
2018-08-27 19:13:56 +08:00
parent 808718bdb4
commit 4f515a0359
3 changed files with 15 additions and 19 deletions

View File

@@ -7432,8 +7432,10 @@ struct _BITMAP
/** The bits of the bitmap */
Uint8* bmBits;
/** The private pixel format */
/*void* bmAlphaPixelFormat;*/
/* Obsolte.
The private pixel format
void* bmAlphaPixelFormat; */
/** The Alpha Mask array of the bitmap */
Uint8* bmAlphaMask;

View File

@@ -855,8 +855,8 @@ static CHARSETOPS CharsetOps_iso8859_6 = {
sb_len_first_substr,
iso8859_6_get_next_word,
sb_pos_first_char,
iso8859_6_bidi_mirror_glyph,
iso8859_6_bidi_glyph_type,
iso8859_6_bidi_mirror_glyph,
#ifdef _MGCHARSET_UNICODE
iso8859_6_conv_to_uc32,
iso8859_6_conv_from_uc32

View File

@@ -378,15 +378,12 @@ static void prepare_bitmap (PDC pdc, int w, int h)
char_bmp.bmBits = char_bits;
if (size <= char_bits_size) {
goto done;
return;
}
char_bits_size = ((size + 31) >> 5) << 5;
char_bits = realloc(char_bmp.bmBits, char_bits_size);
char_bmp.bmBits = char_bits;
done:
memset (char_bmp.bmBits, 0, char_bits_size);
}
static Uint32 allocated_size = 0;
@@ -1181,7 +1178,6 @@ static void do_subpixel_line(RGB* dist_buf, RGB* pre_line,
dist_buf[0].b = sub_val;
dist_buf[0].a = 255;
}
else
{
@@ -1821,12 +1817,10 @@ static BOOL get_subpixel_bmp (PDC pdc, Glyph32 glyph_value, SIZE* bbx_size,
unsigned short scale;
int data_pitch = 0;
const BYTE* data = NULL;
int font_height;
bold = 0;
logfont = pdc->pLogFont;
devfont = SELECT_DEVFONT (logfont, glyph_value);
font_height = (devfont->font_ops->get_font_height) (logfont, devfont);
#ifdef _MGFONT_FT2
if (ft2IsFreeTypeDevfont (devfont) &&
@@ -2926,7 +2920,7 @@ static void _dc_ft2subpixel_scan_line(PDC pdc, int xpos, int ypos,
_glyph_move_to_pixel (pdc, x+xpos, ypos);
pixel = _mem_get_pixel(pdc->cur_dst, GAL_BytesPerPixel (pdc->surface));
GAL_GetRGB (pixel, pdc->surface->format, &rgba_cur.r,
GAL_GetRGB (pixel, pdc->surface->format, &rgba_cur.r,
&rgba_cur.g, &rgba_cur.b);
#define C_ALPHA(p, Cs, Cd) \
@@ -2936,19 +2930,19 @@ static void _dc_ft2subpixel_scan_line(PDC pdc, int xpos, int ypos,
Cd = sub_val >> 8; \
}
C_ALPHA(bits, rgba_fg.r, rgba_cur.r);
C_ALPHA(bits, rgba_fg.g, rgba_cur.g);
C_ALPHA(bits, rgba_fg.b, rgba_cur.b);
C_ALPHA(bits, rgba_fg.r, rgba_cur.r);
C_ALPHA(bits, rgba_fg.g, rgba_cur.g);
C_ALPHA(bits, rgba_fg.b, rgba_cur.b);
#undef C_ALPHA
pdc->cur_pixel = GAL_MapRGB (pdc->surface->format, rgba_cur.r,
pdc->cur_pixel = GAL_MapRGB (pdc->surface->format, rgba_cur.r,
rgba_cur.g, rgba_cur.b);
if (pdc->cur_pixel != pixel) {
_glyph_draw_pixel (pdc,
x+xpos, ypos, pdc->cur_pixel);
}
if (pdc->cur_pixel != pixel) {
_glyph_draw_pixel (pdc,
x+xpos, ypos, pdc->cur_pixel);
}
}
nodraw_ret: