[otlayout] Add _hb_glyph_info_set_glyph_props()

No functional change.
This commit is contained in:
Behdad Esfahbod 2013-10-18 00:21:59 +02:00
parent a016174658
commit 91689de260
4 changed files with 17 additions and 6 deletions

View File

@ -1383,7 +1383,7 @@ GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
unsigned int count = buffer->len; unsigned int count = buffer->len;
for (unsigned int i = 0; i < count; i++) { for (unsigned int i = 0; i < count; i++) {
buffer->info[i].lig_props() = buffer->info[i].syllable() = 0; buffer->info[i].lig_props() = buffer->info[i].syllable() = 0;
buffer->info[i].glyph_props() = gdef.get_glyph_props (buffer->info[i].codepoint); _hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buffer->info[i].codepoint));
} }
} }

View File

@ -619,9 +619,9 @@ struct hb_apply_context_t
unsigned int class_guess = 0) const unsigned int class_guess = 0) const
{ {
if (likely (has_glyph_classes)) if (likely (has_glyph_classes))
buffer->cur().glyph_props() = gdef.get_glyph_props (glyph_index); _hb_glyph_info_set_glyph_props (&buffer->cur(), gdef.get_glyph_props (glyph_index));
else if (class_guess) else if (class_guess)
buffer->cur().glyph_props() = class_guess; _hb_glyph_info_set_glyph_props (&buffer->cur(), class_guess);
} }
inline void replace_glyph (hb_codepoint_t glyph_index) const inline void replace_glyph (hb_codepoint_t glyph_index) const

View File

@ -321,6 +321,15 @@ _hb_allocate_lig_id (hb_buffer_t *buffer) {
return lig_id; return lig_id;
} }
/* glyph_props: */
inline void
_hb_glyph_info_set_glyph_props (hb_glyph_info_t *info, unsigned int props)
{
info->glyph_props() = props;
}
#endif /* HB_OT_LAYOUT_PRIVATE_HH */ #endif /* HB_OT_LAYOUT_PRIVATE_HH */

View File

@ -339,9 +339,11 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c)
{ {
unsigned int count = c->buffer->len; unsigned int count = c->buffer->len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
c->buffer->info[i].glyph_props() = _hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ? _hb_glyph_info_set_glyph_props (&c->buffer->info[i],
_hb_glyph_info_get_general_category (&c->buffer->info[i])
== HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ?
HB_OT_LAYOUT_GLYPH_PROPS_MARK : HB_OT_LAYOUT_GLYPH_PROPS_MARK :
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH; HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH);
} }
static inline void static inline void