[HarfBuzz] Discovering 'vert' feature
Behdad Esfahbod
behdad at behdad.org
Thu Oct 9 18:12:34 PDT 2014
I'm helping Dominik port Chrome's vertical text support to HarfBuzz, and we've
hit a buggy font in Windows, that we need to work around.
"SimSun" on Windows 7, only declares the 'vert' feature under script 'hani'
(fine) language-system "CHN ". No tag maps to "CHN ". It's a font bug.
In Windows 8 family, someone **tried** to fix it. They tweaked the features
until it worked for them. So it has the 'vert' feature for script 'hani', now
in language system "ZHS " as well as "CHN ", but also for script 'latn' as
default language-system. So now, if the itemizer failed to mark the correct
script, HarfBuzz tries 'latn' and gets the right feature. But if it looks
under 'hani' but there's no language tag, it still fails.
So, I'm tempted to try this fixup: if feature is 'vert', and we found no
feature, then walk the feature list and enable the first feature found that
has tag 'vert'.
How does that sound?
https://github.com/behdad/harfbuzz/issues/63
--
behdad
http://behdad.org/
More information about the HarfBuzz
mailing list