diff --git a/legacy/elementary/src/lib/elm_config.c b/legacy/elementary/src/lib/elm_config.c index 193ec6be75..e4b72daae0 100644 --- a/legacy/elementary/src/lib/elm_config.c +++ b/legacy/elementary/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/legacy/elementary/src/lib/elm_config.h b/legacy/elementary/src/lib/elm_config.h index 58d23df561..ae16b4dc4d 100644 --- a/legacy/elementary/src/lib/elm_config.h +++ b/legacy/elementary/src/lib/elm_config.h @@ -1023,6 +1023,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" *