From a45ee0b3f4166a7c62422fd7543dcdf3928ecac2 Mon Sep 17 00:00:00 2001 From: VincentWei Date: Thu, 31 May 2018 23:16:15 +0800 Subject: [PATCH] disable xMax+=2 for SUBPIXEL --- src/font/freetype2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/font/freetype2.c b/src/font/freetype2.c index bd060ad0..c53e101f 100644 --- a/src/font/freetype2.c +++ b/src/font/freetype2.c @@ -400,9 +400,11 @@ get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont, FT_Glyph_Get_CBox (ft_inst_info->glyph, ft_glyph_bbox_pixels, &bbox); +#if 0 //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)) bbox.xMax += 2; +#endif /* We just save the BBOX :). */ memcpy (&ft_inst_info->bbox, &bbox, sizeof(FT_BBox));