summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2016-08-18 13:33:08 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2016-08-18 13:33:08 +0300
commit167d41e7b25c2cfda7759d050a1f57633e6abbaf (patch)
tree3f0082f8cc35506163f12549bbc0259b6946988e
parent4be972c41ce956b08bd367a02dfc638766fc380f (diff)
downloadefl-167d41e7b25c2cfda7759d050a1f57633e6abbaf.tar.gz
Evas Text: parse font string everytime for updating lang properly
Summary: We can't assume the given font is same with current fdesc by comparing string. Since Evas starts to supporting "auto" for language, the given font string should be parsed once before comparing it. @fix Test Plan: N/A Reviewers: tasn, raster, cedric, herdsman Subscribers: jpeg, minudf, z-wony, Blackmole, woohyun Differential Revision: https://phab.enlightenment.org/D4227
-rw-r--r--src/lib/evas/canvas/evas_object_text.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 2e4a418adf..b5c79a221a 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -420,18 +420,15 @@ _evas_text_efl_text_properties_font_set(Eo *eo_obj, Evas_Text_Data *o, const cha
if ((!font) || (size <= 0)) return;
evas_object_async_block(obj);
- if (!(o->cur.font && !strcmp(font, o->cur.font)))
- {
- fdesc = evas_font_desc_new();
- /* Set default language according to locale. */
- eina_stringshare_replace(&(fdesc->lang), evas_font_lang_normalize("auto"));
- evas_font_name_parse(fdesc, font);
- }
- else
- {
- fdesc = evas_font_desc_ref(o->cur.fdesc);
- }
+ /* We can't assume the given font is same with current fdesc by comparing string.
+ Since Evas starts to supporting "auto" for language,
+ the given font string should be parsed once before comparing it. */
+ fdesc = evas_font_desc_new();
+
+ /* Set default language according to locale. */
+ eina_stringshare_replace(&(fdesc->lang), evas_font_lang_normalize("auto"));
+ evas_font_name_parse(fdesc, font);
if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) &&
(size == o->cur.size))