summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2014-10-30 16:24:11 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2014-10-30 16:24:43 -0400
commit07c424ebbdbd7de5ab0418b496a42d52c6068333 (patch)
tree1919d5998d4ea77c9331083ba626d353118ceb2d
parente01f11f51978eb36fa6abf506c032d07e8dfc2e3 (diff)
downloadelementary-devs/discomfitor/cfg.tar.gz
config font hinting api addeddevs/discomfitor/cfg
needed for e's internal use, not sure if worth exposing since there's an env variable
-rw-r--r--src/lib/elm_config.c22
-rw-r--r--src/lib/elm_config.h14
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