From 6c0e7eb6a6f3f888442c0a97ce6a771631990ed6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 24 Sep 2018 19:07:23 -0400 Subject: [PATCH] Minor --- src/hb-ot-map.hh | 1 + src/hb-ot-shape-complex-indic.cc | 34 ++++++++++++++++---------------- src/hb-ot-shape-complex-khmer.cc | 18 ++++++++--------- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/hb-ot-map.hh b/src/hb-ot-map.hh index b6942ca2b..13bbc8fe5 100644 --- a/src/hb-ot-map.hh +++ b/src/hb-ot-map.hh @@ -173,6 +173,7 @@ enum hb_ot_map_feature_flags_t F_HAS_FALLBACK = 0x0002u, /* Has fallback implementation, so include mask bit even if feature not found. */ F_MANUAL_ZWNJ = 0x0004u, /* Don't skip over ZWNJ when matching **context**. */ F_MANUAL_ZWJ = 0x0008u, /* Don't skip over ZWJ when matching **input**. */ + F_MANUAL_JOINERS = F_MANUAL_ZWNJ | F_MANUAL_ZWJ, F_GLOBAL_SEARCH = 0x0010u, /* If feature not found in LangSys, look for it in global feature list and pick one. */ F_RANDOM = 0x0020u /* Randomly select a glyph from an AlternateSubstFormat1 subtable. */ }; diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index e2fae7aea..1fec0e566 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -102,29 +102,29 @@ indic_features[] = * Basic features. * These features are applied in order, one at a time, after initial_reordering. */ - {HB_TAG('n','u','k','t'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('a','k','h','n'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('r','p','h','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('r','k','r','f'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('p','r','e','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('b','l','w','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('a','b','v','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('h','a','l','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('p','s','t','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('v','a','t','u'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('c','j','c','t'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, + {HB_TAG('n','u','k','t'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('a','k','h','n'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('r','p','h','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('r','k','r','f'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('p','r','e','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('b','l','w','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('a','b','v','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('h','a','l','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('p','s','t','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('v','a','t','u'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('c','j','c','t'), F_GLOBAL | F_MANUAL_JOINERS}, /* * Other features. * These features are applied all at once, after final_reordering. * Default Bengali font in Windows for example has intermixed * lookups for init,pres,abvs,blws features. */ - {HB_TAG('i','n','i','t'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('p','r','e','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('a','b','v','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('b','l','w','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('p','s','t','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('h','a','l','n'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, + {HB_TAG('i','n','i','t'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('p','r','e','s'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('a','b','v','s'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('b','l','w','s'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('p','s','t','s'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('h','a','l','n'), F_GLOBAL | F_MANUAL_JOINERS}, /* * Positioning features. * We don't care about the types. diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index 77059293d..f8c0a4beb 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -39,19 +39,19 @@ khmer_features[] = * Basic features. * These features are applied in order, one at a time, after reordering. */ - {HB_TAG('p','r','e','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('b','l','w','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('a','b','v','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('p','s','t','f'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('c','f','a','r'), F_NONE | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, + {HB_TAG('p','r','e','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('b','l','w','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('a','b','v','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('p','s','t','f'), F_NONE | F_MANUAL_JOINERS}, + {HB_TAG('c','f','a','r'), F_NONE | F_MANUAL_JOINERS}, /* * Other features. * These features are applied all at once. */ - {HB_TAG('p','r','e','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('a','b','v','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('b','l','w','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, - {HB_TAG('p','s','t','s'), F_GLOBAL | F_MANUAL_ZWJ | F_MANUAL_ZWNJ}, + {HB_TAG('p','r','e','s'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('a','b','v','s'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('b','l','w','s'), F_GLOBAL | F_MANUAL_JOINERS}, + {HB_TAG('p','s','t','s'), F_GLOBAL | F_MANUAL_JOINERS}, /* * Positioning features. * We don't care about the types.