void
evas_font_dir_cache_free(void)
{
+#ifdef HAVE_FONTCONFIG
+ FcFini();
+#endif
if (!font_dirs) return;
eina_hash_foreach(font_dirs, font_cache_dir_free, NULL);
}
}
+static void
+evas_font_init(void)
+{
+ static int done = 0;
+ if (done) return;
+ done = 1;
+#ifdef HAVE_FONTCONFIG
+ FcInit();
+ FcConfigEnableHome(1);
+#endif
+}
+
void *
evas_font_load(Evas *evas, const char *name, const char *source, int size)
{
if (!name) return NULL;
if (name[0] == 0) return NULL;
+
+ evas_font_init();
EINA_LIST_FOREACH(fonts_cache, l, fd)
{
FcObjectSet *os;
int i;
+ evas_font_init();
+
p = FcPatternCreate();
os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL);
// pops++;
if (!ct)
{
+ // FIXME: static ct - nver can free on shutdown? not a leak
+ // or real harm - just annoying valgrind bitch
ct = evas_common_draw_context_new();
evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY);
}
0, 0,
dst_region_w, dst_region_h);
sci->populate_me = 0;
+#if 0 // visual debug of cached images
+ {
+ int xx, yy;
+ DATA32 *pp;
+
+ pp = sci->im->image.data;
+ for (yy = 0; yy < dst_region_h; yy++)
+ {
+
+ for (xx = 0; xx < dst_region_w; xx++)
+ {
+ if (yy & 0x1)
+ {
+ if (xx & 0x1) *pp = 0;
+ }
+ else
+ {
+ if (!(xx & 0x1)) *pp = 0;
+ }
+ pp++;
+ }
+ }
+ }
+#endif
}
cache_size += sci->dst_w * sci->dst_h * 4;
// printf(" + %i @ flop: %i (%ix%i)\n",