-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Use font-provided metadata to determine glyph height #154
Comments
This needs to happen when shaping the text, and we need to include that information into the shaping result. |
@kkaefer @ansis The glyph ascender is now added to |
I think so, but lets see what @kkaefer says. This would be a breaking change, right? |
Yea, it would unfortunately be a breaking change @ansis. |
We could do this without a breaking change; just add the ascender property as well. When reading the metrics and we don't have an ascender, we use the current algorithm, if we do have the ascender, we use to to position the font. |
Opened a pull request enabling this with a few questions at mapbox/node-fontnik#50 @kkaefer @ansis |
Could this be causing mapbox/mapbox-gl-style-spec#61 @nickidlugash? |
Inadvertently closed due to some 🌳 history magic — reopening. |
Closing as stale. I haven't seen this become a practical concern yet. |
Assuming that this will be subsumed by @ChrisLoer's push on fonts + harfbuzz. |
Ah! Good point. We can keep this open to track this aspect of our text shaping work. |
We currently hardcode the glyph height so that we place the line centrally on the line. We should someone deduce the offset from the font metrics (or the shaped text bbox?)
The text was updated successfully, but these errors were encountered: