diff options
author | abdulleh Ghujeh <a.ghujeh@samsung.com> | 2019-11-28 13:14:15 +0900 |
---|---|---|
committer | WooHyun Jung <wh0705.jung@samsung.com> | 2019-11-28 13:14:15 +0900 |
commit | f6caca1d70b750dcb73329fabcd8da01876d7a2f (patch) | |
tree | 270e4e6349aade773e7c9b728d97299540aa82b3 /src/lib/evas/common/evas_font.h | |
parent | 2ca6c301e4ad75f9a58432db75215d1d29c73bd4 (diff) | |
download | efl-f6caca1d70b750dcb73329fabcd8da01876d7a2f.tar.gz |
Efl Canvas Text : Modify Style Property
Summary:
This patch defines the way style property will work at canvas_text object
1- Changing canvas_text style property using Font/Format/Style interfaces or with efl_canvas_text style property are the same.
Example:
```
efl_text_font_set(tb, "Arial", 30);
//is same as
efl_canvas_text_style_set(tb, "font=Arial font_size=30");
//which means calling
char * font;
int size;
int font_size;
efl_text_font_get(tb, &font, &size);
// calling this after any of the top two functions will return same result
```
2- style_get_property
Will return string that contains full details about all the current applied style at canvas_text level.
3- style_set_property
Will only override passed styles and leave everything else as it is
```
efl_canvas_text_style_set(tb, "font=Arial"); // overrider font name to Arial and leave everthing else
efl_canvas_text_style_set(tb, "font_size=30"); // overrider font size to 30 and leave everthing else (font name will stay arial)
```
Reviewers: ali.alzyod, woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Reviewed By: woohyun
Subscribers: zmike, bu5hm4n, segfaultxavi, a.srour, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10607
Diffstat (limited to 'src/lib/evas/common/evas_font.h')
-rw-r--r-- | src/lib/evas/common/evas_font.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/evas/common/evas_font.h b/src/lib/evas/common/evas_font.h index e16785520d..4588a31f0d 100644 --- a/src/lib/evas/common/evas_font.h +++ b/src/lib/evas/common/evas_font.h @@ -410,7 +410,8 @@ void evas_font_free(void *font); void evas_fonts_zero_free(); void evas_fonts_zero_pressure(); void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name); -int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style); +unsigned int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style); +const char *evas_font_style_find_str(int type, Evas_Font_Style style); Evas_Font_Description *evas_font_desc_new(void); Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc); void evas_font_desc_unref(Evas_Font_Description *fdesc); |