mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 17:23:09 +03:00
Enable autohinter. Greatly improves glyph quality in framebuffer port. Also get FreeType to render at same time as loading.
svn path=/trunk/netsurf/; revision=6572
This commit is contained in:
parent
c1235f1e9e
commit
0619131f20
@ -266,14 +266,12 @@ static bool fb_32bpp_text(int x, int y, const struct css_style *style,
|
|||||||
nxtchr = utf8_next(text, length, nxtchr);
|
nxtchr = utf8_next(text, length, nxtchr);
|
||||||
glyph_index = FT_Get_Char_Index(face, ucs4);
|
glyph_index = FT_Get_Char_Index(face, ucs4);
|
||||||
|
|
||||||
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
|
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_RENDER |
|
||||||
|
FT_LOAD_MONOCHROME |
|
||||||
|
FT_LOAD_FORCE_AUTOHINT);
|
||||||
if (error)
|
if (error)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
error = FT_Render_Glyph(face->glyph, FT_RENDER_MODE_MONO );
|
|
||||||
if (error)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* now, draw to our target surface */
|
/* now, draw to our target surface */
|
||||||
fb_32bpp_draw_ft_bitmap( &face->glyph->bitmap,
|
fb_32bpp_draw_ft_bitmap( &face->glyph->bitmap,
|
||||||
x + face->glyph->bitmap_left,
|
x + face->glyph->bitmap_left,
|
||||||
|
Loading…
Reference in New Issue
Block a user