From: raster Date: Wed, 6 Oct 2010 08:53:06 +0000 (+0000) Subject: i think i foundsed me a fontconfig bug.. this i think is a X-Git-Tag: accepted/2.0/20130306.225542~242^2~1419 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e95861d97c66e25b634a11618ba6977d0b4ff707;p=profile%2Fivi%2Fevas.git i think i foundsed me a fontconfig bug.. this i think is a workartound.. it depends what fc's intent was tho. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@53093 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_font_dir.c b/src/lib/canvas/evas_font_dir.c index 43854bf..939cf2f 100644 --- a/src/lib/canvas/evas_font_dir.c +++ b/src/lib/canvas/evas_font_dir.c @@ -252,6 +252,13 @@ evas_load_fontconfig(Evas *evas, FcFontSet *set, int size) } #endif +struct _FcPattern { + int num; + int size; + intptr_t elts_offset; + int ref; +}; + void * evas_font_load(Evas *evas, const char *name, const char *source, int size) { @@ -448,6 +455,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size) fonts = eina_list_free(fonts); #ifdef HAVE_FONTCONFIG + if (!font) /* Search using fontconfig */ { FcResult res; @@ -465,7 +473,13 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size) p_nm = NULL; } else - font = evas_load_fontconfig(evas, set, size); + { + // FIXME: this i think is a bugfix for a rare bug... but i'm + // not sure 100%. it seems that way from fc. if trim is set + // to FcTrue... + FcPatternReference(p_nm); /* we have to reference count the pat */ + font = evas_load_fontconfig(evas, set, size); + } } #endif