linebender / linebender/skribo
Choice of font fallback API on macOS
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 335
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
My writing on font fallback (see [font fallback blog post](https://raphlinus.github.io/rust/skribo/text/2019/04/04/font-fallback.html)) has generally suggested using [CTFontCopyDefaultCascadeListForLanguages](https://developer.apple.com/documentation/coretext/1509992-ctfontcopydefaultcascadelistforl). Responding on [Twitter](https://twitter.com/jjgod/status/1124697964058832898), Jiang Jiang suggests we use [CTFontCreateForString](https://developer.apple.com/documentation/coretext/1509506-ctfontcreateforstring) instead.
This is much more like the Windows approach, and saves the trouble of having to go through a long font list, but on the other hand involves calling into CoreText API's on a fine grained basis every time a layout is needed. Part of my idea of getting the cascade list is that it could be retained on a per-locale basis.
Probably measurement is needed to figure out which is better. If CTFontCreateForString is very fast, then maybe that is the best choice.
Contributor guide
No contributing guide indexed for this repository
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
Compare CTFontCopyDefaultCascadeListForLanguages with CTFontCreateForString for macOS font fallback, including the per-locale cascade-list approach and fine-grained CoreText calls described in the issue. Measure their behavior during text layout and use the results to recommend which API approach Skribo should adopt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- operating-systems, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100