@kkaefer, is this something harfbuzz can produce?
Otherwise, the median bottom edge would probably be a good approximation.
Why did you close this?
Not sure, reopening
Should this move to fontserver?
@ansis Not sure if this ticket is still relevant, but Harfbuzz is not necessary (FreeType is sufficient) for getting ascender (distance from top to baseline) for a font face. I have an open PR at https://github.com/mapbox/node-fontnik/pull/50 for #154 that implements this and adds it to the glyph PBF (note that all glyphs in a face have the same ascender, so the PBF structure could be optimized a bit here)
re-opening because this is still hardcoded in -js: https://github.com/mapbox/mapbox-gl-js/blob/ec62ab898ace8b66f43b5fb586732e6328278604/js/symbol/shaping.js#L33
@mikemorris https://github.com/mapbox/node-fontnik/pull/50/files got merged into master but master doesn't have the ascender version?
@ansis Looks like we never updated the PBF spec in https://github.com/mapbox/node-fontnik/blob/master/proto/glyphs.proto, I started work on this in https://github.com/mapbox/node-fontnik/pull/97 but it never got merged.
@ansis I think there's more detail on our current implementation in https://github.com/mapbox/mapbox-gl-js/issues/154
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.
@ChrisLoer @ansis @kkaefer Is this something we can move on before switching to Harfbuzz? What would it require to accomplish this? It continues to be a visible issue:
Please let me know if there's anything I can do to help resolve this 🙏
@nickidlugash I think this is something we can work on without Harfbuzz. It does unfortunately require server-side changes -- i.e. we need to get node-fontnik to send the metadata down to the client. Hopefully we can add that to the glyph PBF is a backward compatible way, and just use the baseline if it's there, otherwise fall back to our hardwired value.
Unearthing this issue as deriving this from a fonts metadata instead of using a fixed value would greatly improve labels using mixed font families.

we need to get node-fontnik to send the metadata down to the client.
@springmeyer wanted to put this on your radar. The only related issue I saw in that project was https://github.com/mapbox/node-fontnik/issues/51
@tristen There's an abandoned PR in which I started most of the work for this at https://github.com/mapbox/node-fontnik/pull/97
👋 @tristen - If someone from @mapbox/map-design-team wants to tackle this I'd be happy to help get them up to speed on node-fontnik development. /cc @jseppi @agentpu1011 @ian29 @brsbl @philogb
Re-earthing @mikemorris's initial work in a new pr https://github.com/mapbox/node-fontnik/pull/160. That should address the downstream work to enable this.
Most helpful comment
Re-earthing @mikemorris's initial work in a new pr https://github.com/mapbox/node-fontnik/pull/160. That should address the downstream work to enable this.