Type Alias fonts::FontTemplateRef

source ·
pub type FontTemplateRef = Arc<AtomicRefCell<FontTemplate>>;
Expand description

A reference to a FontTemplate with shared ownership and mutability.

Aliased Type§

struct FontTemplateRef { /* private fields */ }

Trait Implementations§

source§

impl FontTemplateRefMethods for FontTemplateRef

source§

fn descriptor(&self) -> FontTemplateDescriptor

Get the descriptor.
source§

fn identifier(&self) -> FontIdentifier

Get the FontIdentifier for this template.
source§

fn matches_font_descriptor(&self, descriptor_to_match: &FontDescriptor) -> bool

Returns true if the given descriptor matches the one in this FontTemplate.
source§

fn descriptor_distance(&self, descriptor_to_match: &FontDescriptor) -> f32

Calculate the distance from this FontTemplates descriptor and return it or None if this is not a valid FontTemplate.
source§

fn char_in_unicode_range(&self, character: char) -> bool

Whether or not this character is in the unicode ranges specified in this temlates @font-face definition, if any.