This commit is contained in:
Behdad Esfahbod 2020-06-18 17:04:35 -07:00
parent dc492d7c8a
commit 5bc4cedde6

View File

@ -1970,8 +1970,8 @@ hb_ot_layout_get_baseline (hb_font_t *font,
#endif
struct hb_get_glyph_alternates_context_t :
hb_dispatch_context_t<hb_get_glyph_alternates_context_t, unsigned>
struct hb_get_glyph_alternates_dispatch_t :
hb_dispatch_context_t<hb_get_glyph_alternates_dispatch_t, unsigned>
{
static return_t default_return_value () { return 0; }
bool stop_sublookup_iteration (return_t r) const { return r; }
@ -1979,9 +1979,9 @@ struct hb_get_glyph_alternates_context_t :
hb_face_t *face;
unsigned int debug_depth;
hb_get_glyph_alternates_context_t (hb_face_t *face) :
face (face),
debug_depth (0) {}
hb_get_glyph_alternates_dispatch_t (hb_face_t *face) :
face (face),
debug_depth (0) {}
private:
template <typename T, typename ...Ts> auto
@ -2021,7 +2021,7 @@ hb_ot_layout_lookup_get_glyph_alternates (hb_face_t *face,
unsigned *alternate_count /* IN/OUT. May be NULL. */,
hb_codepoint_t *alternate_glyphs /* OUT. May be NULL. */)
{
hb_get_glyph_alternates_context_t c (face);
hb_get_glyph_alternates_dispatch_t c (face);
const OT::SubstLookup &lookup = face->table.GSUB->table->get_lookup (lookup_index);
auto ret = lookup.dispatch (&c, glyph, start_offset, alternate_count, alternate_glyphs);
if (!ret && alternate_count) *alternate_count = 0;