FontCollectionBaseImpl
trait · ferroui-base · v0.5.0
trait FontCollectionBaseImpl: Sized + 'static
The abstract and virtual members of a font collection deriving from
FontCollectionBase.
this is the collection itself. A default implementation is the base
class behaviour; an override calls it with
FontCollectionBase::<member>(this, ..).
Members
basekeytry_match_charactertry_match_character_from_platformtry_create_synthetic_glyph_typefacetry_get_glyph_typefacetry_get_family_typefaces
base
fn base(this: &Self) -> &FontCollectionBase
The base class state of the collection.
key
fn key(this: &Self) -> url::Url
Gets the unique identifier for the font collection (a URL of the
fonts: scheme, see IFontCollection::key).
try_match_character
fn try_match_character(this: &Self, codepoint: i32, style: FontStyle, weight: FontWeight, stretch: FontStretch, family_name: Option<&str>, culture: Option<&Locale>) -> Option<Typeface>
Tries to match a specified character to a Typeface that supports
specified font properties.
try_match_character_from_platform
fn try_match_character_from_platform(_this: &Self, _codepoint: i32, _key: FontCollectionKey, _family_name: Option<&str>, _culture: Option<&Locale>) -> Option<Rc<GlyphTypeface>>
Hook for platform-backed collections (e.g. the system font collection)
to consult the underlying font manager for a fallback typeface.
Invoked at most once per (script-bucket, culture) pair from
FontCollectionBase::try_match_character.
try_create_synthetic_glyph_typeface
fn try_create_synthetic_glyph_typeface(this: &Self, glyph_typeface: &Rc<GlyphTypeface>, style: FontStyle, weight: FontWeight, stretch: FontStretch) -> Option<Rc<GlyphTypeface>>
Try to get a synthetic glyph typeface for given parameters.
try_get_glyph_typeface
fn try_get_glyph_typeface(this: &Self, family_name: &str, style: FontStyle, weight: FontWeight, stretch: FontStretch) -> Option<Rc<GlyphTypeface>>
Try to get a glyph typeface for given parameters.
try_get_family_typefaces
fn try_get_family_typefaces(this: &Self, family_name: &str) -> Option<Vec<Typeface>>
Tries to get a list of typefaces for the specified family name.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.