pub struct Font {Show 17 fields
pub units_per_em: u16,
pub axes: Vec<Axis>,
pub masters: Vec<FontMaster>,
pub default_master_idx: usize,
pub glyphs: BTreeMap<SmolStr, Glyph>,
pub glyph_order: Vec<SmolStr>,
pub axis_mappings: UserToDesignMapping,
pub virtual_masters: Vec<BTreeMap<String, OrderedFloat<f64>>>,
pub features: Vec<FeatureSnippet>,
pub names: BTreeMap<String, String>,
pub instances: Vec<Instance>,
pub version_major: i32,
pub version_minor: u32,
pub date: Option<String>,
pub kerning_ltr: Kerning,
pub kerning_rtl: Kerning,
pub custom_parameters: CustomParameters,
}Expand description
A tidied up font from a plist.
Normalized representation of Glyphs 2/3 content
Fields§
§units_per_em: u16§axes: Vec<Axis>§masters: Vec<FontMaster>§default_master_idx: usize§glyphs: BTreeMap<SmolStr, Glyph>§glyph_order: Vec<SmolStr>§axis_mappings: UserToDesignMapping§virtual_masters: Vec<BTreeMap<String, OrderedFloat<f64>>>§features: Vec<FeatureSnippet>§names: BTreeMap<String, String>§instances: Vec<Instance>§version_major: i32§version_minor: u32§date: Option<String>§kerning_ltr: Kerning§kerning_rtl: Kerning§custom_parameters: CustomParametersImplementations§
Source§impl Font
impl Font
pub fn load_from_string(data: &str) -> Result<Font, Error>
pub fn load(glyphs_file: &Path) -> Result<Font, Error>
pub fn default_master(&self) -> &FontMaster
Sourcepub fn variable_export_settings(&self, master: &FontMaster) -> Option<&Instance>
pub fn variable_export_settings(&self, master: &FontMaster) -> Option<&Instance>
pub fn vendor_id(&self) -> Option<&String>
Source§impl Font
impl Font
Sourcepub fn propagate_all_anchors(&mut self)
pub fn propagate_all_anchors(&mut self)
Copy anchors from component glyphs into their including composites
Trait Implementations§
impl StructuralPartialEq for Font
Auto Trait Implementations§
impl Freeze for Font
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl UnwindSafe for Font
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.