pub struct StaticMetadata {Show 13 fields
pub units_per_em: u16,
pub all_source_axes: Axes,
pub axes: Axes,
pub named_instances: Vec<NamedInstance>,
pub variation_model: VariationModel,
pub number_values: HashMap<NormalizedLocation, BTreeMap<SmolStr, OrderedFloat<f64>>>,
pub names: HashMap<NameKey, String>,
pub postscript_names: Option<PostscriptNames>,
pub italic_angle: OrderedFloat<f64>,
pub build_vertical: bool,
pub misc: MiscMetadata,
pub gdef_categories: GdefCategories,
pub variations: Option<VariableFeature>,
/* private fields */
}Expand description
Global font info that cannot vary across the design space.
For example, upem, axis definitions, etc, as distinct from metadata that varies across design space such as ascender/descender.
Fields§
§units_per_em: u16§all_source_axes: AxesEvery axis used by the font being compiled, including point axes.
This is relatively rarely what you want.
axes: AxesEvery variable (non-point) axis used by the font being compiled.
If empty this is a static font.
named_instances: Vec<NamedInstance>Named locations in variation space
variation_model: VariationModelA model of how variation space is split into regions that have deltas.
This copy includes all locations used in the entire font. That is, every location any glyph has an instance. Use of a location not in the global model is an error. This model enforces the no delta at the default location constraint used in things like gvar.
number_values: HashMap<NormalizedLocation, BTreeMap<SmolStr, OrderedFloat<f64>>>Glyphsapp only; named numbers defined per-master
names: HashMap<NameKey, String>§postscript_names: Option<PostscriptNames>See https://learn.microsoft.com/en-us/typography/opentype/spec/post and https://github.com/adobe-type-tools/agl-specification
italic_angle: OrderedFloat<f64>Italic angle in counter-clockwise degrees from the vertical. Zero for upright fonts, negative for right-leaning fonts. See https://learn.microsoft.com/en-us/typography/opentype/spec/post.
build_vertical: boolRecords whether this font contains sufficient non-default vertical data to warrant building a vhea and vmtx table. (The criteria for Glyphs and UFO sources is different.)
misc: MiscMetadataMiscellaneous font-wide data that didn’t seem worthy of top billing
gdef_categories: GdefCategories§variations: Option<VariableFeature>Feature variation rules
Implementations§
Source§impl StaticMetadata
impl StaticMetadata
pub fn new( units_per_em: u16, names: HashMap<NameKey, String>, axes: Vec<Axis>, named_instances: Vec<NamedInstance>, global_locations: HashSet<NormalizedLocation>, postscript_names: Option<PostscriptNames>, italic_angle: f64, gdef_categories: GdefCategories, glyphsapp_number_values: Option<HashMap<NormalizedLocation, BTreeMap<SmolStr, OrderedFloat<f64>>>>, build_vertical: bool, ) -> Result<StaticMetadata, VariationModelError>
Sourcepub fn default_location(&self) -> &NormalizedLocation
pub fn default_location(&self) -> &NormalizedLocation
The default on all variable axes.
pub fn axis(&self, tag: &Tag) -> Option<&Axis>
Trait Implementations§
Source§impl Clone for StaticMetadata
impl Clone for StaticMetadata
Source§fn clone(&self) -> StaticMetadata
fn clone(&self) -> StaticMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StaticMetadata
impl Debug for StaticMetadata
Source§impl<'de> Deserialize<'de> for StaticMetadata
impl<'de> Deserialize<'de> for StaticMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StaticMetadata
Source§impl PartialEq for StaticMetadata
impl PartialEq for StaticMetadata
Source§fn eq(&self, other: &StaticMetadata) -> bool
fn eq(&self, other: &StaticMetadata) -> bool
self and other values to be equal, and is used by ==.Source§impl Persistable for StaticMetadata
impl Persistable for StaticMetadata
Source§impl Serialize for StaticMetadata
impl Serialize for StaticMetadata
impl StructuralPartialEq for StaticMetadata
Auto Trait Implementations§
impl Freeze for StaticMetadata
impl RefUnwindSafe for StaticMetadata
impl Send for StaticMetadata
impl Sync for StaticMetadata
impl Unpin for StaticMetadata
impl UnsafeUnpin for StaticMetadata
impl UnwindSafe for StaticMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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
T, using the provided data to resolve any offsets.