Overview
graphitepdf-font models font families, variants, sources, standard fonts, emoji sources, and font loading for the GraphitePDF workspace.
Scope
graphitepdf-font contains:
FontDescriptor,FontStyle, andFontWeightFontSourcefor local, remote, data-URI, and standard-font inputs- registration types such as
FontRegistrationandFontFamilyRegistration FontStorefor lookup, loading, emoji URL resolution, and hyphenation callbacks
Installation
API Summary
| Category | Items |
|---|---|
| Font identity | FontDescriptor, FontStyle, FontWeight, StandardFont |
| Font sources | FontSource |
| Registration | FontRegistration, FontVariantRegistration, FontFamilyRegistration |
| Runtime store | FontStore, LoadedFont, RegisteredFont |
| Emoji and fallback | EmojiSource, EmojiFormat, HyphenationCallback |
Example
use ;
async
Design Principles
- keep font identity and loading separate from text layout policy
- support multiple source types without hiding fallibility
- expose standard-font behavior as first-class data
- make fallback and emoji integration explicit rather than magical
Role In GraphitePDF
This crate is a shared service used by textkit, layout, render, style, and kit. It is the workspace's central place for describing and resolving fonts.
License
MIT