From 38b011a293181856463dd08d43e2106e5bf1d56e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 4 May 2009 20:21:57 -0400 Subject: [PATCH] [GSUB] Hook new GSUB up in Pango --- src/hb-ot-layout-gsub-private.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-layout-gsub-private.h b/src/hb-ot-layout-gsub-private.h index 78c570143..73950dcc4 100644 --- a/src/hb-ot-layout-gsub-private.h +++ b/src/hb-ot-layout-gsub-private.h @@ -125,6 +125,14 @@ struct SingleSubst { } } + inline bool single_substitute (hb_codepoint_t &glyph_id) const { + switch (u.substFormat) { + case 1: return u.format1.single_substitute (glyph_id); + case 2: return u.format2.single_substitute (glyph_id); + default:return false; + } + } + inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const { HB_UNUSED (nesting_level_left); @@ -138,11 +146,8 @@ struct SingleSubst { hb_codepoint_t glyph_id = IN_CURGLYPH (); - switch (u.substFormat) { - case 1: if (!u.format1.single_substitute (glyph_id)) return false; - case 2: if (!u.format2.single_substitute (glyph_id)) return false; - default:return false; - } + if (!single_substitute (glyph_id)) + return false; _hb_buffer_replace_output_glyph (buffer, glyph_id, context_length == NO_CONTEXT);