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:
Øyvind Kolås
2007-10-11 12:18:01 +00:00
parent 52065e88bc
commit 914c930cee
4 changed files with 77 additions and 31 deletions

View File

@ -118,7 +118,11 @@ tc_get (tc_area *area, int width, int height)
cogl_texture_bind (CGL_TEXTURE_2D, match->name);
cogl_texture_set_filters (CGL_TEXTURE_2D, CGL_NEAREST, CGL_NEAREST);
/* We might even want to use mipmapping instead of CGL_LINEAR here
* that should allow rerendering of glyphs to look nice even at scales
* far below 50%.
*/
cogl_texture_set_filters (CGL_TEXTURE_2D, CGL_LINEAR, CGL_NEAREST);
cogl_texture_image_2d (CGL_TEXTURE_2D,
CGL_ALPHA,