Skip to main content

FontExt

Trait FontExt 

Source
pub trait FontExt: IsA<Font> + 'static {
    // Provided methods
    fn describe(&self) -> FontDescription { ... }
    fn describe_with_absolute_size(&self) -> FontDescription { ... }
    fn coverage(&self, language: &Language) -> Coverage { ... }
    fn face(&self) -> Option<FontFace> { ... }
    fn font_map(&self) -> Option<FontMap> { ... }
    fn glyph_extents(&self, glyph: u32) -> (Rectangle, Rectangle) { ... }
    fn languages(&self) -> Vec<Language> { ... }
    fn metrics(&self, language: Option<&Language>) -> FontMetrics { ... }
    fn has_char(&self, wc: char) -> bool { ... }
    fn serialize(&self) -> Bytes { ... }
}

Provided Methods§

Source

fn describe(&self) -> FontDescription

Source

fn describe_with_absolute_size(&self) -> FontDescription

Source

fn coverage(&self, language: &Language) -> Coverage

Source

fn face(&self) -> Option<FontFace>

Available on crate feature v1_46 only.
Source

fn font_map(&self) -> Option<FontMap>

Source

fn glyph_extents(&self, glyph: u32) -> (Rectangle, Rectangle)

Source

fn languages(&self) -> Vec<Language>

Available on crate feature v1_50 only.
Source

fn metrics(&self, language: Option<&Language>) -> FontMetrics

Source

fn has_char(&self, wc: char) -> bool

Available on crate feature v1_44 only.
Source

fn serialize(&self) -> Bytes

Available on crate feature v1_50 only.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<O> FontExt for O
where O: IsA<Font>,