-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wish] Pure OT shaping: disabling non-canonic convenience functionality (normalization, fallback, synthesis) #80
Comments
Technically synthesized GDEF is part of OpenType requirements. |
In particular, in this page: http://www.microsoft.com/typography/otspec/GDEF.htm There's this text: """If the font does not include a GlyphClassDef table, the client must define and maintain this information when using the GSUB and GPOS tables.""" |
Good point. I'd leave it in, then. The other issues bother me more. For testing purposes, synth GDEF can be worked around very easily (by supplying an empty GlyphClassDef). The other behaviors are a bit more tricky to catch, and thus more misleading. Also, I guess they're the ones where HarfBuzz does "more" than other engines do. |
Ok lets see what you can do without HarfBuzz as is: Normalization can be fully disabled if you use hb_unicode_funcs_create(hb_unicode_funcs_get_default) and then set compose(), decompose(), and decompose_compatibility() callbacks that do nothing (return false / 0). Fallback positioning can be disabled if you similarly use a font_funcs implementation that returns false for get_glyph_extents(). Also see hb_font_create_sub_font(). You don't need to modify your existing font_funcs, you can provide an overlay that disables get_glyph_extents(), similar to the unicode_funcs approach. The fallback Thai shaping (ie. the shape-to-PUA) is automatically disabled if the font has a GSUB script for Thai. The fallback Arabic shaping is automatically disabled if the font has at least one of init/medi/fini/isol. I think I still want to implement a pure mode in the API, but this should unblock anyone needing that today. |
So talking to Jonathan, we think we want to allow disabling these:
on the grounds that these are neither part of OpenType, nor Unicode. I'm leaning towards disabling them all together, with no fine-grained control. |
disable .so files Fix harfbuzz#79 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-harfbuzz/80) <!-- Reviewable:end -->
Introduce ways to disable functionalities of the "ot" shaping backend which are not canonical to OpenType Layout, including:
etc.
Behdad already stated his intent to do this, and this is the issue to track it.
The text was updated successfully, but these errors were encountered: