Module font

Source
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.

Re-exports§

pub use memory as pure;

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§

BufferFontLoader
Loads a font from a buffer.
FontInfoItem
The item of the font profile.
FontProfile
The profile of the font.
FontProfileItem
The item of the font profile.
FontResolverImpl
The default FontResolver implementation.
FontSlot
A font slot holds a reference to a font resource. It can be created from
LazyBufferFontLoader
Loads a font from a reader.

Traits§

FontLoader
A FontLoader helps load a font from somewhere.
FontResolver
A FontResolver can resolve a font by index. It also provides FontBook for typst to query fonts.
ReusableFontResolver
A reusable font resolver.

Functions§

get_font_coverage_hash
Gets the coverage hash of the font.