-
Notifications
You must be signed in to change notification settings - Fork 682
Implement a simple API for fetching opentype metrics #1432
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
Conversation
|
So previously I said we should get ascender/descender/linegap form hmtx/vmtx accelerators. Now I think it should be the other way around: those should get it from this API. Which means, this API should implement the logic there. The logic, for horizontal ascender/descender is that if Now, MVAR specifically refers to OS2 values, because there's wording somewhere else in OpenType 1.8 that says variable fonts should always have USE_TYPO_METRICS bit one. We can ignore that wording and continue the above logic. So, that logic needs to be implemented here if both tables are present. |
|
On 30/11/2018 20:37, Ebrahim Byagowi wrote:
Hmm, a font without OS2 is not that imaginable I believe.
Not sure if it's still true, but I think I remember that Apple used to
ship some fonts that had no OS/2 table. (FWIW, it's documented as an
optional table in their TrueType spec.)
JK
|
|
Big majority of them have OS/2 but right there are apparently some that don't (comparing number of maxp and os/2 occurrence) 10.12.6 https://gist.github.com/ebraminio/7627d0e18989a25b16c55701118fc069 10.13.6 https://gist.github.com/ebraminio/d432e831b3f7ebe30245dde5775e1c7e |
3bf1c80 to
2a79b08
Compare
a504d2f to
e558bd3
Compare
c911178 to
eaa2eb5
Compare
May or may not be used in harfbuzz#1432
May or may not be used in #1432
e41d945 to
4a71397
Compare
ce35b52 to
4505f5d
Compare
You wanted to reuse the logic but we don't want to offer the API in hb-subset, which uses the table thus the API, so I had to separate it to use in the subset.
Done, I think
I turned it into hb_position_t as the scale already removed its precision but your concern is understandable. |
f5e55ca to
9bfe6d8
Compare
This is incomplete; harfbuzz does not have underline and strikethrough metrics currently. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
Note that some of the harfbuzz api we use here has not landed yet. See harfbuzz/harfbuzz#1432
I believe that was a try to use one approach as fallback to other. But felt wrong. Just believe what's in OS/2 table to be correct.
Continuing #1396
Related to #1337