From d9b93542cf36e9dbc1ad649c8c47f483554ce1cd Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Wed, 17 Feb 2016 09:23:06 +0000 Subject: [PATCH] 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 --- src/lib/evas/canvas/evas_font_dir.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c index 3e544def71..bfab21f2eb 100644 --- a/src/lib/evas/canvas/evas_font_dir.c +++ b/src/lib/evas/canvas/evas_font_dir.c @@ -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); + } } }