linebender / linebender/skribo
Interaction with CSS font matching algorithm
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 335
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
https://drafts.csswg.org/css-fonts/#font-matching-algorithm specifies a fairly precise algorithm. font-kit has [`Source::select_best_match`](https://docs.rs/font-kit/0.4.0/font_kit/source/trait.Source.html#method.select_best_match) which claims part of it, but which takes no text or code point and only returns a single font.
Skribo’s input at the moment is a `FontCollection` which contains `FontFamily`’s which contains fonts. In CSS the input has an ordered list of family *names* (each a string, or one of the 5 generic categories). There is also special handing of `@font-face` fonts v.s. system fonts.
For the use case of implementing CSS, how much of this should be implemented in Skribo v.s. font-kit? How much should be left to the user?
CC @raphlinus, @pcwalton
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
Start with the CSS Fonts font-matching algorithm and font-kit’s Source::select_best_match documentation, then compare them with Skribo’s FontCollection and FontFamily inputs. Done means documenting or agreeing which parts belong in Skribo, font-kit, or the caller, including handling of family names, generic categories, text or code points, and @font-face versus system fonts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100