summaryrefslogtreecommitdiff
path: root/legacy/edje/src/lib/edje_text.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-03-20 16:49:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-03-20 16:49:10 +0000
commit6938a5eb5fb0dc6d7c9444b104911e082bafa966 (patch)
treeeef736d411c0036b47e150ddbb79de80504663b0 /legacy/edje/src/lib/edje_text.c
parent792762f2d5132f700e39ed43f31c05136fb8887a (diff)
suport fontset appends
SVN revision: 13808
Diffstat (limited to 'legacy/edje/src/lib/edje_text.c')
-rw-r--r--legacy/edje/src/lib/edje_text.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/legacy/edje/src/lib/edje_text.c b/legacy/edje/src/lib/edje_text.c
index ba8f4f4..9f428b1 100644
--- a/legacy/edje/src/lib/edje_text.c
+++ b/legacy/edje/src/lib/edje_text.c
@@ -502,7 +502,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
502 Edje_Part_Description *chosen_desc) 502 Edje_Part_Description *chosen_desc)
503{ 503{
504 char *text; 504 char *text;
505 char *font; 505 char *font, *font2 = NULL;
506 int size; 506 int size;
507 Evas_Coord tw, th; 507 Evas_Coord tw, th;
508 Evas_Coord ox, oy, sw, sh; 508 Evas_Coord ox, oy, sw, sh;
@@ -529,7 +529,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
529 if (ep->text.text) text = ep->text.text; 529 if (ep->text.text) text = ep->text.text;
530 if (ep->text.font) font = ep->text.font; 530 if (ep->text.font) font = ep->text.font;
531 if (ep->text.size > 0) size = ep->text.size; 531 if (ep->text.size > 0) size = ep->text.size;
532 532
533 /* check if the font is embedded in the .eet */ 533 /* check if the font is embedded in the .eet */
534 /* FIXME: we should cache this result */ 534 /* FIXME: we should cache this result */
535 if (ed->file->font_dir) 535 if (ed->file->font_dir)
@@ -551,6 +551,20 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
551 } 551 }
552 } 552 }
553 } 553 }
554
555 if ((_edje_fontset_append) && (font))
556 {
557 char *font2;
558
559 font2 = malloc(strlen(font) + 1 + strlen(_edje_fontset_append) + 1);
560 if (font2)
561 {
562 strcpy(font2, font);
563 strcat(font2, ",");
564 strcat(font2, _edje_fontset_append);
565 font = font2;
566 }
567 }
554 568
555 ox = _edje_text_styles[ep->part->effect].offset.x; 569 ox = _edje_text_styles[ep->part->effect].offset.x;
556 oy = _edje_text_styles[ep->part->effect].offset.y; 570 oy = _edje_text_styles[ep->part->effect].offset.y;
@@ -726,4 +740,6 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
726 740
727 if (free_text) 741 if (free_text)
728 free(text); 742 free(text);
743 if (font2)
744 free(font2);
729} 745}