From 7ed5366d3cfca9c533250cb419e8cc878f32505d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 10 Oct 2018 19:11:30 -0400 Subject: [PATCH] [kerx] No-op Tested that Format0 works with Kannada MN font: $ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 [kn_ka=0+1000|kn_matra_uu=0@-30,0+1345] $ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-kern [kn_ka=0+1030|kn_matra_uu=0+1375] Note that GPOS does the same with 'dist' feature, and applies the whole difference to the same glyph: $ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 [kn_ka=0+970|kn_matra_uu=0+1375] $ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-dist [kn_ka=0+1030|kn_matra_uu=0+1375] --- src/hb-aat-layout-kerx-table.hh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 2214265b5..c683242f6 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -66,9 +66,7 @@ struct KerxSubTableFormat0 { hb_glyph_pair_t pair = {left, right}; int i = pairs.bsearch (pair); - if (i == -1) - return 0; - return pairs[i].get_kerning (); + return i == -1 ? 0 : pairs[i].get_kerning (); } inline bool apply (hb_aat_apply_context_t *c) const