提交 40b19fd4 编写于 作者: B Behdad Esfahbod

[aat] Fallback to old style "Letter Case" small caps

Fixes https://github.com/harfbuzz/harfbuzz/issues/1342
上级 f9289319
...@@ -955,12 +955,20 @@ struct Chain ...@@ -955,12 +955,20 @@ struct Chain
const Feature &feature = featureZ[i]; const Feature &feature = featureZ[i];
uint16_t type = feature.featureType; uint16_t type = feature.featureType;
uint16_t setting = feature.featureSetting; uint16_t setting = feature.featureSetting;
retry:
const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch (type); const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch (type);
if (info && info->setting == setting) if (info && info->setting == setting)
{ {
flags &= feature.disableFlags; flags &= feature.disableFlags;
flags |= feature.enableFlags; 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; return flags;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册