diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh index a544fea1b..2f824cce6 100644 --- a/src/hb-ot-cff-common.hh +++ b/src/hb-ot-cff-common.hh @@ -57,6 +57,16 @@ using str_buff_t = hb_vector_t; using str_buff_vec_t = hb_vector_t; using glyph_to_sid_map_t = hb_vector_t; +struct length_f_t +{ + template + unsigned operator () (const Iterable &_) const { return hb_len (hb_iter (_)); } + + unsigned operator () (unsigned _) const { return _; } +} +HB_FUNCOBJ (length_f); + /* CFF INDEX */ template struct CFFIndex @@ -97,15 +107,6 @@ struct CFFIndex return_trace (true); } - HB_INTERNAL static struct { - template - unsigned operator () (const Iterable &_) { return hb_len (hb_iter (_)); } - - unsigned operator () (unsigned _) { return _; } - } - length_f; - template bool serialize_header (hb_serialize_context_t *c,