diff --git a/include/gdi.h b/include/gdi.h index 1af1b22d..fad775e5 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -5505,8 +5505,9 @@ MG_EXPORT int GUIAPI SubtractRect (RECT* rc, const RECT* psrc1, const RECT* psrc #define FS_FLIP_HORZVERT 0x00003000 /* HORZ | VERT */ #define FONT_OTHER_NIL '\0' +#define FONT_OTHER_NONE 'n' #define FONT_OTHER_AUTOSCALE 's' -#define FONT_OTHER_TTFNOCACHE 'n' +#define FONT_OTHER_TTFNOCACHE 'c' #define FONT_OTHER_TTFKERN 'k' #define FONT_OTHER_TTFNOCACHEKERN 'r' #define FONT_OTHER_LCDPORTRAIT 'p' diff --git a/src/font/fontcache.c b/src/font/fontcache.c index 2ecd3728..631bf6d8 100644 --- a/src/font/fontcache.c +++ b/src/font/fontcache.c @@ -618,6 +618,8 @@ __mg_ttc_is_exist(char *family, char *charset, && (style & FS_RENDER_MASK) == p->cache.render_style) { return (HCACHE) p; } + + p = p->nextCache; } #endif diff --git a/src/font/freetype2.c b/src/font/freetype2.c index 818a6825..2d048181 100644 --- a/src/font/freetype2.c +++ b/src/font/freetype2.c @@ -461,6 +461,7 @@ get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont, return (int)(bbox.xMax - bbox.xMin); } +#if 0 // VincentWei: Bad implementation /* press double-byte align to byte align.*/ static void press_bitmap (void* buffer, int width, int rows, int pitch) @@ -482,7 +483,7 @@ press_bitmap (void* buffer, int width, int rows, int pitch) dest_pos += dest_pitch; } } - +#endif /* call this function to get the bitmap/pixmap of the char */ static const void* @@ -557,11 +558,15 @@ char_bitmap_pixmap (LOGFONT* logfont, DEVFONT* devfont, if (pitch) *pitch = source->pitch; +#if 0 // VincentWei: Bad implementation if (!is_grey) { press_bitmap(source->buffer, source->width, source->rows, source->pitch); *pitch = (source->width + 7) >> 3; } +#else + *pitch = source->pitch; +#endif #ifdef _MGFONT_TTF_CACHE if (ft_inst_info->cache && (ft_inst_info->rotation == 0)) { diff --git a/src/newgdi/glyph.c b/src/newgdi/glyph.c index 55aff0fb..09088b16 100644 --- a/src/newgdi/glyph.c +++ b/src/newgdi/glyph.c @@ -167,7 +167,7 @@ int GUIAPI DrawGlyph (HDC hdc, int x, int y, Glyph32 glyph_value, advance = 0; } else { - int my_adv_x, my_adv_y; + int my_adv_x, my_adv_y; /* convert to the start point on baseline. */ _gdi_get_baseline_point (pdc, &x, &y); @@ -2961,8 +2961,8 @@ nodraw_ret: #define GET_RGBA(Cs, x, y) \ { \ - unsigned char dR,dG,dB,dA; \ - gal_pixel tmppixel; \ + unsigned char dR,dG,dB,dA; \ + gal_pixel tmppixel; \ MOVETOPIXEL(x, y); \ DISEMBLE_RGBA (pdc->cur_dst, \ pdc->surface->format->BytesPerPixel,\ @@ -3732,7 +3732,7 @@ static BOOL _gdi_get_glyph_data (PDC pdc, Glyph32 glyph_value, if (scale > 1 && ctxt->cb != _dc_regular_scan_line) { data = _gdi_expand_scale_bits (data, bbox, pitch, bold, scale); - /* note: pitch is modify. */ + /* note: pitch is modified. */ pitch = (bbox->cx + 7) / 8; } else if (bold) {