summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-10-08 14:00:24 +0300
committerCedric BAIL <cedric@osg.samsung.com>2017-11-10 10:29:27 -0800
commita80209a59eefe1a77f630c111a00a512c492825a (patch)
tree3c617af795ad050e12a3a50fc300e10806ea65c9 /src
parentcf345cff74d893ece4a5e3855a41522ad381189c (diff)
Canvas text: favor font name parsing over set properties
Since font names can also specify styles like weight, width etc, we should parse the font name AFTER setting the respective properties to the font description, so it can override some if required. This allows, for example, the following operation: efl_text_font_weight_set(obj, EFL_TEXT_FONT_WEIGHT_NORMAL); efl_text_font_set(obj, "Sans:Bold"); Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 0b375e41d5..251d1add48 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3385,7 +3385,6 @@ _layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt,
3385 } 3385 }
3386 fmt->font.fdesc = evas_font_desc_new(); 3386 fmt->font.fdesc = evas_font_desc_new();
3387 3387
3388 evas_font_name_parse(fmt->font.fdesc, _FMT_INFO(font));
3389 eina_stringshare_replace(&(fmt->font.fdesc->lang), 3388 eina_stringshare_replace(&(fmt->font.fdesc->lang),
3390 evas_font_lang_normalize("auto")); 3389 evas_font_lang_normalize("auto"));
3391 eina_stringshare_replace(&(fmt->font.fdesc->fallbacks), 3390 eina_stringshare_replace(&(fmt->font.fdesc->fallbacks),
@@ -3396,6 +3395,7 @@ _layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt,
3396 fmt->font.fdesc->slant = _FMT_INFO(font_slant); 3395 fmt->font.fdesc->slant = _FMT_INFO(font_slant);
3397 fmt->font.fdesc->width = _FMT_INFO(font_width); 3396 fmt->font.fdesc->width = _FMT_INFO(font_width);
3398 fmt->font.fdesc->lang = _FMT_INFO(font_lang); 3397 fmt->font.fdesc->lang = _FMT_INFO(font_lang);
3398 evas_font_name_parse(fmt->font.fdesc, _FMT_INFO(font));
3399 fmt->font.font = evas_font_load(evas_obj->layer->evas->font_path, 3399 fmt->font.font = evas_font_load(evas_obj->layer->evas->font_path,
3400 evas_obj->layer->evas->hinting, 3400 evas_obj->layer->evas->hinting,
3401 fmt->font.fdesc, 3401 fmt->font.fdesc,