Skip to content
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

Handle fontstack ascender/descender metadata #11

Open
2 tasks
jseppi opened this issue Nov 22, 2019 · 4 comments · May be fixed by #12
Open
2 tasks

Handle fontstack ascender/descender metadata #11

jseppi opened this issue Nov 22, 2019 · 4 comments · May be fixed by #12

Comments

@jseppi
Copy link

jseppi commented Nov 22, 2019

Related to mapbox/node-fontnik#160

When/if mapbox/node-fontnik#160 is shipped, the new ascender and descender metadata fields will need to be handled here as well (unless the functionality of this repo is moved into node-fontnik -- mapbox/node-fontnik#163).

We'll also need to figure out the desired behavior of combining ascender/descender metadata from the multiple fonts being composited. In discussing with @tristen, we think the compositing of that metadata should be: if all fonts in the composite have the same ascender/descender values, then use those, but if any are different, then use 0 (falling back to the current fixed value)

In summary:

Ref:

@jseppi jseppi linked a pull request Nov 25, 2019 that will close this issue
@springmeyer
Copy link

if all fonts in the composite have the same ascender/descender values, then use those, but if any are different, then use 0 (falling back to the current fixed value)

Have you tested this yet? Do most fonts use the same ascender/descender values such that the customized values will usually be respected? Or is it going to be very rare that we will not just zero them out?

@jseppi
Copy link
Author

jseppi commented Nov 26, 2019

@springmeyer When fonts from the same family are composited, then I think the customized ascender/descender values are likely to be the same. For example, in this test case with two different "Lato" variations being composited: https://github.com/mapbox/glyph-pbf-composite/pull/12/files#diff-c1129c8b045390789fa8ff62f2c6b4a9R132-R144

@jseppi
Copy link
Author

jseppi commented Dec 3, 2019

@springmeyer Does this sound ok to you?

@springmeyer
Copy link

@jseppi Thanks for the explanation. It seems like that is fine assuming users have control over their entire fontstack and understand the implications of each font they choose in the fontstack.

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 a pull request may close this issue.

2 participants