Flesh out tt funcs a bit

This commit is contained in:
Behdad Esfahbod 2011-08-17 23:55:29 +02:00
parent b9415e76d7
commit 7d235d272f

View File

@ -36,11 +36,45 @@
#if 0
struct hb_tt_font_t
{
const struct hhea *hhea;
hb_blob_t *hhea_blob;
};
static hb_tt_font_t *
_hb_tt_font_create (hb_font_t *font)
{
/* TODO Remove this object altogether */
hb_tt_font_t *tt = (hb_tt_font_t *) calloc (1, sizeof (hb_tt_font_t));
tt->hhea_blob = Sanitizer<hhea>::sanitize (hb_face_reference_table (font->face, HB_OT_TAG_hhea));
tt->hhea = Sanitizer<hhea>::lock_instance (tt->hhea_blob);
return tt;
}
static void
_hb_tt_font_destroy (hb_tt_font_t *tt)
{
hb_blob_destroy (tt->hhea_blob);
free (tt);
}
static inline const hhea&
_get_hhea (hb_face_t *face)
{
// return likely (face->tt && face->tt->hhea) ? *face->tt->hhea : Null(hhea);
}
/*
* hb_tt_font_funcs_t
*/
#if 0
static hb_bool_t
hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,