diff options
-rw-r--r-- | src/lib/elm_config.c | 22 | ||||
-rw-r--r-- | src/lib/elm_config.h | 14 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index 193ec6be7..e4b72daae 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -2660,6 +2660,28 @@ elm_config_cache_image_cache_size_set(int size) _elm_recache(); } +EAPI void +elm_config_font_hint_type_set(int type) +{ + Eina_List *l; + Evas_Object *win; + + if ((type < 0) || (type > 2)) return; + _elm_config->font_hinting = type; + + EINA_LIST_FOREACH(_elm_win_list, l, win) + { + Evas *e = evas_object_evas_get(win); + + if (!_elm_config->font_hinting) + evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE); + else if (_elm_config->font_hinting == 1) + evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO); + else if (_elm_config->font_hinting == 2) + evas_font_hinting_set(e, EVAS_FONT_HINTING_BYTECODE); + } +} + EAPI int elm_config_cache_edje_file_cache_size_get() { diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h index 58d23df56..ae16b4dc4 100644 --- a/src/lib/elm_config.h +++ b/src/lib/elm_config.h @@ -1024,6 +1024,20 @@ EAPI void elm_config_font_overlay_unset(const char *text_class); EAPI void elm_config_font_overlay_apply(void); /** + * Apply the specified font hinting type. + * EVAS_FONT_HINTING_NONE < No font hinting + * EVAS_FONT_HINTING_AUTO < Automatic font hinting + * EVAS_FONT_HINTING_BYTECODE < Bytecode font hinting + * + * @ingroup Fonts + * + * This applies font hint changes to all windows of the current application. + * + * @since 1.13 + */ +EAPI void elm_config_font_hint_type_set(int type); + +/** * Get the configured "finger size" * * @return The finger size |