diff --git a/src/font/freetype2.c b/src/font/freetype2.c index 2d048181..587e2fd4 100644 --- a/src/font/freetype2.c +++ b/src/font/freetype2.c @@ -377,7 +377,6 @@ get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont, } DP(("\nBBOX Non - Hit! %d, %d\n", bbox_nohit++, uni_char)); } - #endif if (load_or_search_glyph (ft_inst_info, &face, uni_char, @@ -409,8 +408,9 @@ get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont, #if 1 //Note: using subpixel filter, the bbox_w is 2 pixel wider than normal. - if (IS_SUBPIXEL(logfont) && (ft_inst_info->ft_lcdfilter != FT_LCD_FILTER_NONE)) + if (IS_SUBPIXEL(logfont) && (ft_inst_info->ft_lcdfilter != FT_LCD_FILTER_NONE)) { bbox.xMax += 2; + } #endif /* We just save the BBOX :). */ diff --git a/src/include/devfont.h b/src/include/devfont.h index 74cbb8a7..fcdd19a4 100644 --- a/src/include/devfont.h +++ b/src/include/devfont.h @@ -185,8 +185,6 @@ struct _CHARSETOPS #define DEVFONTGLYPHTYPE_MASK_BMPTYPE 0x0F -#define DEVFONTGLYPHTYPE_OUTLINE 0x10 - /** The font operation structure. */ struct _FONTOPS { diff --git a/src/newgdi/glyph.c b/src/newgdi/glyph.c index dda50a32..ff272114 100644 --- a/src/newgdi/glyph.c +++ b/src/newgdi/glyph.c @@ -4657,6 +4657,9 @@ int _gdi_draw_one_glyph (PDC pdc, Glyph32 glyph_value, BOOL direction, fg_gal_rc.x--; fg_gal_rc.y--; fg_gal_rc.w += 2; fg_gal_rc.h += 2; } + else if (glyph_bmptype == DEVFONTGLYPHTYPE_SUBPIXEL) { + fg_gal_rc.w += 2; + } #endif if (need_rc_back) { @@ -4680,8 +4683,10 @@ int _gdi_draw_one_glyph (PDC pdc, Glyph32 glyph_value, BOOL direction, bg_gal_rc.x--; bg_gal_rc.y--; bg_gal_rc.w += 2; bg_gal_rc.h += 2; } + else if (glyph_bmptype == DEVFONTGLYPHTYPE_SUBPIXEL) { + bg_gal_rc.w += 2; + } #endif - make_back_rect(&rc_back, area, &bg_gal_rc, flag); }