forked from enlightenment/efl
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>
This commit is contained in:
parent
4ea4a20455
commit
b650325b88
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue