From 91689de2603e4151e2a2d3a3852c61667f0c6264 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 18 Oct 2013 00:21:59 +0200 Subject: [PATCH] [otlayout] Add _hb_glyph_info_set_glyph_props() No functional change. --- src/hb-ot-layout-gsub-table.hh | 2 +- src/hb-ot-layout-gsubgpos-private.hh | 4 ++-- src/hb-ot-layout-private.hh | 9 +++++++++ src/hb-ot-shape.cc | 8 +++++--- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 1a0f183a1..e0d2d3664 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -1383,7 +1383,7 @@ GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer) unsigned int count = buffer->len; for (unsigned int i = 0; i < count; i++) { 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)); } } diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index ff53d3b46..3cafbbdc9 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -619,9 +619,9 @@ struct hb_apply_context_t unsigned int class_guess = 0) const { 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) - 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 diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index 406a04244..9468b34fc 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -321,6 +321,15 @@ _hb_allocate_lig_id (hb_buffer_t *buffer) { 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 */ diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index e68344b92..0dcb9fcf3 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -339,9 +339,11 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c) { unsigned int count = c->buffer->len; 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_OT_LAYOUT_GLYPH_PROPS_MARK : - HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH; + _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_BASE_GLYPH); } static inline void