From 40b19fd46951e2f9b402e59e1fbbf06fde7ecd61 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 31 Oct 2018 18:51:45 -0700 Subject: [PATCH] [aat] Fallback to old style "Letter Case" small caps Fixes https://github.com/harfbuzz/harfbuzz/issues/1342 --- src/hb-aat-layout-morx-table.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index ab867bba9..d56af7bfe 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -955,12 +955,20 @@ struct Chain const Feature &feature = featureZ[i]; uint16_t type = feature.featureType; uint16_t setting = feature.featureSetting; + retry: const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch (type); if (info && info->setting == setting) { flags &= feature.disableFlags; flags |= feature.enableFlags; } + else if (type == 3/*kLetterCaseType*/ && setting == 3/*kSmallCapsSelector*/) + { + /* Deprecated. https://github.com/harfbuzz/harfbuzz/issues/1342 */ + type = 37/*kLowerCaseType*/; + setting = 1/*kLowerCaseSmallCapsSelector*/; + goto retry; + } } } return flags;