Evas font: allow ":fallbacks" keyword when Evas parses font keyword

Summary:
Developers could use fallback fonts using only font_fallbacks keyword.
The keyword is only allowed for Evas Textblock. It has to be common
feature for other text type objects.
Applying this patch, Text and Textgrid can add fallback fonts.
@feature

Test Plan:
Set font like the following example to Textblock, Text, Textgrid.
Sans:fallbacks=Inconsolata

Reviewers: tasn, herdsman, woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3704
This commit is contained in:
Youngbok Shin 2016-02-17 09:23:06 +00:00 committed by Tom Hacohen
parent f6e019565f
commit d9b93542cf
1 changed files with 5 additions and 0 deletions

View File

@ -533,6 +533,11 @@ evas_font_name_parse(Evas_Font_Description *fdesc, const char *name)
eina_stringshare_replace_length(&(fdesc->lang), tmp, tend - tmp);
eina_stringshare_replace(&(fdesc->lang), evas_font_lang_normalize(fdesc->lang));
}
else if (!strncmp(name, ":fallbacks=", 11))
{
const char *tmp = name + 11;
eina_stringshare_replace_length(&(fdesc->fallbacks), tmp, tend - tmp);
}
}
}