summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/efl-config.spec2
-rw-r--r--src/efl_config.c58
2 files changed, 59 insertions, 1 deletions
diff --git a/packaging/efl-config.spec b/packaging/efl-config.spec
index 23c6038..eb4bfcc 100644
--- a/packaging/efl-config.spec
+++ b/packaging/efl-config.spec
@@ -24,7 +24,7 @@ EFL config daemon
cp %{SOURCE2} .
%build
-export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT -Wno-int-conversion"
./autogen.sh
TZ_SYS_BIN=%{TZ_SYS_BIN} ./configure --prefix %{_prefix}/
diff --git a/src/efl_config.c b/src/efl_config.c
index 50fd3ca..6c4ec3b 100644
--- a/src/efl_config.c
+++ b/src/efl_config.c
@@ -164,6 +164,64 @@ _font_set(const char *font_name, int font_size)
text_classes = NULL;
elm_config_font_overlay_apply();
+
+ //TIZEN_ONLY(20200324): EXTENSION_THEME
+ tizen_profile_t prof = get_tizen_profile();
+ if (prof != TIZEN_PROFILE_WEARABLE)
+ {
+ return;
+ }
+
+ extern Eina_List* _elm_config_extension_font_overlay_get(const char* theme_name);
+ extern Eina_Bool _elm_config_extension_font_overlay_set(const Eina_List* list, const char* theme_name);
+
+ static const char* scalable_text_classes[] = {
+ "T0211", "T0211D", "T0211P", "T0211S", "T071", "T092", "T097", NULL
+ };
+
+ Eina_List* ext_font_overlays = _elm_config_extension_font_overlay_get("default");
+ if (ext_font_overlays)
+ {
+ static Eina_Hash *scalable_font_hash = NULL;
+ if (!scalable_font_hash)
+ {
+ scalable_font_hash = eina_hash_string_small_new(NULL);
+ for (int i = 0; scalable_text_classes[i]; ++i)
+ {
+ eina_hash_add(scalable_font_hash, scalable_text_classes[i], EINA_TRUE);
+ }
+ }
+
+ char buf[128] = {0,};
+ Eina_List *l = NULL;
+ Elm_Font_Overlay *efd = NULL;
+ EINA_LIST_FOREACH(ext_font_overlays, l, efd)
+ {
+ char *p = strchr(efd->font, ':');
+ snprintf(buf, sizeof(buf), "%s%s", font_name, p);
+ eina_stringshare_replace(&efd->font, buf);
+
+ if (eina_hash_find(scalable_font_hash, efd->text_class))
+ {
+ efd->size = font_size;
+ }
+ }
+ if (scalable_font_hash)
+ eina_hash_free(scalable_font_hash);
+ scalable_font_hash = NULL;
+
+ Eina_Bool res = _elm_config_extension_font_overlay_set(ext_font_overlays, "default");
+ EINA_LOG_DBG("efl-config :: result of set font overlay [%d]", res);
+
+ EINA_LIST_FREE(ext_font_overlays, efd)
+ {
+ eina_stringshare_del(efd->text_class);
+ eina_stringshare_del(efd->font);
+ free(efd);
+ }
+ ext_font_overlays = eina_list_free(ext_font_overlays);
+ }
+ //
}
static Eina_Bool