pub struct Instance {
pub name: String,
pub active: bool,
pub is_bold: bool,
pub is_italic: bool,
pub link_style: Option<String>,
pub weight_class: Option<u16>,
pub width_class: Option<u16>,
pub type_: InstanceType,
pub axis_mappings: BTreeMap<String, AxisUserToDesignMap>,
pub axes_values: Vec<OrderedFloat<f64>>,
pub custom_parameters: CustomParameters,
/* private fields */
}Fields§
§name: String§active: bool§is_bold: bool§is_italic: bool§link_style: Option<String>§weight_class: Option<u16>§width_class: Option<u16>§type_: InstanceType§axis_mappings: BTreeMap<String, AxisUserToDesignMap>§axes_values: Vec<OrderedFloat<f64>>§custom_parameters: CustomParametersImplementations§
Source§impl Instance
impl Instance
pub fn family_name(&self) -> Option<&str>
pub fn default_names(&self) -> impl Iterator<Item = (&str, &str)>
pub fn get_default_name(&self, key: &str) -> Option<&str>
Sourcepub fn has_property(&self, key: &str) -> bool
pub fn has_property(&self, key: &str) -> bool
Whether the instance has a property under this key, in any language.
Sourcepub fn localized_names(&self) -> impl Iterator<Item = (&str, &str, &str)>
pub fn localized_names(&self) -> impl Iterator<Item = (&str, &str, &str)>
Iterate over the instance’s localized name entries, as (property key, language code, value); the default languages (“dflt”, “default”, “ENG”) are excluded.
Sourcepub fn postscript_name(&self) -> Option<&str>
pub fn postscript_name(&self) -> Option<&str>
Get the optional postscript name to use for the fvar named instance.
Trait Implementations§
impl StructuralPartialEq for Instance
Auto Trait Implementations§
impl Forget for Instance
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnsafeUnpin for Instance
impl UnwindSafe for Instance
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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.