Skip to main content

Module fonts

Module fonts 

Source
Expand description

Discovery of TrueType fonts under the configured crate::config::Config::fonts_directory.

Scanned once at startup. The render workers then resolve a client-supplied font_id (the filename basename) to a path under that directory and load it via sl_map_apis::text::load_font. Display names come from sl_map_apis::text::embedded_font_name (falling back to sl_map_apis::text::display_name_from_file_name). The library never bundles a font; every font the user can pick comes from this directory.

Structs§

FontDirectory
Index of available fonts. Built once at startup, then cloned into AppState as an Arc<FontDirectory>.
FontInfo
Public metadata for a single font discovered at startup. Sent to the browser by GET /api/fonts.

Enums§

FontDirectoryError
Errors that can occur while scanning a fonts directory.