Evas textblock: Fixed rendering issues with small fonts.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 18 Jun 2012 15:43:49 +0000 (15:43 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 18 Jun 2012 15:43:49 +0000 (15:43 +0000)
GRIDFIT when we HINT, get the UNSCALED sizes otherwise.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@72409 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_main.c

index 0208b8b..5d6cf5b 100644 (file)
@@ -404,7 +404,9 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
 
      {
         FT_BBox outbox;
-        FT_Glyph_Get_CBox(fg->glyph, FT_GLYPH_BBOX_UNSCALED,
+        FT_Glyph_Get_CBox(fg->glyph,
+              ((fi->hinting == 0) ? FT_GLYPH_BBOX_UNSCALED :
+               FT_GLYPH_BBOX_GRIDFIT),
               &outbox);
         fg->width = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMax - outbox.xMin);
         fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMin);