Home
Author Manual
Themes Guide
Development
Overview
fpm::Config
fpm::Document
fpm::Error
fpm::File
fpm::Font
fpm::Package
fpm::render
fpm::Result
fpm::StaticFile

fpm::Font

fpm::Font struct keeps track of a font. Fonts are defined in FPM.ftd file and are stored in fpm::Package struct after parsing.
#[derive(serde::Deserialize, Debug, Clone)]
pub struct Font {
    pub name: String,
    woff: Option<String>,
    woff2: Option<String>,
    truetype: Option<String>,
    opentype: Option<String>,
    #[serde(rename = "embedded-opentype")]
    embedded_opentype: Option<String>,
    svg: Option<String>,
    #[serde(rename = "unicode-range")]
    unicode_range: Option<String>,
    display: Option<String>,
    style: Option<String>,
    weight: Option<String>,
    stretch: Option<String>,
}