From 71a68acbe80d24d30615dc102a8044def5cf8f40 Mon Sep 17 00:00:00 2001 From: tasn Date: Tue, 29 May 2012 14:43:10 +0000 Subject: [PATCH] Evas font-draw: Use bitmap offset in the glyph when drawing. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@71505 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 3 +++ src/lib/engines/common/evas_font_main.c | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63dcdfa..c599296 100644 --- a/ChangeLog +++ b/ChangeLog @@ -766,4 +766,7 @@ * 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. diff --git a/src/lib/engines/common/evas_font_main.c b/src/lib/engines/common/evas_font_main.c index db413af..1bbf5c3 100644 --- a/src/lib/engines/common/evas_font_main.c +++ b/src/lib/engines/common/evas_font_main.c @@ -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; -- 2.7.4