summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2019-11-28 16:55:26 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2019-11-28 16:55:27 +0900
commit7bdb63d045cf3377abb7966d018da10c4e8d6b13 (patch)
tree18d5ddd1391f755bca294fee486d1740b55dba38
parentfa1aa10d792129a031ec16b20d73aa99804359de (diff)
Polish text interface methods
Summary: This patch is set to rename some properties of `Efl.Text_Font` & `Efl.Text_Format` interfaces. 1- efl_text_font_set/get become (efl_text_font_family_set/get, efl_text_font_size_set/get) 2- efl_text_valign/halign become efl_text_vertical/horizontal_align 3- efl_text_halign_auto_type become efl_text_horizontal_align_auto_type Reviewers: ali.alzyod, woohyun, segfaultxavi, bu5hm4n, zmike, cedric Reviewed By: woohyun Subscribers: zmike, #committers, #reviewers, cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D10716
-rw-r--r--src/bin/elementary/test_efl_ui_text.c12
-rw-r--r--src/bin/elementary/test_gfx_filters.c7
-rw-r--r--src/bin/elementary/test_photocam.c3
-rw-r--r--src/bin/elementary/test_ui_relative_container.c6
-rw-r--r--src/examples/elementary/efl_canvas_layout_text.c3
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c6
-rw-r--r--src/lib/edje/edje_part_text.c48
-rw-r--r--src/lib/edje/edje_text.c30
-rw-r--r--src/lib/edje/efl_canvas_layout_part_text.eo3
-rw-r--r--src/lib/efl/interfaces/efl_text_font.eo23
-rw-r--r--src/lib/efl/interfaces/efl_text_format.eo6
-rw-r--r--src/lib/elementary/efl_ui_text.c6
-rw-r--r--src/lib/evas/canvas/efl_canvas_text.eo9
-rw-r--r--src/lib/evas/canvas/evas_object_text.c86
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c45
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c42
-rw-r--r--src/lib/evas/canvas/evas_text_eo.c6
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.c16
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.h2
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.legacy.h2
-rw-r--r--src/tests/edje/edje_test_text.c9
-rw-r--r--src/tests/evas/evas_test_textblock.c21
22 files changed, 259 insertions, 132 deletions
diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c
index e060067..24870b5 100644
--- a/src/bin/elementary/test_efl_ui_text.c
+++ b/src/bin/elementary/test_efl_ui_text.c
@@ -67,7 +67,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
67 67
68 en = _create_label(win, bx); 68 en = _create_label(win, bx);
69 efl_text_markup_set(en, "You can also <b>ENTER</b> markup!"); 69 efl_text_markup_set(en, "You can also <b>ENTER</b> markup!");
70 efl_text_font_set(en, "Sans", 14); 70 efl_text_font_family_set(en, "Sans");
71 efl_text_font_size_set(en, 14);
71 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 72 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
72 efl_text_multiline_set(en, EINA_TRUE); 73 efl_text_multiline_set(en, EINA_TRUE);
73 74
@@ -76,7 +77,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
76 "You can use the text -> markup helper\nto make coding easier."); 77 "You can use the text -> markup helper\nto make coding easier.");
77 efl_text_markup_set(en, markup); 78 efl_text_markup_set(en, markup);
78 free(markup); 79 free(markup);
79 efl_text_font_set(en, "Sans", 14); 80 efl_text_font_family_set(en, "Sans");
81 efl_text_font_size_set(en, 14);
80 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 82 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
81 efl_text_multiline_set(en, EINA_TRUE); 83 efl_text_multiline_set(en, EINA_TRUE);
82 84
@@ -85,7 +87,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
85 "You can use markup -&gt; text helpers<ps>to make coding easier."); 87 "You can use markup -&gt; text helpers<ps>to make coding easier.");
86 efl_text_set(en, markup); 88 efl_text_set(en, markup);
87 free(markup); 89 free(markup);
88 efl_text_font_set(en, "Sans", 14); 90 efl_text_font_family_set(en, "Sans");
91 efl_text_font_size_set(en, 14);
89 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 92 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
90 efl_text_multiline_set(en, EINA_TRUE); 93 efl_text_multiline_set(en, EINA_TRUE);
91} 94}
@@ -161,7 +164,8 @@ test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
161 efl_text_interactive_editable_set(en, EINA_TRUE); 164 efl_text_interactive_editable_set(en, EINA_TRUE);
162 efl_ui_text_scrollable_set(en, EINA_TRUE); 165 efl_ui_text_scrollable_set(en, EINA_TRUE);
163 166
164 efl_text_font_set(en, "Sans", 12); 167 efl_text_font_family_set(en, "Sans");
168 efl_text_font_size_set(en, 12);
165 efl_text_font_width_set(en, EFL_TEXT_FONT_WIDTH_ULTRACONDENSED); 169 efl_text_font_width_set(en, EFL_TEXT_FONT_WIDTH_ULTRACONDENSED);
166 efl_text_normal_color_set(en, 255, 255, 255, 255); 170 efl_text_normal_color_set(en, 255, 255, 255, 255);
167 171
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index 35360b6..988c076 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -294,11 +294,9 @@ _font_size_change(void *data, const Efl_Event *ev)
294{ 294{
295 Eo *win = data; 295 Eo *win = data;
296 Eo *text; 296 Eo *text;
297 const char *font;
298 297
299 text = efl_key_wref_get(win, "text"); 298 text = efl_key_wref_get(win, "text");
300 efl_text_font_get(text, &font, NULL); 299 efl_text_font_size_set(text, elm_spinner_value_get(ev->object));
301 efl_text_font_set(text, font, elm_spinner_value_get(ev->object));
302} 300}
303 301
304static void 302static void
@@ -462,7 +460,8 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
462 // Note: No TEXT object with EO APIs 460 // Note: No TEXT object with EO APIs
463 o = text = evas_object_text_add(evas_object_evas_get(win)); 461 o = text = evas_object_text_add(evas_object_evas_get(win));
464 efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _text_resize, NULL); 462 efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _text_resize, NULL);
465 efl_text_font_set(o, "Sans:style=Bold", default_font_size); 463 efl_text_font_family_set(o, "Sans:style=Bold");
464 efl_text_font_size_set(o, default_font_size);
466 efl_gfx_entity_scale_set(text, elm_config_scale_get()); 465 efl_gfx_entity_scale_set(text, elm_config_scale_get());
467 efl_text_set(o, "EFL"); 466 efl_text_set(o, "EFL");
468 efl_gfx_entity_visible_set(o, 1); 467 efl_gfx_entity_visible_set(o, 1);
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 78aa528..72d9b2f 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -817,7 +817,8 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
817 efl_text_set(efl_added, "Clicking the image will play/pause animation."), 817 efl_text_set(efl_added, "Clicking the image will play/pause animation."),
818 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 818 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
819 efl_gfx_hint_weight_set(efl_added, 1, 0), 819 efl_gfx_hint_weight_set(efl_added, 1, 0),
820 efl_text_font_set(efl_added, "Sans", 10), 820 efl_text_font_family_set(efl_added, "Sans"),
821 efl_text_font_size_set(efl_added, 10),
821 efl_text_normal_color_set(efl_added, 255, 255, 255, 255), 822 efl_text_normal_color_set(efl_added, 255, 255, 255, 255),
822 efl_pack(bx, efl_added) 823 efl_pack(bx, efl_added)
823 ); 824 );
diff --git a/src/bin/elementary/test_ui_relative_container.c b/src/bin/elementary/test_ui_relative_container.c
index 40e2c1a..4b5ca73 100644
--- a/src/bin/elementary/test_ui_relative_container.c
+++ b/src/bin/elementary/test_ui_relative_container.c
@@ -156,7 +156,7 @@ _setter_add(Eo *vbox, Eo *btn, Options option)
156 efl_add(EFL_UI_TEXT_CLASS, hbox, 156 efl_add(EFL_UI_TEXT_CLASS, hbox,
157 efl_text_set(efl_added, text), 157 efl_text_set(efl_added, text),
158 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 158 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
159 efl_text_valign_set(efl_added, 0.5), 159 efl_text_vertical_align_set(efl_added, 0.5),
160 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)), 160 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)),
161 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND), 161 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
162 efl_pack(hbox, efl_added)); 162 efl_pack(hbox, efl_added));
@@ -210,14 +210,14 @@ _button_frame_add(Eo *box, Eo *btn)
210 efl_add(EFL_UI_TEXT_CLASS, hbox, 210 efl_add(EFL_UI_TEXT_CLASS, hbox,
211 efl_text_set(efl_added, "to"), 211 efl_text_set(efl_added, "to"),
212 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 212 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
213 efl_text_halign_set(efl_added, 0.5), 213 efl_text_horizontal_align_set(efl_added, 0.5),
214 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(60, 0)), 214 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(60, 0)),
215 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND), 215 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
216 efl_pack(hbox, efl_added)); 216 efl_pack(hbox, efl_added));
217 217
218 efl_add(EFL_UI_TEXT_CLASS, hbox, 218 efl_add(EFL_UI_TEXT_CLASS, hbox,
219 efl_text_set(efl_added, "relative"), 219 efl_text_set(efl_added, "relative"),
220 efl_text_halign_set(efl_added, 0.5), 220 efl_text_horizontal_align_set(efl_added, 0.5),
221 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 221 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
222 efl_pack(hbox, efl_added)); 222 efl_pack(hbox, efl_added));
223 223
diff --git a/src/examples/elementary/efl_canvas_layout_text.c b/src/examples/elementary/efl_canvas_layout_text.c
index 593dbe8..bafd0dd 100644
--- a/src/examples/elementary/efl_canvas_layout_text.c
+++ b/src/examples/elementary/efl_canvas_layout_text.c
@@ -135,7 +135,8 @@ efl_main(void *data EINA_UNUSED,
135 efl_text_markup_set(efl_part(layout, "text"), "This is an example text. This is a layout text part."); 135 efl_text_markup_set(efl_part(layout, "text"), "This is an example text. This is a layout text part.");
136 efl_text_wrap_set(efl_part(layout, "text"), wraps[wrap_itr].wrap); 136 efl_text_wrap_set(efl_part(layout, "text"), wraps[wrap_itr].wrap);
137 efl_text_normal_color_set(efl_part(layout, "text"), 255, 255, 0, 255); 137 efl_text_normal_color_set(efl_part(layout, "text"), 255, 255, 0, 255);
138 efl_text_font_set(efl_part(layout, "text"), "Serif", 12); 138 efl_text_font_family_set(efl_part(layout, "text"), "Serif");
139 efl_text_font_size_set(efl_part(layout, "text"), 12);
139 140
140 efl_canvas_layout_part_text_expand_set(efl_part(layout, "text"), 141 efl_canvas_layout_part_text_expand_set(efl_part(layout, "text"),
141 expands[expand_itr].expand); 142 expands[expand_itr].expand);
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index edf6d5d..49cd522 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -154,7 +154,7 @@ elm_main(int argc EINA_UNUSED, char **argv)
154 154
155 txt = efl_add(EFL_UI_TEXT_CLASS, ibox); 155 txt = efl_add(EFL_UI_TEXT_CLASS, ibox);
156 efl_gfx_hint_weight_set(txt, 0.95, EFL_GFX_HINT_EXPAND); 156 efl_gfx_hint_weight_set(txt, 0.95, EFL_GFX_HINT_EXPAND);
157 efl_text_halign_set(txt, 0.2); 157 efl_text_horizontal_align_set(txt, 0.2);
158 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE); 158 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
159 snprintf(buf, sizeof(buf), "placeholder style item [%d]", i); 159 snprintf(buf, sizeof(buf), "placeholder style item [%d]", i);
160 efl_text_set(txt, buf); 160 efl_text_set(txt, buf);
@@ -232,7 +232,7 @@ elm_main(int argc EINA_UNUSED, char **argv)
232 /*select mode */ 232 /*select mode */
233 txt = efl_add(EFL_UI_TEXT_CLASS, wbox); 233 txt = efl_add(EFL_UI_TEXT_CLASS, wbox);
234 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01); 234 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01);
235 efl_text_halign_set(txt, 0.02); 235 efl_text_horizontal_align_set(txt, 0.02);
236 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE); 236 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
237 efl_text_set(txt, "Select Mode"); 237 efl_text_set(txt, "Select Mode");
238 efl_pack_end(wbox, txt); 238 efl_pack_end(wbox, txt);
@@ -260,7 +260,7 @@ elm_main(int argc EINA_UNUSED, char **argv)
260 txt = efl_add(EFL_UI_TEXT_CLASS, wbox); 260 txt = efl_add(EFL_UI_TEXT_CLASS, wbox);
261 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01); 261 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01);
262 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE); 262 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
263 efl_text_halign_set(txt, 0.02); 263 efl_text_horizontal_align_set(txt, 0.02);
264 efl_text_set(txt, "Item Scroll"); 264 efl_text_set(txt, "Item Scroll");
265 efl_pack_end(wbox, txt); 265 efl_pack_end(wbox, txt);
266 266
diff --git a/src/lib/edje/edje_part_text.c b/src/lib/edje/edje_part_text.c
index 01bca32..876c4ab 100644
--- a/src/lib/edje/edje_part_text.c
+++ b/src/lib/edje/edje_part_text.c
@@ -149,8 +149,8 @@ _efl_canvas_layout_part_text_efl_text_format_ellipsis_get(const Eo *obj,
149} 149}
150 150
151EOLIAN static void 151EOLIAN static void
152_efl_canvas_layout_part_text_efl_text_font_font_set(Eo *obj, 152_efl_canvas_layout_part_text_efl_text_font_font_family_set(Eo *obj,
153 void *_pd EINA_UNUSED, const char *font, Efl_Font_Size size) 153 void *_pd EINA_UNUSED, const char *font)
154{ 154{
155 Edje_User_Defined *eud; 155 Edje_User_Defined *eud;
156 156
@@ -161,17 +161,43 @@ _efl_canvas_layout_part_text_efl_text_font_font_set(Eo *obj,
161 eud = _edje_user_text_style_definition_fetch(pd->ed, pd->part); 161 eud = _edje_user_text_style_definition_fetch(pd->ed, pd->part);
162 162
163 eud->u.text_style.types |= EDJE_PART_TEXT_PROP_FONT; 163 eud->u.text_style.types |= EDJE_PART_TEXT_PROP_FONT;
164 efl_text_font_set(pd->rp->object, font, size); 164 efl_text_font_family_set(pd->rp->object, font);
165}
166
167EOLIAN static const char *
168_efl_canvas_layout_part_text_efl_text_font_font_family_get(const Eo *obj,
169 void *_pd EINA_UNUSED)
170{
171 PROXY_DATA_GET(obj, pd);
172 if (pd->rp->part->type == EDJE_PART_TYPE_TEXT) return NULL;
173
174 return efl_text_font_family_get(pd->rp->object);
165} 175}
166 176
167EOLIAN static void 177EOLIAN static void
168_efl_canvas_layout_part_text_efl_text_font_font_get(const Eo *obj, 178_efl_canvas_layout_part_text_efl_text_font_font_size_set(Eo *obj,
169 void *_pd EINA_UNUSED, const char **font, Efl_Font_Size *size) 179 void *_pd EINA_UNUSED, Efl_Font_Size size)
170{ 180{
181 Edje_User_Defined *eud;
182
171 PROXY_DATA_GET(obj, pd); 183 PROXY_DATA_GET(obj, pd);
172 if (pd->rp->part->type == EDJE_PART_TYPE_TEXT) return; 184 if (pd->rp->part->type == EDJE_PART_TYPE_TEXT) return;
173 185
174 efl_text_font_get(pd->rp->object, font, size); 186
187 eud = _edje_user_text_style_definition_fetch(pd->ed, pd->part);
188
189 eud->u.text_style.types |= EDJE_PART_TEXT_PROP_FONT;
190 efl_text_font_size_set(pd->rp->object, size);
191}
192
193EOLIAN static Efl_Font_Size
194_efl_canvas_layout_part_text_efl_text_font_font_size_get(const Eo *obj,
195 void *_pd EINA_UNUSED)
196{
197 PROXY_DATA_GET(obj, pd);
198 if (pd->rp->part->type == EDJE_PART_TYPE_TEXT) return 0;
199
200 return efl_text_font_size_get(pd->rp->object);
175} 201}
176 202
177EOLIAN static void 203EOLIAN static void
@@ -372,8 +398,8 @@ _canvas_layout_user_text_collect(Edje *ed, Edje_User_Defined *eud)
372 Edje_Part_Text_Prop *prop; 398 Edje_Part_Text_Prop *prop;
373 399
374 prop = _prop_new(props, EDJE_PART_TEXT_PROP_FONT); 400 prop = _prop_new(props, EDJE_PART_TEXT_PROP_FONT);
375 efl_text_font_get(rp->object, &prop->val.font.font, 401 prop->val.font.font = efl_text_font_family_get(rp->object);
376 &prop->val.font.size); 402 prop->val.font.size = efl_text_font_size_get(rp->object);
377 } 403 }
378 404
379 if (eud->u.text_style.types & EDJE_PART_TEXT_PROP_SHADOW_DIRECTION) 405 if (eud->u.text_style.types & EDJE_PART_TEXT_PROP_SHADOW_DIRECTION)
@@ -484,9 +510,11 @@ _canvas_layout_user_text_apply(Edje_User_Defined *eud, Eo *obj,
484 break; 510 break;
485 511
486 case EDJE_PART_TEXT_PROP_FONT: 512 case EDJE_PART_TEXT_PROP_FONT:
487 efl_text_font_set(efl_part(obj, 513 efl_text_font_family_set(efl_part(obj,
514 eud->part),
515 prop->val.font.font);
516 efl_text_font_size_set(efl_part(obj,
488 eud->part), 517 eud->part),
489 prop->val.font.font,
490 prop->val.font.size); 518 prop->val.font.size);
491 break; 519 break;
492 520
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 95d7676..ef1b149 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -141,7 +141,8 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
141 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 141 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
142 142
143 evas_obj_text_ellipsis_set(ep->object, params->type.text->ellipsis); 143 evas_obj_text_ellipsis_set(ep->object, params->type.text->ellipsis);
144 efl_text_font_set(ep->object, font, size); 144 efl_text_font_family_set(ep->object, font);
145 efl_text_font_size_set(ep->object, size);
145 efl_text_set(ep->object, text); 146 efl_text_set(ep->object, text);
146 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(sw, sh)); 147 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(sw, sh));
147 148
@@ -342,16 +343,19 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
342 /* the fit shoult not depend on font size, because it give the differet 343 /* the fit shoult not depend on font size, because it give the differet
343 * size calculation. As base font size for calculate fit size I take 344 * size calculation. As base font size for calculate fit size I take
344 * 10 (ten), because this value used for calculate fit by Y below */ 345 * 10 (ten), because this value used for calculate fit by Y below */
345 efl_text_font_set(ep->object, font, 10); 346 efl_text_font_family_set(ep->object, font);
347 efl_text_font_size_set(ep->object, 10);
346 part_get_geometry(ep, &tw, &th); 348 part_get_geometry(ep, &tw, &th);
347 349
348 size = (10 * sw) / tw; 350 size = (10 * sw) / tw;
349 efl_text_font_set(ep->object, font, size); 351 efl_text_font_family_set(ep->object, font);
352 efl_text_font_size_set(ep->object, size);
350 part_get_geometry(ep, &tw, &th); 353 part_get_geometry(ep, &tw, &th);
351 while ((tw > sw) && (size > 1)) 354 while ((tw > sw) && (size > 1))
352 { 355 {
353 size--; 356 size--;
354 efl_text_font_set(ep->object, font, size); 357 efl_text_font_family_set(ep->object, font);
358 efl_text_font_size_set(ep->object, size);
355 part_get_geometry(ep, &tw, &th); 359 part_get_geometry(ep, &tw, &th);
356 } 360 }
357 } 361 }
@@ -368,7 +372,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
368 372
369 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc)); 373 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
370 374
371 efl_text_font_set(ep->object, font, size); 375 efl_text_font_family_set(ep->object, font);
376 efl_text_font_size_set(ep->object, size);
372 efl_text_set(ep->object, text); 377 efl_text_set(ep->object, text);
373 part_get_geometry(ep, &tw, &th); 378 part_get_geometry(ep, &tw, &th);
374 379
@@ -390,7 +395,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
390 else efl_text_font_source_set(ep->object, NULL); 395 else efl_text_font_source_set(ep->object, NULL);
391 396
392 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc)); 397 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
393 efl_text_font_set(ep->object, font, size); 398 efl_text_font_family_set(ep->object, font);
399 efl_text_font_size_set(ep->object, size);
394 400
395 part_get_geometry(ep, &tw, &th); 401 part_get_geometry(ep, &tw, &th);
396 if ((size > 0) && (th == 0)) break; 402 if ((size > 0) && (th == 0)) break;
@@ -402,7 +408,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
402 int current; 408 int current;
403 409
404 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc)); 410 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
405 efl_text_font_set(ep->object, font, 10); 411 efl_text_font_family_set(ep->object, font);
412 efl_text_font_size_set(ep->object, 10);
406 413
407 part_get_geometry(ep, &tw, &th); 414 part_get_geometry(ep, &tw, &th);
408 415
@@ -424,7 +431,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
424 current = (top + bottom) / 2; 431 current = (top + bottom) / 2;
425 432
426 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc)); 433 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
427 efl_text_font_set(ep->object, font, current); 434 efl_text_font_family_set(ep->object, font);
435 efl_text_font_size_set(ep->object, current);
428 436
429 part_get_geometry(ep, &tw, &th); 437 part_get_geometry(ep, &tw, &th);
430 438
@@ -440,7 +448,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
440 current++; 448 current++;
441 449
442 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc)); 450 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
443 efl_text_font_set(ep->object, font, current); 451 efl_text_font_family_set(ep->object, font);
452 efl_text_font_size_set(ep->object, current);
444 453
445 part_get_geometry(ep, &tw, &th); 454 part_get_geometry(ep, &tw, &th);
446 } while (th <= sh); 455 } while (th <= sh);
@@ -490,7 +499,8 @@ arrange_text:
490 499
491 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc)); 500 if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
492 501
493 efl_text_font_set(ep->object, font, size); 502 efl_text_font_family_set(ep->object, font);
503 efl_text_font_size_set(ep->object, size);
494 efl_text_set(ep->object, text); 504 efl_text_set(ep->object, text);
495 part_get_geometry(ep, &tw, &th); 505 part_get_geometry(ep, &tw, &th);
496 506
diff --git a/src/lib/edje/efl_canvas_layout_part_text.eo b/src/lib/edje/efl_canvas_layout_part_text.eo
index e1593ad..cacf430 100644
--- a/src/lib/edje/efl_canvas_layout_part_text.eo
+++ b/src/lib/edje/efl_canvas_layout_part_text.eo
@@ -38,7 +38,8 @@ Efl.Text_Markup, Efl.Text_Format, Efl.Text_Font, Efl.Text_Style
38 Efl.Text_Markup.markup { get; set; } 38 Efl.Text_Markup.markup { get; set; }
39 Efl.Text_Format.ellipsis { set; get; } 39 Efl.Text_Format.ellipsis { set; get; }
40 Efl.Text_Format.wrap { set; get; } 40 Efl.Text_Format.wrap { set; get; }
41 Efl.Text_Font.font { set; get; } 41 Efl.Text_Font.font_family { set; get; }
42 Efl.Text_Font.font_size { set; get; }
42 Efl.Text_Style.normal_color { set; get; } 43 Efl.Text_Style.normal_color { set; get; }
43 Efl.Text_Style.backing_type { set; get; } 44 Efl.Text_Style.backing_type { set; get; }
44 Efl.Text_Style.backing_color { set; get;} 45 Efl.Text_Style.backing_color { set; get;}
diff --git a/src/lib/efl/interfaces/efl_text_font.eo b/src/lib/efl/interfaces/efl_text_font.eo
index ccd4e33..f7a6e40 100644
--- a/src/lib/efl/interfaces/efl_text_font.eo
+++ b/src/lib/efl/interfaces/efl_text_font.eo
@@ -52,19 +52,16 @@ interface @beta Efl.Text_Font {
52 ]] 52 ]]
53 c_prefix: efl_text; 53 c_prefix: efl_text;
54 methods { 54 methods {
55 @property font { 55 @property font_family {
56 [[The font family, filename and size for a given text object. 56 [[The font family, filename for a given text object.
57 57
58 This property controls the font name and size of a text object. 58 This property controls the font name of a text object.
59 The font string has to follow fontconfig's convention for 59 The font string has to follow fontconfig's convention for
60 naming fonts, as it's the underlying library used to query system 60 naming fonts, as it's the underlying library used to query system
61 fonts by Evas (see the fc-list command's output, on your system, 61 fonts by Evas (see the fc-list command's output, on your system,
62 to get an idea). Alternatively, youe can use the full path to a font 62 to get an idea). Alternatively, youe can use the full path to a font
63 file. 63 file.
64 64
65 To skip changing font family pass null as font family.
66 To skip changing font size pass 0 as font size.
67
68 When reading it, the font name string is still owned by 65 When reading it, the font name string is still owned by
69 Evas and should not be freed. 66 Evas and should not be freed.
70 See also @.font_source. 67 See also @.font_source.
@@ -75,9 +72,21 @@ interface @beta Efl.Text_Font {
75 } 72 }
76 values { 73 values {
77 font: string; [[The font family name or filename.]] 74 font: string; [[The font family name or filename.]]
75 }
76 }
77
78 @property font_size {
79 [[The font size for a given text object.
80
81 This property controls the font size of a text object.
82 ]]
83 set {}
84 get {}
85 values {
78 size: Efl.Font.Size; [[The font size, in points.]] 86 size: Efl.Font.Size; [[The font size, in points.]]
79 } 87 }
80 } 88 }
89
81 @property font_source { 90 @property font_source {
82 [[The font (source) file to be used on a given text object. 91 [[The font (source) file to be used on a given text object.
83 92
@@ -85,7 +94,7 @@ interface @beta Efl.Text_Font {
85 given text object, overriding system lookup, which will first 94 given text object, overriding system lookup, which will first
86 occur in the given file's contents. 95 occur in the given file's contents.
87 96
88 See also @.font. 97 See also @.font_family.
89 ]] 98 ]]
90 set { 99 set {
91 } 100 }
diff --git a/src/lib/efl/interfaces/efl_text_format.eo b/src/lib/efl/interfaces/efl_text_format.eo
index 25c17f1..7ecc8fe 100644
--- a/src/lib/efl/interfaces/efl_text_format.eo
+++ b/src/lib/efl/interfaces/efl_text_format.eo
@@ -45,21 +45,21 @@ interface @beta Efl.Text_Format {
45 } 45 }
46 } 46 }
47 47
48 @property halign_auto_type { 48 @property horizontal_align_auto_type {
49 [[Horizontal alignment of text]] 49 [[Horizontal alignment of text]]
50 values { 50 values {
51 value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type]] 51 value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type]]
52 } 52 }
53 } 53 }
54 54
55 @property halign { 55 @property horizontal_align {
56 [[Horizontal alignment of text]] 56 [[Horizontal alignment of text]]
57 values { 57 values {
58 value: double; [[Horizontal alignment value]] 58 value: double; [[Horizontal alignment value]]
59 } 59 }
60 } 60 }
61 61
62 @property valign { 62 @property vertical_align {
63 [[Vertical alignment of text]] 63 [[Vertical alignment of text]]
64 values { 64 values {
65 value: double; [[Vertical alignment value]] 65 value: double; [[Vertical alignment value]]
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 73f010e..906984b 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2088,7 +2088,8 @@ _update_text_theme(Eo *obj, Efl_Ui_Text_Data *sd)
2088 font_name = edje_object_data_get(wd->resize_obj, "font.name"); 2088 font_name = edje_object_data_get(wd->resize_obj, "font.name");
2089 font_size = edje_object_data_get(wd->resize_obj, "font.size"); 2089 font_size = edje_object_data_get(wd->resize_obj, "font.size");
2090 font_size_n = font_size ? atoi(font_size) : 0; 2090 font_size_n = font_size ? atoi(font_size) : 0;
2091 efl_text_font_set(sd->text_obj, font_name, font_size_n); 2091 efl_text_font_family_set(sd->text_obj, font_name);
2092 efl_text_font_size_set(sd->text_obj, font_size_n);
2092 2093
2093 // color 2094 // color
2094 if (disabled) 2095 if (disabled)
@@ -2104,7 +2105,8 @@ _update_text_theme(Eo *obj, Efl_Ui_Text_Data *sd)
2104 font_name = edje_object_data_get(wd->resize_obj, "guide.font.name"); 2105 font_name = edje_object_data_get(wd->resize_obj, "guide.font.name");
2105 font_size = edje_object_data_get(wd->resize_obj, "guide.font.size"); 2106 font_size = edje_object_data_get(wd->resize_obj, "guide.font.size");
2106 font_size_n = font_size ? atoi(font_size) : 0; 2107 font_size_n = font_size ? atoi(font_size) : 0;
2107 efl_text_font_set(sd->text_guide_obj, font_name, font_size_n); 2108 efl_text_font_family_set(sd->text_guide_obj, font_name);
2109 efl_text_font_size_set(sd->text_guide_obj, font_size_n);
2108 2110
2109 colorcode = NULL; 2111 colorcode = NULL;
2110 // color 2112 // color
diff --git a/src/lib/evas/canvas/efl_canvas_text.eo b/src/lib/evas/canvas/efl_canvas_text.eo
index f5e6af1..6cdfaff 100644
--- a/src/lib/evas/canvas/efl_canvas_text.eo
+++ b/src/lib/evas/canvas/efl_canvas_text.eo
@@ -191,7 +191,8 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text,
191 Efl.Canvas.Filter.Internal.filter_dirty; 191 Efl.Canvas.Filter.Internal.filter_dirty;
192 Efl.Canvas.Filter.Internal.filter_input_render; 192 Efl.Canvas.Filter.Internal.filter_input_render;
193 Efl.Canvas.Filter.Internal.filter_state_prepare; 193 Efl.Canvas.Filter.Internal.filter_state_prepare;
194 Efl.Text_Font.font { get; set; } 194 Efl.Text_Font.font_family { get; set; }
195 Efl.Text_Font.font_size { get; set; }
195 Efl.Text_Font.font_source { get; set; } 196 Efl.Text_Font.font_source { get; set; }
196 Efl.Text_Font.font_fallbacks { get; set; } 197 Efl.Text_Font.font_fallbacks { get; set; }
197 Efl.Text_Font.font_lang { get; set; } 198 Efl.Text_Font.font_lang { get; set; }
@@ -221,9 +222,9 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text,
221 Efl.Text_Format.ellipsis { get; set; } 222 Efl.Text_Format.ellipsis { get; set; }
222 Efl.Text_Format.wrap { get; set; } 223 Efl.Text_Format.wrap { get; set; }
223 Efl.Text_Format.multiline { get; set; } 224 Efl.Text_Format.multiline { get; set; }
224 Efl.Text_Format.halign { get; set; } 225 Efl.Text_Format.horizontal_align { get; set; }
225 Efl.Text_Format.halign_auto_type { get; set; } 226 Efl.Text_Format.horizontal_align_auto_type { get; set; }
226 Efl.Text_Format.valign { get; set; } 227 Efl.Text_Format.vertical_align { get; set; }
227 Efl.Text_Format.linegap { get; set; } 228 Efl.Text_Format.linegap { get; set; }
228 Efl.Text_Format.linerelgap { get; set; } 229 Efl.Text_Format.linerelgap { get; set; }
229 Efl.Text_Format.tabstops { get; set; } 230 Efl.Text_Format.tabstops { get; set; }
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index e8eafca..228aafb 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -450,52 +450,64 @@ _evas_text_font_reload(Eo *eo_obj, Evas_Text_Data *o)
450} 450}
451 451
452EOLIAN static void 452EOLIAN static void
453_evas_text_efl_text_font_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_Size size) 453_evas_text_efl_text_font_font_family_set(Eo *eo_obj, Evas_Text_Data *o, const char *font)
454{ 454{
455 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 455 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
456 Evas_Font_Description *fdesc; 456 Evas_Font_Description *fdesc;
457 457
458 if (!font && size <= 0) return; 458 EINA_SAFETY_ON_NULL_RETURN(font);
459 459
460 evas_object_async_block(obj); 460 evas_object_async_block(obj);
461 if ((size == o->cur.size) && 461 if (eina_streq(font, o->cur.font)) return;
462 (o->cur.font && font && !strcmp(font, o->cur.font))) return;
463 462
464 if (font) 463 /* We can't assume the given font is same with current fdesc by comparing string.
465 { 464 Since Evas starts to supporting "auto" for language,
466 /* We can't assume the given font is same with current fdesc by comparing string. 465 the given font string should be parsed once before comparing it. */
467 Since Evas starts to supporting "auto" for language, 466 fdesc = evas_font_desc_new();
468 the given font string should be parsed once before comparing it. */
469 fdesc = evas_font_desc_new();
470
471 /* Set default language according to locale. */
472 eina_stringshare_replace(&(fdesc->lang), evas_font_lang_normalize("auto"));
473 evas_font_name_parse(fdesc, font);
474 467
475 if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) && 468 /* Set default language according to locale. */
476 (size == o->cur.size)) 469 eina_stringshare_replace(&(fdesc->lang), evas_font_lang_normalize("auto"));
477 { 470 evas_font_name_parse(fdesc, font);
478 evas_font_desc_unref(fdesc);
479 return;
480 }
481 471
482 if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc); 472 if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc))
483 o->cur.fdesc = fdesc; 473 {
484 eina_stringshare_replace(&o->cur.font, font); 474 evas_font_desc_unref(fdesc);
485 o->prev.font = NULL; 475 return;
486 } 476 }
487 477
488 if ( size > 0 ) 478 if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc);
489 o->cur.size = size; 479 o->cur.fdesc = fdesc;
480 eina_stringshare_replace(&o->cur.font, font);
481 o->prev.font = NULL;
490 482
491 _evas_text_font_reload(eo_obj, o); 483 _evas_text_font_reload(eo_obj, o);
492} 484}
493 485
486EOLIAN static const char *
487_evas_text_efl_text_font_font_family_get(const Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
488{
489 return o->cur.font;
490}
491
494EOLIAN static void 492EOLIAN static void
495_evas_text_efl_text_font_font_get(const Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char **font, Evas_Font_Size *size) 493_evas_text_efl_text_font_font_size_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Font_Size size)
496{ 494{
497 if (font) *font = o->cur.font; 495 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
498 if (size) *size = o->cur.size; 496
497 EINA_SAFETY_ON_TRUE_RETURN(size <= 0);
498 if (size == o->cur.size) return;
499
500 evas_object_async_block(obj);
501
502 o->cur.size = size;
503
504 _evas_text_font_reload(eo_obj, o);
505}
506
507EOLIAN static Evas_Font_Size
508_evas_text_efl_text_font_font_size_get(const Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
509{
510 return o->cur.size;
499} 511}
500 512
501static void 513static void
@@ -1043,7 +1055,8 @@ _evas_text_efl_object_dbg_info_get(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED, Ef
1043 1055
1044 const char *text; 1056 const char *text;
1045 int size; 1057 int size;
1046 efl_text_font_get(eo_obj, &text, &size); 1058 text = efl_text_font_family_get(eo_obj);
1059 size = efl_text_font_size_get(eo_obj);
1047 EFL_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text); 1060 EFL_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
1048 EFL_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size); 1061 EFL_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
1049 1062
@@ -2200,6 +2213,8 @@ _evas_text_efl_gfx_entity_scale_set(Evas_Object *eo_obj, Evas_Text_Data *o,
2200 font = eina_stringshare_add(o->cur.font); 2213 font = eina_stringshare_add(o->cur.font);
2201 size = o->cur.size; 2214 size = o->cur.size;
2202 if (o->cur.font) eina_stringshare_del(o->cur.font); 2215 if (o->cur.font) eina_stringshare_del(o->cur.font);
2216 if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc);
2217 o->cur.fdesc = NULL;
2203 o->cur.font = NULL; 2218 o->cur.font = NULL;
2204 o->prev.font = NULL; 2219 o->prev.font = NULL;
2205 o->cur.size = 0; 2220 o->cur.size = 0;
@@ -2336,14 +2351,19 @@ evas_object_text_font_source_get(const Eo *obj)
2336EAPI void 2351EAPI void
2337evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size) 2352evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size)
2338{ 2353{
2339 if (!font || size <= 0) return; /*Condition for legacy object*/ 2354 /*Condition for legacy object*/
2340 efl_text_font_set((Eo *) obj, font, size); 2355 EINA_SAFETY_ON_NULL_RETURN(font);
2356 EINA_SAFETY_ON_TRUE_RETURN(size <= 0);
2357
2358 efl_text_font_family_set((Eo *) obj, font);
2359 efl_text_font_size_set((Eo *) obj, size);
2341} 2360}
2342 2361
2343EAPI void 2362EAPI void
2344evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size) 2363evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size)
2345{ 2364{
2346 efl_text_font_get((Eo *) obj, font, size); 2365 if (font) *font = efl_text_font_family_get((Eo *) obj);
2366 if (size) *size = efl_text_font_size_get((Eo *) obj);
2347} 2367}
2348 2368
2349EAPI void 2369EAPI void
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 8b63713..75c4be5 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -15971,20 +15971,16 @@ _canvas_text_format_changed(Eo *eo_obj, Efl_Canvas_Text_Data *o)
15971/* Efl.Text.Font interface implementation */ 15971/* Efl.Text.Font interface implementation */
15972 15972
15973static void 15973static void
15974_efl_canvas_text_efl_text_font_font_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, const char *font EINA_UNUSED, int size EINA_UNUSED) 15974_efl_canvas_text_efl_text_font_font_family_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, const char *font)
15975{ 15975{
15976 ASYNC_BLOCK; 15976 ASYNC_BLOCK;
15977 Eina_Bool changed = EINA_FALSE; 15977 Eina_Bool changed = EINA_FALSE;
15978 15978
15979 Eina_Stringshare *nfont; 15979 Eina_Stringshare *nfont;
15980 15980
15981 if (size > 0 && o->default_format.info.size != size) 15981 EINA_SAFETY_ON_NULL_RETURN(font);
15982 {
15983 o->default_format.info.size = size;
15984 changed = EINA_TRUE;
15985 }
15986 15982
15987 if (font && o->default_format.info.font != font) 15983 if (_FMT_INFO(font) != font && !eina_streq(_FMT_INFO(font), font))
15988 { 15984 {
15989 nfont = eina_stringshare_add(font); 15985 nfont = eina_stringshare_add(font);
15990 if (nfont == _FMT_INFO(font)) 15986 if (nfont == _FMT_INFO(font))
@@ -16006,11 +16002,28 @@ _efl_canvas_text_efl_text_font_font_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Dat
16006 } 16002 }
16007} 16003}
16008 16004
16005static const char *
16006_efl_canvas_text_efl_text_font_font_family_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o)
16007{
16008 return o->default_format.info.font;
16009}
16010
16009static void 16011static void
16010_efl_canvas_text_efl_text_font_font_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, const char **font EINA_UNUSED, int *size EINA_UNUSED) 16012_efl_canvas_text_efl_text_font_font_size_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o, int size)
16013{
16014 ASYNC_BLOCK;
16015 EINA_SAFETY_ON_FALSE_RETURN(size > 0);
16016 if (o->default_format.info.size != size)
16017 {
16018 o->default_format.info.size = size;
16019 _canvas_text_format_changed(obj, o);
16020 }
16021}
16022
16023static Efl_Font_Size
16024_efl_canvas_text_efl_text_font_font_size_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o)
16011{ 16025{
16012 if (font) *font = o->default_format.info.font; 16026 return o->default_format.info.size;
16013 if (size) *size = o->default_format.info.size;
16014} 16027}
16015 16028
16016static void 16029static void
@@ -16583,7 +16596,7 @@ _efl_canvas_text_efl_text_format_multiline_get(const Eo *obj EINA_UNUSED, Efl_Ca
16583} 16596}
16584 16597
16585static void 16598static void
16586_efl_canvas_text_efl_text_format_halign_auto_type_set(Eo *obj, Efl_Canvas_Text_Data *o, Efl_Text_Format_Horizontal_Alignment_Auto_Type type) 16599_efl_canvas_text_efl_text_format_horizontal_align_auto_type_set(Eo *obj, Efl_Canvas_Text_Data *o, Efl_Text_Format_Horizontal_Alignment_Auto_Type type)
16587{ 16600{
16588 ASYNC_BLOCK; 16601 ASYNC_BLOCK;
16589 if (type == EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_NONE) 16602 if (type == EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_NONE)
@@ -16605,7 +16618,7 @@ _efl_canvas_text_efl_text_format_halign_auto_type_set(Eo *obj, Efl_Canvas_Text_D
16605} 16618}
16606 16619
16607static Efl_Text_Format_Horizontal_Alignment_Auto_Type 16620static Efl_Text_Format_Horizontal_Alignment_Auto_Type
16608_efl_canvas_text_efl_text_format_halign_auto_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o) 16621_efl_canvas_text_efl_text_format_horizontal_align_auto_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o)
16609{ 16622{
16610 Efl_Text_Format_Horizontal_Alignment_Auto_Type ret = 16623 Efl_Text_Format_Horizontal_Alignment_Auto_Type ret =
16611 EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_NONE; 16624 EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_NONE;
@@ -16626,7 +16639,7 @@ _efl_canvas_text_efl_text_format_halign_auto_type_get(const Eo *obj EINA_UNUSED,
16626} 16639}
16627 16640
16628static void 16641static void
16629_efl_canvas_text_efl_text_format_halign_set(Eo *obj, Efl_Canvas_Text_Data *o, 16642_efl_canvas_text_efl_text_format_horizontal_align_set(Eo *obj, Efl_Canvas_Text_Data *o,
16630 double value) 16643 double value)
16631{ 16644{
16632 ASYNC_BLOCK; 16645 ASYNC_BLOCK;
@@ -16636,13 +16649,13 @@ _efl_canvas_text_efl_text_format_halign_set(Eo *obj, Efl_Canvas_Text_Data *o,
16636} 16649}
16637 16650
16638static double 16651static double
16639_efl_canvas_text_efl_text_format_halign_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED) 16652_efl_canvas_text_efl_text_format_horizontal_align_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED)
16640{ 16653{
16641 return _FMT(halign); 16654 return _FMT(halign);
16642} 16655}
16643 16656
16644static void 16657static void
16645_efl_canvas_text_efl_text_format_valign_set(Eo *obj, Efl_Canvas_Text_Data *o, 16658_efl_canvas_text_efl_text_format_vertical_align_set(Eo *obj, Efl_Canvas_Text_Data *o,
16646 double value) 16659 double value)
16647{ 16660{
16648 ASYNC_BLOCK; 16661 ASYNC_BLOCK;
@@ -16654,7 +16667,7 @@ _efl_canvas_text_efl_text_format_valign_set(Eo *obj, Efl_Canvas_Text_Data *o,
16654} 16667}
16655 16668
16656static double 16669static double
16657_efl_canvas_text_efl_text_format_valign_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED) 16670_efl_canvas_text_efl_text_format_vertical_align_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED)
16658{ 16671{
16659 return o->valign; 16672 return o->valign;
16660} 16673}
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index 2b3b97c..e736096 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -1192,16 +1192,14 @@ _evas_textgrid_font_reload(Eo *eo_obj, Evas_Textgrid_Data *o)
1192} 1192}
1193 1193
1194EOLIAN static void 1194EOLIAN static void
1195_evas_textgrid_efl_text_font_font_set(Eo *eo_obj, 1195_evas_textgrid_efl_text_font_font_family_set(Eo *eo_obj,
1196 Evas_Textgrid_Data *o, 1196 Evas_Textgrid_Data *o,
1197 const char *font_name, 1197 const char *font_name)
1198 Evas_Font_Size font_size)
1199{ 1198{
1200 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 1199 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
1201 Evas_Font_Description *fdesc; 1200 Evas_Font_Description *fdesc;
1202 1201
1203 if ((!font_name) || (!*font_name) || (font_size <= 0)) 1202 EINA_SAFETY_ON_TRUE_RETURN((!font_name) || (!*font_name));
1204 return;
1205 1203
1206 evas_object_async_block(obj); 1204 evas_object_async_block(obj);
1207 fdesc = evas_font_desc_new(); 1205 fdesc = evas_font_desc_new();
@@ -1210,8 +1208,7 @@ _evas_textgrid_efl_text_font_font_set(Eo *eo_obj,
1210 evas_font_lang_normalize("auto")); 1208 evas_font_lang_normalize("auto"));
1211 evas_font_name_parse(fdesc, font_name); 1209 evas_font_name_parse(fdesc, font_name);
1212 if (o->cur.font_description_normal && 1210 if (o->cur.font_description_normal &&
1213 !evas_font_desc_cmp(fdesc, o->cur.font_description_normal) && 1211 !evas_font_desc_cmp(fdesc, o->cur.font_description_normal))
1214 (font_size == o->cur.font_size))
1215 { 1212 {
1216 evas_font_desc_unref(fdesc); 1213 evas_font_desc_unref(fdesc);
1217 return; 1214 return;
@@ -1221,7 +1218,6 @@ _evas_textgrid_efl_text_font_font_set(Eo *eo_obj,
1221 evas_font_desc_unref(o->cur.font_description_normal); 1218 evas_font_desc_unref(o->cur.font_description_normal);
1222 o->cur.font_description_normal = fdesc; 1219 o->cur.font_description_normal = fdesc;
1223 1220
1224 o->cur.font_size = font_size;
1225 eina_stringshare_replace(&o->cur.font_name, font_name); 1221 eina_stringshare_replace(&o->cur.font_name, font_name);
1226 o->prev.font_name = NULL; 1222 o->prev.font_name = NULL;
1227 1223
@@ -1229,9 +1225,28 @@ _evas_textgrid_efl_text_font_font_set(Eo *eo_obj,
1229} 1225}
1230 1226
1231EOLIAN static void 1227EOLIAN static void
1232_evas_textgrid_efl_text_font_font_get(const Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, const char **font_name, Evas_Font_Size *font_size) 1228_evas_textgrid_efl_text_font_font_family_get(const Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, const char **font_name)
1233{ 1229{
1234 if (font_name) *font_name = o->cur.font_name; 1230 if (font_name) *font_name = o->cur.font_name;
1231}
1232
1233EOLIAN static void
1234_evas_textgrid_efl_text_font_font_size_set(Eo *eo_obj,
1235 Evas_Textgrid_Data *o,
1236 Evas_Font_Size font_size)
1237{
1238 EINA_SAFETY_ON_TRUE_RETURN(font_size <= 0);
1239
1240 if (font_size == o->cur.font_size) return;
1241
1242 o->cur.font_size = font_size;
1243
1244 _evas_textgrid_font_reload(eo_obj, o);
1245}
1246
1247EOLIAN static void
1248_evas_textgrid_efl_text_font_font_size_get(const Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, Evas_Font_Size *font_size)
1249{
1235 if (font_size) *font_size = o->cur.font_size; 1250 if (font_size) *font_size = o->cur.font_size;
1236} 1251}
1237 1252
@@ -1442,7 +1457,8 @@ _evas_textgrid_efl_object_dbg_info_get(Eo *eo_obj, Evas_Textgrid_Data *o EINA_UN
1442 1457
1443 const char *text; 1458 const char *text;
1444 int size; 1459 int size;
1445 efl_text_font_get(eo_obj, &text, &size); 1460 text = efl_text_font_family_get(eo_obj);
1461 size = efl_text_font_size_get(eo_obj);
1446 EFL_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text); 1462 EFL_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
1447 EFL_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size); 1463 EFL_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
1448 1464
@@ -1475,13 +1491,15 @@ evas_object_textgrid_font_source_get(const Eo *obj)
1475EAPI void 1491EAPI void
1476evas_object_textgrid_font_set(Eo *obj, const char *font_name, Evas_Font_Size font_size) 1492evas_object_textgrid_font_set(Eo *obj, const char *font_name, Evas_Font_Size font_size)
1477{ 1493{
1478 efl_text_font_set((Eo *) obj, font_name, font_size); 1494 efl_text_font_family_set((Eo *) obj, font_name);
1495 efl_text_font_size_set((Eo *) obj, font_size);
1479} 1496}
1480 1497
1481EAPI void 1498EAPI void
1482evas_object_textgrid_font_get(const Eo *obj, const char **font_name, Evas_Font_Size *font_size) 1499evas_object_textgrid_font_get(const Eo *obj, const char **font_name, Evas_Font_Size *font_size)
1483{ 1500{
1484 efl_text_font_get((Eo *) obj, font_name, font_size); 1501 if (font_name) *font_name = efl_text_font_family_get((Eo *) obj);
1502 if (font_size) *font_size = efl_text_font_size_get((Eo *) obj);
1485} 1503}
1486 1504
1487EOLIAN static void 1505EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_text_eo.c b/src/lib/evas/canvas/evas_text_eo.c
index 9285d46..0dde4eb 100644
--- a/src/lib/evas/canvas/evas_text_eo.c
+++ b/src/lib/evas/canvas/evas_text_eo.c
@@ -252,8 +252,10 @@ _evas_text_class_initializer(Efl_Class *klass)
252 EFL_OBJECT_OP_FUNC(efl_gfx_entity_scale_set, _evas_text_efl_gfx_entity_scale_set), 252 EFL_OBJECT_OP_FUNC(efl_gfx_entity_scale_set, _evas_text_efl_gfx_entity_scale_set),
253 EFL_OBJECT_OP_FUNC(efl_text_set, _evas_text_efl_text_text_set), 253 EFL_OBJECT_OP_FUNC(efl_text_set, _evas_text_efl_text_text_set),
254 EFL_OBJECT_OP_FUNC(efl_text_get, _evas_text_efl_text_text_get), 254 EFL_OBJECT_OP_FUNC(efl_text_get, _evas_text_efl_text_text_get),
255 EFL_OBJECT_OP_FUNC(efl_text_font_set, _evas_text_efl_text_font_font_set), 255 EFL_OBJECT_OP_FUNC(efl_text_font_family_set, _evas_text_efl_text_font_font_family_set),
256 EFL_OBJECT_OP_FUNC(efl_text_font_get, _evas_text_efl_text_font_font_get), 256 EFL_OBJECT_OP_FUNC(efl_text_font_family_get, _evas_text_efl_text_font_font_family_get),
257 EFL_OBJECT_OP_FUNC(efl_text_font_size_set, _evas_text_efl_text_font_font_size_set),
258 EFL_OBJECT_OP_FUNC(efl_text_font_size_get, _evas_text_efl_text_font_font_size_get),
257 EFL_OBJECT_OP_FUNC(efl_text_font_source_set, _evas_text_efl_text_font_font_source_set), 259 EFL_OBJECT_OP_FUNC(efl_text_font_source_set, _evas_text_efl_text_font_font_source_set),
258 EFL_OBJECT_OP_FUNC(efl_text_font_source_get, _evas_text_efl_text_font_font_source_get), 260 EFL_OBJECT_OP_FUNC(efl_text_font_source_get, _evas_text_efl_text_font_font_source_get),
259 EFL_OBJECT_OP_FUNC(efl_text_font_bitmap_scalable_set, _evas_text_efl_text_font_font_bitmap_scalable_set), 261 EFL_OBJECT_OP_FUNC(efl_text_font_bitmap_scalable_set, _evas_text_efl_text_font_font_bitmap_scalable_set),
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.c b/src/lib/evas/canvas/evas_textgrid_eo.c
index ae3d07e..ce49c06 100644
--- a/src/lib/evas/canvas/evas_textgrid_eo.c
+++ b/src/lib/evas/canvas/evas_textgrid_eo.c
@@ -45,10 +45,16 @@ Efl_Object *_evas_textgrid_efl_object_constructor(Eo *obj, Evas_Textgrid_Data *p
45void _evas_textgrid_efl_object_destructor(Eo *obj, Evas_Textgrid_Data *pd); 45void _evas_textgrid_efl_object_destructor(Eo *obj, Evas_Textgrid_Data *pd);
46 46
47 47
48void _evas_textgrid_efl_text_font_font_set(Eo *obj, Evas_Textgrid_Data *pd, const char *font, Efl_Font_Size size); 48void _evas_textgrid_efl_text_font_font_family_set(Eo *obj, Evas_Textgrid_Data *pd, const char *font);
49 49
50 50
51void _evas_textgrid_efl_text_font_font_get(const Eo *obj, Evas_Textgrid_Data *pd, const char **font, Efl_Font_Size *size); 51void _evas_textgrid_efl_text_font_font_family_get(const Eo *obj, Evas_Textgrid_Data *pd, const char **font);
52
53
54void _evas_textgrid_efl_text_font_font_size_set(Eo *obj, Evas_Textgrid_Data *pd, Efl_Font_Size size);
55
56
57void _evas_textgrid_efl_text_font_font_size_get(const Eo *obj, Evas_Textgrid_Data *pd, Efl_Font_Size *size);
52 58
53 59
54void _evas_textgrid_efl_text_font_font_source_set(Eo *obj, Evas_Textgrid_Data *pd, const char *font_source); 60void _evas_textgrid_efl_text_font_font_source_set(Eo *obj, Evas_Textgrid_Data *pd, const char *font_source);
@@ -90,8 +96,10 @@ _evas_textgrid_class_initializer(Efl_Class *klass)
90 EFL_OBJECT_OP_FUNC(evas_obj_textgrid_palette_get, _evas_textgrid_palette_get), 96 EFL_OBJECT_OP_FUNC(evas_obj_textgrid_palette_get, _evas_textgrid_palette_get),
91 EFL_OBJECT_OP_FUNC(efl_constructor, _evas_textgrid_efl_object_constructor), 97 EFL_OBJECT_OP_FUNC(efl_constructor, _evas_textgrid_efl_object_constructor),
92 EFL_OBJECT_OP_FUNC(efl_destructor, _evas_textgrid_efl_object_destructor), 98 EFL_OBJECT_OP_FUNC(efl_destructor, _evas_textgrid_efl_object_destructor),
93 EFL_OBJECT_OP_FUNC(efl_text_font_set, _evas_textgrid_efl_text_font_font_set), 99 EFL_OBJECT_OP_FUNC(efl_text_font_family_set, _evas_textgrid_efl_text_font_font_family_set),
94 EFL_OBJECT_OP_FUNC(efl_text_font_get, _evas_textgrid_efl_text_font_font_get), 100 EFL_OBJECT_OP_FUNC(efl_text_font_family_get, _evas_textgrid_efl_text_font_font_family_get),
101 EFL_OBJECT_OP_FUNC(efl_text_font_size_set, _evas_textgrid_efl_text_font_font_size_set),
102 EFL_OBJECT_OP_FUNC(efl_text_font_size_get, _evas_textgrid_efl_text_font_font_size_get),
95 EFL_OBJECT_OP_FUNC(efl_text_font_source_set, _evas_textgrid_efl_text_font_font_source_set), 103 EFL_OBJECT_OP_FUNC(efl_text_font_source_set, _evas_textgrid_efl_text_font_font_source_set),
96 EFL_OBJECT_OP_FUNC(efl_text_font_source_get, _evas_textgrid_efl_text_font_font_source_get), 104 EFL_OBJECT_OP_FUNC(efl_text_font_source_get, _evas_textgrid_efl_text_font_font_source_get),
97 EFL_OBJECT_OP_FUNC(efl_text_font_bitmap_scalable_set, _evas_textgrid_efl_text_font_font_bitmap_scalable_set), 105 EFL_OBJECT_OP_FUNC(efl_text_font_bitmap_scalable_set, _evas_textgrid_efl_text_font_font_bitmap_scalable_set),
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.h b/src/lib/evas/canvas/evas_textgrid_eo.h
index 3eac6dc..0b88b67 100644
--- a/src/lib/evas/canvas/evas_textgrid_eo.h
+++ b/src/lib/evas/canvas/evas_textgrid_eo.h
@@ -119,7 +119,7 @@ EOAPI void evas_obj_textgrid_grid_size_get(const Eo *obj, int *w, int *h);
119 * the textgrid object. @c width and @c height can be @c null. On error, they 119 * the textgrid object. @c width and @c height can be @c null. On error, they
120 * are set to 0. 120 * are set to 0.
121 * 121 *
122 * See also @ref efl_text_font_set and 122 * See also @ref efl_text_font_size_set, @ref efl_text_font_family_set and
123 * @ref evas_obj_textgrid_supported_font_styles_set 123 * @ref evas_obj_textgrid_supported_font_styles_set
124 * 124 *
125 * @param[in] obj The object. 125 * @param[in] obj The object.
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.legacy.h b/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
index 9a99ce2..379747e 100644
--- a/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
@@ -112,7 +112,7 @@ EAPI void evas_object_textgrid_size_get(const Evas_Textgrid *obj, int *w, int *h
112 * the textgrid object. @c width and @c height can be @c null. On error, they 112 * the textgrid object. @c width and @c height can be @c null. On error, they
113 * are set to 0. 113 * are set to 0.
114 * 114 *
115 * See also @ref Efl.Text_Font.font.set and 115 * See also @ref efl_text_font_size_set, @ref efl_text_font_family_set and
116 * @ref evas_object_textgrid_supported_font_styles_set 116 * @ref evas_object_textgrid_supported_font_styles_set
117 * 117 *
118 * @param[in] obj The object. 118 * @param[in] obj The object.
diff --git a/src/tests/edje/edje_test_text.c b/src/tests/edje/edje_test_text.c
index 45ef800..fc5e67a 100644
--- a/src/tests/edje/edje_test_text.c
+++ b/src/tests/edje/edje_test_text.c
@@ -161,7 +161,8 @@ START_TEST(edje_test_text_font)
161 efl_file_key_set(layout, "test"); 161 efl_file_key_set(layout, "test");
162 ck_assert(!efl_file_load(layout)); 162 ck_assert(!efl_file_load(layout));
163 163
164 efl_text_font_set(efl_part(layout, "text"), "Sans", 14); 164 efl_text_font_family_set(efl_part(layout, "text"), "Sans");
165 efl_text_font_size_set(efl_part(layout, "text"), 14);
165 166
166} 167}
167END_TEST 168END_TEST
@@ -288,7 +289,8 @@ _basic_check(Eo *layout, Eina_Bool set)
288 { 289 {
289 efl_text_wrap_set(efl_part(layout, "text"), EFL_TEXT_FORMAT_WRAP_WORD); 290 efl_text_wrap_set(efl_part(layout, "text"), EFL_TEXT_FORMAT_WRAP_WORD);
290 efl_text_ellipsis_set(efl_part(layout, "text"), 1.0); 291 efl_text_ellipsis_set(efl_part(layout, "text"), 1.0);
291 efl_text_font_set(efl_part(layout, "text"), "Sans", 12); 292 efl_text_font_family_set(efl_part(layout, "text"), "Sans");
293 efl_text_font_size_set(efl_part(layout, "text"), 12);
292 } 294 }
293 295
294 wrap = efl_text_wrap_get(efl_part(layout, "text")); 296 wrap = efl_text_wrap_get(efl_part(layout, "text"));
@@ -297,7 +299,8 @@ _basic_check(Eo *layout, Eina_Bool set)
297 ellipsis = efl_text_ellipsis_get(efl_part(layout, "text")); 299 ellipsis = efl_text_ellipsis_get(efl_part(layout, "text"));
298 ck_assert(EINA_DBL_EQ(ellipsis, 1.0)); 300 ck_assert(EINA_DBL_EQ(ellipsis, 1.0));
299 301
300 efl_text_font_get(efl_part(layout, "text"), &font, &size); 302 font = efl_text_font_family_get(efl_part(layout, "text"));
303 size = efl_text_font_size_get(efl_part(layout, "text"));
301 ck_assert_str_eq(font, "Sans"); 304 ck_assert_str_eq(font, "Sans");
302 ck_assert_int_eq(size, 12); 305 ck_assert_int_eq(size, 12);
303 } 306 }
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index 353ad62..f23d8b8 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -4528,20 +4528,27 @@ EFL_START_TEST(efl_text_font)
4528 4528
4529 const char * font; 4529 const char * font;
4530 int font_size; 4530 int font_size;
4531 efl_text_font_set(txt, "Sans", 20); 4531 efl_text_font_family_set(txt, "Sans");
4532 efl_text_font_set(txt, NULL, 0); 4532 efl_text_font_size_set(txt, 20);
4533 efl_text_font_family_set(txt, NULL);
4534 efl_text_font_size_set(txt, 0);
4533 4535
4534 efl_text_font_get(txt, &font, &font_size); 4536 font = efl_text_font_family_get(txt);
4537 font_size = efl_text_font_size_get(txt);
4535 fail_if(20 != font_size); 4538 fail_if(20 != font_size);
4536 fail_if(strcmp(font,"Sans")); 4539 fail_if(strcmp(font,"Sans"));
4537 4540
4538 efl_text_font_set(txt, NULL, 30); 4541 efl_text_font_family_set(txt, NULL);
4539 efl_text_font_get(txt, &font, &font_size); 4542 efl_text_font_size_set(txt, 30);
4543 font = efl_text_font_family_get(txt);
4544 font_size = efl_text_font_size_get(txt);
4540 fail_if(30 != font_size); 4545 fail_if(30 != font_size);
4541 fail_if(strcmp(font,"Sans")); 4546 fail_if(strcmp(font,"Sans"));
4542 4547
4543 efl_text_font_set(txt, "arial", 0); 4548 efl_text_font_family_set(txt, "arial");
4544 efl_text_font_get(txt, &font, &font_size); 4549 efl_text_font_size_set(txt, 0);
4550 font = efl_text_font_family_get(txt);
4551 font_size = efl_text_font_size_get(txt);
4545 fail_if(30 != font_size); 4552 fail_if(30 != font_size);
4546 fail_if(strcmp(font,"arial")); 4553 fail_if(strcmp(font,"arial"));
4547 4554