From c4502ee7c592713fba9d7a3c65391ce63b834f4f Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 11 Oct 2010 07:24:46 +0000 Subject: [PATCH] fix inlined fonts again. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@53258 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_calc.c | 14 ++++++++++---- src/lib/edje_text.c | 8 +++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/lib/edje_calc.c b/src/lib/edje_calc.c index 8a113b8..2eed526 100644 --- a/src/lib/edje_calc.c +++ b/src/lib/edje_calc.c @@ -845,15 +845,21 @@ _edje_part_recalc_single_text(FLOAT_T sc, if (fnt) { - int len = strlen(fnt->entry) + sizeof("edje/fonts/") + 1; - font = alloca(len); - sprintf((char *)font, "edje/fonts/%s", fnt->entry); + char *font2; + + int len = strlen(font) + sizeof("edje/fonts/") + 1; + font2 = alloca(len); + sprintf(font2, "edje/fonts/%s", font); + font = font2; inlined_font = 1; } } if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); - if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path); + if (inlined_font) + { + evas_object_text_font_source_set(ep->object, ed->path); + } else evas_object_text_font_source_set(ep->object, NULL); if ((_edje_fontset_append) && (font)) diff --git a/src/lib/edje_text.c b/src/lib/edje_text.c index a37ad10..b60c219 100644 --- a/src/lib/edje_text.c +++ b/src/lib/edje_text.c @@ -342,9 +342,11 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep, if (fnt) { - int len = strlen(fnt->entry) + sizeof("edje/fonts/") + 1; - font = alloca(len); - sprintf((char *)font, "edje/fonts/%s", fnt->entry); + char *font2; + + int len = strlen(font) + sizeof("edje/fonts/") + 1; + font2 = alloca(len); + font = font2; inlined_font = 1; } } -- 2.7.4