summaryrefslogtreecommitdiff
path: root/legacy/edje/src/lib/edje_text.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2007-04-04 13:25:55 +0000
committerCarsten Haitzler <raster@rasterman.com>2007-04-04 13:25:55 +0000
commita9daf7dd891fe76ba020ef8c4d5aa0af4d7a5231 (patch)
tree4323692a6f965bf559f4e771d852acb5b8b7909e /legacy/edje/src/lib/edje_text.c
parente0b17ee4ee2f5a7ef27d750904a23309da9dd2db (diff)
cedric's patches.
SVN revision: 29353
Diffstat (limited to 'legacy/edje/src/lib/edje_text.c')
-rw-r--r--legacy/edje/src/lib/edje_text.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/legacy/edje/src/lib/edje_text.c b/legacy/edje/src/lib/edje_text.c
index 7c639be..64eb706 100644
--- a/legacy/edje/src/lib/edje_text.c
+++ b/legacy/edje/src/lib/edje_text.c
@@ -281,7 +281,6 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
281 int size; 281 int size;
282 Evas_Coord tw, th; 282 Evas_Coord tw, th;
283 Evas_Coord sw, sh; 283 Evas_Coord sw, sh;
284 char font_buf[4096];
285 int inlined_font = 0, free_text = 0; 284 int inlined_font = 0, free_text = 0;
286 285
287 286
@@ -309,24 +308,14 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
309 if (!font) font = ""; 308 if (!font) font = "";
310 309
311 /* check if the font is embedded in the .eet */ 310 /* check if the font is embedded in the .eet */
312 /* FIXME: we should cache this result */ 311 if (ed->file->font_hash)
313 if (ed->file->font_dir)
314 { 312 {
315 Evas_List *l; 313 Edje_Font_Directory_Entry *fnt = evas_hash_find (ed->file->font_hash, font);
316 314
317 for (l = ed->file->font_dir->entries; l; l = l->next) 315 if (fnt)
318 { 316 {
319 Edje_Font_Directory_Entry *fnt = l->data; 317 font = fnt->path;
320 318 inlined_font = 1;
321 if ((fnt->entry) && (!strcmp(fnt->entry, font)))
322 {
323 strcpy(font_buf, "fonts/");
324 strncpy(font_buf + 6, font, sizeof(font_buf) - 7);
325 font_buf[sizeof(font_buf) - 1] = 0;
326 font = font_buf;
327 inlined_font = 1;
328 break;
329 }
330 } 319 }
331 } 320 }
332 321