FTLOCK();
FT_Done_Face(fs->ft.face);
FTUNLOCK();
-#ifdef OT_SUPPORT
- evas_common_font_ot_unload_face(fs);
-#endif
if (fs->name) eina_stringshare_del(fs->name);
if (fs->file) eina_stringshare_del(fs->file);
free(fs);
free(fs);
return NULL;
}
-#ifdef OT_SUPPORT
- evas_common_font_ot_load_face(fs);
-#endif
FTUNLOCK();
fs->ft.orig_upem = fs->ft.face->units_per_EM;
fs->references = 1;
FTLOCK();
FT_Done_Face(fs->ft.face);
fs->ft.face = NULL;
-#ifdef OT_SUPPORT
- evas_common_font_ot_unload_face(fs);
-#endif
FTUNLOCK();
}
fs->ft.face = NULL;
return error;
}
-#ifdef OT_SUPPORT
- evas_common_font_ot_load_face(fs);
-#endif
FTUNLOCK();
fs->ft.orig_upem = fs->ft.face->units_per_EM;
return error;
return (items > 0) ? items : 1;
}
-EAPI void
-evas_common_font_ot_load_face(void *_font)
-{
- RGBA_Font_Source *font = (RGBA_Font_Source *) _font;
- /* Unload the face if by any chance it's already loaded */
- evas_common_font_ot_unload_face(font);
- font->hb.face = hb_ft_face_create(font->ft.face, NULL);
-}
-
-EAPI void
-evas_common_font_ot_unload_face(void *_font)
-{
- RGBA_Font_Source *font = (RGBA_Font_Source *) _font;
- if (!font->hb.face) return;
- hb_face_destroy(font->hb.face);
- font->hb.face = NULL;
-}
-
/* Harfbuzz font functions */
static void
# define EVAS_FONT_OT_POS_GET(a) ((a).source_cluster)
# endif
-EAPI void
-evas_common_font_ot_load_face(void *_font);
-
-EAPI void
-evas_common_font_ot_unload_face(void *_font);
-
# include "evas_text_utils.h"
EAPI int
evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index);
int orig_upem;
FT_Face face;
} ft;
-#ifdef OT_SUPPORT
- struct {
- void *face;
- } hb;
-#endif
};
struct _RGBA_Font_Glyph