Evas font-draw: Use bitmap offset in the glyph when drawing.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 29 May 2012 14:43:10 +0000 (14:43 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 29 May 2012 14:43:10 +0000 (14:43 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@71505 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/engines/common/evas_font_main.c

index 63dcdfa..c599296 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * Fixed to clean up when map actually changed. Now rendering updates will be
      correct after evas_map acutally disabled for the smart object.
 
+2012-05-29  Tom Hacohen (TAsn)
+
+       * Font: Fixed run-time italic.
 
index db413af..1bbf5c3 100644 (file)
@@ -390,10 +390,13 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
         if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
         return NULL;
      }
-   fg->width = EVAS_FONT_ROUND_26_6_TO_INT(
-       fi->src->ft.face->glyph->metrics.width);
-   fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(
-       fi->src->ft.face->glyph->metrics.horiBearingX);
+
+     {
+        FT_BBox outbox;
+        FT_Outline_Get_CBox(&fi->src->ft.face->glyph->outline, &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);
+     }
 
    fg->index = idx;
    fg->fi = fi;