-
Notifications
You must be signed in to change notification settings - Fork 3
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
Best-fit Bidi_Mirroring_Glyph could be better #7
Comments
per MT fixed |
This issue should be reopened. I see that you’ve added a new glyph, uni2272.mir, to the font. That has no effect and does not address this bug. The shaper replaces uni2272 with uni2273 because U+2272 appears in the OMPL. 'rtlm' is not applied and uni2272.mir is unused. To override the OMPL, use 'rtla' instead. Another problem is that this attempted fix only applies to U+2272. That was just one example. There are plenty of other characters with best-fit mirrorings. |
(I was told this was fixed in the latest version, but it's not.) I tried using
But I'm confused. I would then expect Harfbuzz to then do something in rtla, presumably to substitute it for
(Maybe because the mirroring happens already?) If that's the case, then I'm not sure this is something we can fix in the font. |
All you need to do is add a mapping in 'rtla' from
Exactly. 'rtla' doesn’t replace HarfBuzz’s default mirroring: it supplements it, by being applied in a later step.
Nothing happens because this font’s 'rtla' lookup has no rule for |
I’m questioning many of the best fit and entries without encoded mirrors in BidiMirroring.txt. I’m checking Arabic math book and slashes/solidi/etc, or tildes are not mirrored, unlike other symbols. So I think the file needs to be checked against actual usage of these symbols, and feedback should be submitted to Unicode to revise this file. |
Font
NotoSansMath-Regular.ttf
Where the font came from, and when
Site: https://github.com/googlei18n/noto-fonts/blob/c30307083469f0c05e216ac75216fd454a517858/hinted/NotoSansMath-Regular.ttf
Date: 2019-02-04
Font version
Version 2.000
Issue
Characters whose bidi-mirrored glyphs are marked [BEST FIT] in BidiMirroring.txt are mirrored to their best fits, but it would be better to mirror them fully. For example, U+2272 LESS-THAN OR EQUIVALENT TO has a Bidi_Mirroring_Glyph of U+2273 GREATER-THAN OR EQUIVALENT TO, so the shaper replaces U+2272 with U+2273 in RTL text. However, this is just a best fit because, ideally, the tilde part of the glyph would be mirrored too.
According to the OpenType spec, this would only be true for characters in the OpenType Mirroring Pairs List, but HarfBuzz by default uses the full latest list from Unicode (harfbuzz/harfbuzz#492). That means that, for example, HarfBuzz mirrors uni2A85 to uni2A86, bypassing the intended uni2A85.aalt.
Character data
≲⪅
U+2272 LESS-THAN OR EQUIVALENT TO
U+2A85 LESS-THAN OR APPROXIMATE
Screenshot
Left-to-right:
Right-to-left in HarfBuzz:
Right-to-left in HarfBuzz modified to use the OMPL:
The text was updated successfully, but these errors were encountered: