mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-23 08:33:55 +08:00
fix the bug of wrong bbox handling for SUBPIXEL rendering of glyph
This commit is contained in:
@@ -47,6 +47,7 @@ Please report any bugs and incompatibilities in
|
||||
This bug may generate dirty dots for monobitmap glyph from TTF.
|
||||
1. Skip null pixels for SUBPIXEL glyphs. This bug will always show background
|
||||
pixels of one SUBPIXEL glyph.
|
||||
1. Fix the bug of wrong bounding box handling for SUBPIXEL rendering of glyph.
|
||||
|
||||
* TUNNING:
|
||||
1. Tune GLYPHINFO structure and GetGlyphInfo to return BIDI glyph type.
|
||||
|
||||
@@ -397,11 +397,11 @@ get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont,
|
||||
|
||||
FT_Glyph_Get_CBox (ft_inst_info->glyph, ft_glyph_bbox_pixels, &bbox);
|
||||
|
||||
#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))
|
||||
bbox.xMax += 2;
|
||||
#endif
|
||||
if (IS_SUBPIXEL(logfont) && (ft_inst_info->ft_lcdfilter != FT_LCD_FILTER_NONE)) {
|
||||
bbox.xMin -= 1;
|
||||
bbox.xMax += 1;
|
||||
}
|
||||
|
||||
/* We just save the BBOX :). */
|
||||
memcpy (&ft_inst_info->bbox, &bbox, sizeof(FT_BBox));
|
||||
|
||||
Reference in New Issue
Block a user