hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
- if (font->has_nominal_glyphs_func ())
+ if (font->has_nominal_glyphs_func_set ())
{
return font->get_nominal_glyphs (1, &unicode, 0, glyph, 0);
}
unsigned int glyph_stride,
void *user_data HB_UNUSED)
{
- if (font->has_nominal_glyph_func ())
+ if (font->has_nominal_glyph_func_set ())
{
for (unsigned int i = 0; i < count; i++)
{
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- if (font->has_glyph_h_advances_func ())
+ if (font->has_glyph_h_advances_func_set ())
{
hb_position_t ret;
font->get_glyph_h_advances (1, &glyph, 0, &ret, 0);
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- if (font->has_glyph_v_advances_func ())
+ if (font->has_glyph_v_advances_func_set ())
{
hb_position_t ret;
font->get_glyph_v_advances (1, &glyph, 0, &ret, 0);
unsigned int advance_stride,
void *user_data HB_UNUSED)
{
- if (font->has_glyph_h_advance_func ())
+ if (font->has_glyph_h_advance_func_set ())
{
for (unsigned int i = 0; i < count; i++)
{
unsigned int advance_stride,
void *user_data HB_UNUSED)
{
- if (font->has_glyph_v_advance_func ())
+ if (font->has_glyph_v_advance_func_set ())
{
for (unsigned int i = 0; i < count; i++)
{
#undef HB_FONT_FUNC_IMPLEMENT
bool
+hb_font_t::has_func_set (unsigned int i)
+{
+ return this->klass->get.array[i] != _hb_font_funcs_default.get.array[i];
+}
+
+bool
hb_font_t::has_func (unsigned int i)
{
- return (this->klass->get.array[i] != _hb_font_funcs_default.get.array[i]) ||
+ return has_func_set (i) ||
(parent && parent != &_hb_Null_hb_font_t && parent->has_func (i));
}
/* Public getters */
HB_INTERNAL bool has_func (unsigned int i);
+ HB_INTERNAL bool has_func_set (unsigned int i);
/* has_* ... */
#define HB_FONT_FUNC_IMPLEMENT(name) \
hb_font_funcs_t *funcs = this->klass; \
unsigned int i = offsetof (hb_font_funcs_t::get_t::get_funcs_t, name) / sizeof (funcs->get.array[0]); \
return has_func (i); \
+ } \
+ bool \
+ has_##name##_func_set (void) \
+ { \
+ hb_font_funcs_t *funcs = this->klass; \
+ unsigned int i = offsetof (hb_font_funcs_t::get_t::get_funcs_t, name) / sizeof (funcs->get.array[0]); \
+ return has_func_set (i); \
}
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
#undef HB_FONT_FUNC_IMPLEMENT