Enlightenment CVS committal
Author : shorne
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas
Modified Files:
evas_font_dir.c
Log Message:
Revert to old fontconfig searching
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_font_dir.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- evas_font_dir.c 5 Apr 2006 23:23:16 -0000 1.19
+++ evas_font_dir.c 9 Apr 2006 02:42:21 -0000 1.20
@@ -312,19 +312,31 @@
if (!font) /* Search using fontconfig */
{
FcPattern *p_nm = NULL;
- FcChar8 *s;
+ FcFontSet *set;
FcResult res;
-
+ int i;
+
p_nm = FcNameParse(name);
FcConfigSubstitute(NULL, p_nm, FcMatchPattern);
FcDefaultSubstitute(p_nm);
-
+
/* do matching */
- p_nm = FcFontMatch(NULL, p_nm, &res);
- res = FcPatternGetString(p_nm, FC_FILE, 0, &s);
- if (res == FcResultMatch)
- font = evas->engine.func->font_load(evas->engine.data.output, s,
- size);
+ set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res);
+
+ /* Do loading for all in family */
+ for (i = 0; i < set->nfont; i++)
+ {
+ FcValue filename;
+
+ FcPatternGet(set->fonts[i], FC_FILE, 0, &filename);
+
+ if (font)
+ evas->engine.func->font_add(evas->engine.data.output, font,
filename.u.s, size);
+ else
+ font = evas->engine.func->font_load(evas->engine.data.output,
filename.u.s, size);
+ }
+
+ FcFontSetDestroy(set);
FcPatternDestroy(p_nm);
}
#endif
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs