tasn pushed a commit to branch efl-1.10. http://git.enlightenment.org/core/efl.git/commit/?id=9ede167f349d3fba9ac5b424c040790786570309
commit 9ede167f349d3fba9ac5b424c040790786570309 Author: Tom Hacohen <[email protected]> Date: Fri Jun 13 15:29:59 2014 +0100 Evas textblock: Fix issue with edje fonts not being used. The issue was within the fontconfig fallback mechanism and our cache. We used to just use the fontconfig fallback list, instead of also using the correct edje font. This can probably be improved a bit by not caching the fontconfig set, but cache a list of the filenames instead. This is more generic and will improve cache as well. Fixes T1331 @fix --- src/lib/evas/canvas/evas_font_dir.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c index 1eed53a..0298aea 100644 --- a/src/lib/evas/canvas/evas_font_dir.c +++ b/src/lib/evas/canvas/evas_font_dir.c @@ -36,6 +36,8 @@ struct _Fndat #ifdef HAVE_FONTCONFIG FcFontSet *set; FcPattern *p_nm; + + Eina_Bool file_font : 1; /* Indicates this is a font that uses a file rather than fontconfig. */ #endif }; @@ -523,6 +525,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, #ifdef HAVE_FONTCONFIG FcPattern *p_nm = NULL; FcFontSet *set = NULL; + Eina_Bool file_font = EINA_FALSE; #endif Evas_Font_Set *font = NULL; @@ -559,7 +562,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, return fd->font; } #ifdef HAVE_FONTCONFIG - else if (fd->set && fd->p_nm) + else if (fd->set && fd->p_nm && !fd->file_font) { found_fd = fd; } @@ -592,7 +595,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, return fd->font; } #ifdef HAVE_FONTCONFIG - else if (fd->set && fd->p_nm) + else if (fd->set && fd->p_nm && !fd->file_font) { found_fd = fd; } @@ -827,6 +830,8 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, FT_Face face = evas_common_font_freetype_face_get((RGBA_Font *) font); + file_font = EINA_TRUE; + if (face) { p_nm = FcFreeTypeQueryFace(face, (FcChar8 *) "", 0, NULL); @@ -865,6 +870,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, #ifdef HAVE_FONTCONFIG fd->set = set; fd->p_nm = p_nm; + fd->file_font = file_font; #endif } --
