mapbox / mapbox/glyph-pbf-composite
Handle fontstack ascender/descender metadata
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Related to https://github.com/mapbox/node-fontnik/pull/160
When/if https://github.com/mapbox/node-fontnik/pull/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` -- https://github.com/mapbox/node-fontnik/pull/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:
- [ ] Add `ascender` and `descender` to `fontstack` in `glyphs.proto`, as in https://github.com/mapbox/node-fontnik/pull/160/files#diff-f5607f797a3301f210b1a4e9f7db4ffdR30-R31
- [ ] Implement `ascender`/`descender` compositing in `.composite()`
Ref:
- https://github.com/mapbox/mapbox-gl-native/pull/15676
- https://github.com/mapbox/mapbox-gl-js/pull/8781
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review glyphs.proto and the .composite() implementation, then check node-fontnik PR 160 and the possible move described in PR 163. Add ascender and descender to fontstack and make composite metadata use the shared values only when all fonts agree, otherwise falling back to 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100