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
[ot-tag] Add HB_SCRIPT_MATH (Zmth) and map it to OT ‘math’ tag #3417
Conversation
Looks good except for what Khaled said. Thanks. |
As I understand it, 'math' is unlike other script tags in that it does not correspond to any specific characters. Instead, it is used to identify features relevant to the MATH table. Is 'math' ever used for non-MATH shaping? If not, is the existing constant |
I guess specifying the |
@dscorbett I had missed the existence of However, I’d still like this change. In Pango, there’s no way to arrange for an arbitrary However, one potential alternative approach to this PR would be to make the change to |
That sounds like a good reason to merge this. The reason does not apply to 'byzm' and 'musc', the other tags for non-Unicode scripts; I was wondering if we should add constants for them too, but that does not seem as necessary. Did you mean to squash all those commits with “(squash)” in the message? |
The documentation of Lines 53 to 56 in ac46c32
Users should pass |
b58145b
to
1a8fb5c
Compare
It feels to me that way, yes. |
No, I decided to leave them unsquashed until merging to make it easier for reviewers to see what changed. But based on your comment, it seems like maybe that was more confusing than helpful, so I’ve just gone and squashed them now. :) |
I’m not sure that it needs to be deprecated given I agree that the documentation should be updated, though, so I’ll do that. |
f9e4a38
to
ac4de6b
Compare
Alright, I’ve updated the documentation to the following: Lines 52 to 65 in ac4de6b
|
Please move |
The ISO 15924 code for mathematical notation is ‘Zmth’, but the OpenType script is ‘math’.
ac4de6b
to
9b8ac99
Compare
I think deprecating
Let me know if you think this is reasonable. I suspect, in practice, it would be no great loss if |
The ISO 15924 code for mathematical notation is
Zmth
, but the corresponding OpenType script tag ismath
. HarfBuzz needs to know about the mapping, or else OpenType features that depend on themath
script won’t be applied. This PR addsHB_SCRIPT_MATH
tohb_script_t
(for convenience) and changeshb_ot_tags_from_script_and_language
andhb_ot_tag_to_script
to do the necessary conversion.