diff options
author | SubodhKumar <s7158.kumar@samsung.com> | 2018-04-16 11:23:21 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2018-04-16 11:23:23 -0700 |
commit | b650325b88235be6de2c3490b6a338dac03498c8 (patch) | |
tree | bba7dfdc6c9c0aa5a939298874540eeb45fea056 | |
parent | 4ea4a20455db7465e53afc7002d2704a29e412a4 (diff) | |
download | efl-b650325b88235be6de2c3490b6a338dac03498c8.tar.gz |
edje: Dont append font source if fonts are not embedded in edje
Summary:
If font source is not embedded in edje, it should not
be appended in font source to skip the lookup in edj file
while loading font.
@fix
Test Plan: NA
Reviewers: cedric
Reviewed By: cedric
Subscribers: shilpasingh
Differential Revision: https://phab.enlightenment.org/D5909
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r-- | src/lib/edje/edje_textblock_styles.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/lib/edje/edje_textblock_styles.c b/src/lib/edje/edje_textblock_styles.c index 24cf2e1f0f..6585034292 100644 --- a/src/lib/edje/edje_textblock_styles.c +++ b/src/lib/edje/edje_textblock_styles.c @@ -191,7 +191,8 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force) if (_edje_fontset_append) fontset = eina_str_escape(_edje_fontset_append); - fontsource = eina_str_escape(ed->file->path); + if (ed->file->fonts) + fontsource = eina_str_escape(ed->file->path); /* Build the style from each tag */ EINA_LIST_FOREACH(stl->tags, l, tag) @@ -216,9 +217,12 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force) eina_strbuf_append(txt, "font_fallbacks="); eina_strbuf_append(txt, fontset); } - eina_strbuf_append(txt, " "); - eina_strbuf_append(txt, "font_source="); - eina_strbuf_append(txt, fontsource); + if (fontsource) + { + eina_strbuf_append(txt, " "); + eina_strbuf_append(txt, "font_source="); + eina_strbuf_append(txt, fontsource); + } } if (!EINA_DBL_EQ(tag->font_size, 0)) { @@ -466,7 +470,8 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf) if (_edje_fontset_append) fontset = eina_str_escape(_edje_fontset_append); - fontsource = eina_str_escape(edf->path); + if (edf->fonts) + fontsource = eina_str_escape(edf->path); /* Build the style from each tag */ EINA_LIST_FOREACH(stl->tags, ll, tag) @@ -498,9 +503,12 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf) eina_strbuf_append(txt, "font_fallbacks="); eina_strbuf_append(txt, fontset); } - eina_strbuf_append(txt, " "); - eina_strbuf_append(txt, "font_source="); - eina_strbuf_append(txt, fontsource); + if (fontsource) + { + eina_strbuf_append(txt, " "); + eina_strbuf_append(txt, "font_source="); + eina_strbuf_append(txt, fontsource); + } } if (tag->font_size > 0) { |