Skip to content

Conversation

ebraminio
Copy link
Collaborator

@ebraminio ebraminio commented Nov 30, 2018

Continuing #1396
Related to #1337

@behdad
Copy link
Member

behdad commented Nov 30, 2018

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 face->table.OS2->fsSelection & USE_TYPO_METRICS then OS/2 values are used, otherwise hhea values.

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.

@jfkthame
Copy link
Collaborator

jfkthame commented Nov 30, 2018 via email

@ebraminio
Copy link
Collaborator Author

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

@ebraminio ebraminio force-pushed the metrics branch 2 times, most recently from 3bf1c80 to 2a79b08 Compare November 30, 2018 22:21
@ebraminio ebraminio force-pushed the metrics branch 3 times, most recently from a504d2f to e558bd3 Compare December 1, 2018 20:18
@ebraminio ebraminio force-pushed the metrics branch 3 times, most recently from c911178 to eaa2eb5 Compare December 1, 2018 22:17
ebraminio added a commit to ebraminio/harfbuzz that referenced this pull request Dec 5, 2018
ebraminio added a commit that referenced this pull request Dec 5, 2018
May or may not be used in #1432
@ebraminio ebraminio force-pushed the metrics branch 2 times, most recently from e41d945 to 4a71397 Compare December 5, 2018 11:23
@ebraminio ebraminio force-pushed the metrics branch 2 times, most recently from ce35b52 to 4505f5d Compare December 5, 2018 12:21
@ebraminio
Copy link
Collaborator Author

ebraminio commented Jun 18, 2019

What's the justification for separate -internal.cc file and the regular .cc file?

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.

Let's add hb_ot_metrics_get_variation that doesn't do any scaling. I have a feeling that we will be encoding non-geometric values in there at some point, if it's not already... Anyway, that one should probably return a float.

Done, I think

I see that hb_ot_metrics_get_x/y_variation also return float. Probably a good idea, though technically should be hb_position_t. Not sure :(.

I turned it into hb_position_t as the scale already removed its precision but your concern is understandable.

@ebraminio ebraminio force-pushed the metrics branch 2 times, most recently from f5e55ca to 9bfe6d8 Compare June 18, 2019 08:28
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 4, 2019
This is incomplete; harfbuzz does not have
underline and strikethrough metrics currently.

See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 10, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 10, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 10, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 10, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 10, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 10, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 12, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 12, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 12, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 12, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 13, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 13, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 14, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 15, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 16, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 17, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 17, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 18, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 18, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
gnomesysadmins pushed a commit to GNOME/pango that referenced this pull request Jul 18, 2019
Note that some of the harfbuzz api we use here
has not landed yet.
See harfbuzz/harfbuzz#1432
@behdad behdad closed this in 87e6284 Jul 18, 2019
ebraminio referenced this pull request Jul 19, 2019
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.
@ebraminio ebraminio deleted the metrics branch October 21, 2019 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants