[OT] Move code around
This commit is contained in:
parent
3999094682
commit
c624e18a24
|
@ -1308,8 +1308,6 @@ struct GSUB : GSUBGPOS
|
|||
inline const SubstLookup& get_lookup (unsigned int i) const
|
||||
{ return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
|
||||
|
||||
static inline void substitute_start (hb_font_t *font, hb_buffer_t *buffer);
|
||||
|
||||
inline bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
|
@ -1322,22 +1320,6 @@ struct GSUB : GSUBGPOS
|
|||
};
|
||||
|
||||
|
||||
void
|
||||
GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
|
||||
{
|
||||
_hb_buffer_assert_gsubgpos_vars (buffer);
|
||||
|
||||
const GDEF &gdef = _get_gdef (font->face);
|
||||
unsigned int count = buffer->len;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
_hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buffer->info[i].codepoint));
|
||||
_hb_glyph_info_clear_lig_props (&buffer->info[i]);
|
||||
buffer->info[i].syllable() = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Out-of-class implementation for methods recursing */
|
||||
|
||||
/*static*/ inline bool ExtensionSubst::is_reverse (void) const
|
||||
|
|
|
@ -213,6 +213,24 @@ OT::GDEF::accelerator_t::init (hb_face_t *face)
|
|||
table = this->blob->as<GDEF> ();
|
||||
}
|
||||
|
||||
static void
|
||||
_hb_ot_layout_set_glyph_props (hb_font_t *font,
|
||||
hb_buffer_t *buffer)
|
||||
{
|
||||
_hb_buffer_assert_gsubgpos_vars (buffer);
|
||||
|
||||
const OT::GDEF &gdef = _get_gdef (font->face);
|
||||
unsigned int count = buffer->len;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
_hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buffer->info[i].codepoint));
|
||||
_hb_glyph_info_clear_lig_props (&buffer->info[i]);
|
||||
buffer->info[i].syllable() = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Public API */
|
||||
|
||||
hb_bool_t
|
||||
hb_ot_layout_has_glyph_classes (hb_face_t *face)
|
||||
{
|
||||
|
@ -902,9 +920,10 @@ hb_ot_layout_lookup_would_substitute_fast (hb_face_t *face,
|
|||
}
|
||||
|
||||
void
|
||||
hb_ot_layout_substitute_start (hb_font_t *font, hb_buffer_t *buffer)
|
||||
hb_ot_layout_substitute_start (hb_font_t *font,
|
||||
hb_buffer_t *buffer)
|
||||
{
|
||||
OT::GSUB::substitute_start (font, buffer);
|
||||
_hb_ot_layout_set_glyph_props (font, buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue