mutable unsigned int upem; /* Units-per-EM. */
mutable unsigned int num_glyphs; /* Number of glyphs. */
+ enum dirty_t {
+ NOTHING = 0x0000,
+ INDEX = 0x0001,
+ UPEM = 0x0002,
+ NUM_GLYPHS = 0x0004,
+ } dirty;
+
struct hb_shaper_data_t shaper_data; /* Various shaper data. */
/* Various non-shaping data. */
HB_INTERNAL void load_num_glyphs (void) const;
};
+HB_MARK_AS_FLAG_T (hb_face_t::dirty_t);
+
extern HB_INTERNAL const hb_face_t _hb_face_nil;
#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
1000, /* upem */
0, /* num_glyphs */
+ hb_face_t::NOTHING, /* dirty */
+
{
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
#include "hb-shaper-list.hh"
closure,
(hb_destroy_func_t) _hb_face_for_data_closure_destroy);
- hb_face_set_index (face, index);
+ face->index = index;
return face;
}
if (face->immutable)
return;
+ if (face->index == index)
+ return;
+
+ face->dirty |= face->INDEX;
+
face->index = index;
}
if (face->immutable)
return;
+ if (face->upem == upem)
+ return;
+
+ face->dirty |= face->UPEM;
+
face->upem = upem;
}
if (face->immutable)
return;
+ if (face->num_glyphs == glyph_count)
+ return;
+
+ face->dirty |= face->NUM_GLYPHS;
+
face->num_glyphs = glyph_count;
}
NULL, /* user_data */
NULL, /* destroy */
- hb_font_t::NOTHING, /* dirty_bits */
+ hb_font_t::NOTHING, /* dirty */
{
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,