HomePhabricator

edje_textblock: remove duplicated textblock style properties

Authored by bowonryu on Jul 22 2020, 3:16 AM.

Description

edje_textblock: remove duplicated textblock style properties

Summary:
When there is "font" and "font_size" in textblock style (already defined),
If "font" and "font_size" are set using edje_text_class_set(),
then "font" and "font_size" are defined duplicated in texblock style through eina_strbuf_append.

Duplicate properties use memory unnecessarily,
and also it is possible to cause confusion at debbuging.

This patch replaces duplicate properties "font", "font_size" using eina_strbuf_replace.

Test Plan:

  • textblock style in edc

"font=Sans font_size=20 wrap=mixed text_class=TEXT_CLASS";

  • edje_text_class_set in c

edje_text_class_set("TEXT_CLASS", "font=DejavuSans", 40);

  • textblock style at runtime (BEFORE)

DEFAULT='font=Sans font_size=20 wrap=mixed font_size=40.0 font=DejavuSans'

  • textblock style at runtime (AFTER)

DEFAULT='font=DejavuSans font_size=40 wrap=mixed'

Reviewers: subodh6129, woohyun, ali.alzyod

Reviewed By: ali.alzyod

Subscribers: cedric, reviewers, committers

Tags: efl

Differential Revision: https://phab.enlightenment.org/D11962