Module font
Expand description
The font implementations for typst worlds.
The core concept is the FontResolver, implemented by
FontResolverImpl.
You can construct a FontResolverImpl on systems, browsers or simply
without touching any external environment. See the system, web and
pure crates for more details.
The FontResolverImpl has a lot of FontSlot objects and allow to load
font resources lazily.
There are also other structs, which help store and load
[typst::text::FontInfo] objects in the local file system or the remote
machine. See the cache and profile crates for more details.
Modules§
- cache
- The cache of the font info.
- memory
- Font searchers to run the compiler in the generic environment (for example,
nostd). - system
- The font searcher to run the compiler in the system environment.
- web
- Font searchers to run the compiler in the browser environment.
Structs§
- Buffer
Font Loader - Loads a font from a buffer.
- Font
Info Item - The item of the font profile.
- Font
Profile - The profile of the font.
- Font
Profile Item - The item of the font profile.
- Font
Resolver Impl - The default FontResolver implementation.
- Font
Slot - A font slot holds a reference to a font resource. It can be created from
- Lazy
Buffer Font Loader - Loads a font from a reader.
Traits§
- Font
Loader - A FontLoader helps load a font from somewhere.
- Font
Resolver - A
FontResolvercan resolve a font by index. It also provides FontBook for typst to query fonts. - Reusable
Font Resolver - A reusable font resolver.
Functions§
- get_
font_ coverage_ hash - Gets the coverage hash of the font.