summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-09-25 15:05:01 +0100
committerTom Hacohen <tom@stosb.com>2013-09-25 15:07:39 +0100
commitf03148f9e327b4542ef426e1db6841cc251e6569 (patch)
tree41224f7eef4eab80dad5c2b121659088e3a7a864
parentbaf018d659548b6ee6265a2d6a05d04f8bf0fb14 (diff)
Evas font: Fixed evas_font_path_* functions to apply to fontconfig.
Until now those were only used for custom fonts, and not for fontconfig searches. With this commit, fontconfig will also start looking in those dirs.
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/evas/canvas/evas_font_dir.c11
3 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 68b31c42ea..08204e8c6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
12013-09-25 Tom Hacohen 12013-09-25 Tom Hacohen
2 2
3 * Evas font: Make the evas_font_path_* functions apply to fontconfig searches.
4
52013-09-25 Tom Hacohen
6
3 * Evas font: Use our own fontconfig configuration so we don't get 7 * Evas font: Use our own fontconfig configuration so we don't get
4 affected by changes made to the default fontconfig configuration. 8 affected by changes made to the default fontconfig configuration.
5 9
diff --git a/NEWS b/NEWS
index 7507263a63..0dd45afb49 100644
--- a/NEWS
+++ b/NEWS
@@ -68,6 +68,7 @@ Additions:
68 - textblock: Make the ellipsis format the same as the surrounding. 68 - textblock: Make the ellipsis format the same as the surrounding.
69 - Add interceptor for focus_set. 69 - Add interceptor for focus_set.
70 - Evas font: Use our own fontconfig configuration so we don't get affected by changes made to the default fontconfig configuration. 70 - Evas font: Use our own fontconfig configuration so we don't get affected by changes made to the default fontconfig configuration.
71 - Evas font: Make the evas_font_path_* functions apply to fontconfig searches.
71 * Ecore_X: 72 * Ecore_X:
72 - Add window profile support. 73 - Add window profile support.
73 ECORE_X_ATOM_E_WINDOW_PROFILE_SUPPORTED 74 ECORE_X_ATOM_E_WINDOW_PROFILE_SUPPORTED
diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c
index 6ee9e81373..c990a548fd 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -1219,6 +1219,9 @@ _canvas_font_path_clear(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUS
1219 eina_stringshare_del(evas->font_path->data); 1219 eina_stringshare_del(evas->font_path->data);
1220 evas->font_path = eina_list_remove(evas->font_path, evas->font_path->data); 1220 evas->font_path = eina_list_remove(evas->font_path, evas->font_path->data);
1221 } 1221 }
1222
1223 if (fc_config)
1224 FcConfigAppFontClear(fc_config);
1222} 1225}
1223 1226
1224EAPI void 1227EAPI void
@@ -1237,6 +1240,10 @@ _canvas_font_path_append(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
1237 Evas_Public_Data *e = _pd; 1240 Evas_Public_Data *e = _pd;
1238 if (!path) return; 1241 if (!path) return;
1239 e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path)); 1242 e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
1243
1244 evas_font_init();
1245 if (fc_config)
1246 FcConfigAppFontAddDir(fc_config, (const FcChar8 *) path);
1240} 1247}
1241 1248
1242EAPI void 1249EAPI void
@@ -1255,6 +1262,10 @@ _canvas_font_path_prepend(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
1255 Evas_Public_Data *e = _pd; 1262 Evas_Public_Data *e = _pd;
1256 if (!path) return; 1263 if (!path) return;
1257 e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path)); 1264 e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
1265
1266 evas_font_init();
1267 if (fc_config)
1268 FcConfigAppFontAddDir(fc_config, (const FcChar8 *) path);
1258} 1269}
1259 1270
1260EAPI const Eina_List * 1271EAPI const Eina_List *