Improve the quality of text when the scale it is shown at screen is
smaller than the original, seems to work well down to about a scale of 50%. * clutter/pango/pangoclutter-fontmap.c: (pango_clutter_font_map_default_substitute): turn off hinting. * clutter/pango/pangoclutter-render.c: request linear filtering instead of nearest neighbour when scaling down. * tests/test-text.c: replaced test with a a test that renders a sample grid with various pixel sizes and scales for visual inspection of text rendering quality.
This commit is contained in:
@ -196,6 +196,13 @@ pango_clutter_font_map_default_substitute (PangoFcFontMap *fcfontmap,
|
||||
if (FcPatternGet (pattern, FC_DPI, 0, &v) == FcResultNoMatch)
|
||||
FcPatternAddDouble (pattern, FC_DPI, fontmap->dpi_y);
|
||||
#endif
|
||||
|
||||
/* Turn off hinting, since we most of the time are not using the glyphs
|
||||
* from our cache at their nativly rendered resolution
|
||||
*/
|
||||
FcPatternDel (pattern, FC_HINTING);
|
||||
FcPatternAddBool (pattern, FC_HINTING, FALSE);
|
||||
|
||||
FcDefaultSubstitute (pattern);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user