Trait skrifa::MetadataProvider
source · pub trait MetadataProvider<'a>: TableProvider<'a> + Sized {
// Provided methods
fn attributes(&self) -> Attributes { ... }
fn axes(&self) -> AxisCollection<'a> { ... }
fn named_instances(&self) -> NamedInstanceCollection<'a> { ... }
fn localized_strings(&self, id: StringId) -> LocalizedStrings<'a> ⓘ { ... }
fn metrics(
&self,
size: Size,
location: impl Into<LocationRef<'a>>
) -> Metrics { ... }
fn glyph_metrics(
&self,
size: Size,
location: impl Into<LocationRef<'a>>
) -> GlyphMetrics<'a> { ... }
fn charmap(&self) -> Charmap<'a> { ... }
}Expand description
Interface for types that can provide font metadata.
Provided Methods§
sourcefn attributes(&self) -> Attributes
fn attributes(&self) -> Attributes
Returns the primary attributes for font classification– stretch, style and weight.
sourcefn axes(&self) -> AxisCollection<'a>
fn axes(&self) -> AxisCollection<'a>
Returns the collection of variation axes.
sourcefn named_instances(&self) -> NamedInstanceCollection<'a>
fn named_instances(&self) -> NamedInstanceCollection<'a>
Returns the collection of named variation instances.
sourcefn localized_strings(&self, id: StringId) -> LocalizedStrings<'a> ⓘ
fn localized_strings(&self, id: StringId) -> LocalizedStrings<'a> ⓘ
Returns an iterator over the collection of localized strings for the given informational string identifier.
sourcefn metrics(&self, size: Size, location: impl Into<LocationRef<'a>>) -> Metrics
fn metrics(&self, size: Size, location: impl Into<LocationRef<'a>>) -> Metrics
Returns the global font metrics for the specified size and location in normalized variation space.
sourcefn glyph_metrics(
&self,
size: Size,
location: impl Into<LocationRef<'a>>
) -> GlyphMetrics<'a>
fn glyph_metrics( &self, size: Size, location: impl Into<LocationRef<'a>> ) -> GlyphMetrics<'a>
Returns the glyph specific metrics for the specified size and location in normalized variation space.
Implementors§
impl<'a, T> MetadataProvider<'a> for Twhere T: TableProvider<'a>,
Blanket implementation of MetadataProvider for any type that implements
TableProvider.