Trait harfbuzz_rs::FontFuncs[][src]

pub trait FontFuncs {
    fn get_font_h_extents(&self, font: &Font) -> Option<FontExtents> { ... }
fn get_font_v_extents(&self, font: &Font) -> Option<FontExtents> { ... }
fn get_nominal_glyph(&self, font: &Font, unicode: char) -> Option<Glyph> { ... }
fn get_variation_glyph(
        &self,
        font: &Font,
        unicode: char,
        variation_sel: char
    ) -> Option<Glyph> { ... }
fn get_glyph_h_advance(&self, font: &Font, glyph: Glyph) -> Position { ... }
fn get_glyph_v_advance(&self, font: &Font, glyph: Glyph) -> Position { ... }
fn get_glyph_h_origin(
        &self,
        font: &Font,
        glyph: Glyph
    ) -> Option<(Position, Position)> { ... }
fn get_glyph_v_origin(
        &self,
        font: &Font,
        glyph: Glyph
    ) -> Option<(Position, Position)> { ... }
fn get_glyph_h_kerning(
        &self,
        font: &Font,
        left: Glyph,
        right: Glyph
    ) -> Position { ... }
fn get_glyph_v_kerning(
        &self,
        font: &Font,
        before: Glyph,
        after: Glyph
    ) -> Position { ... }
fn get_glyph_extents(
        &self,
        font: &Font,
        glyph: Glyph
    ) -> Option<GlyphExtents> { ... }
fn get_glyph_contour_point(
        &self,
        font: &Font,
        glyph: Glyph,
        point_index: u32
    ) -> Option<(Position, Position)> { ... }
fn get_glyph_name(&self, font: &Font, glyph: Glyph) -> Option<String> { ... }
fn get_glyph_from_name(&self, font: &Font, name: &str) -> Option<Glyph> { ... } }

This Trait specifies the font callbacks that harfbuzz uses for its shaping. You shouldn't call these functions yourself. They are exposed through the Font wrapper.

No function in this trait needs to be implemented, the default implementations simply return the parent font's data. If a Font is created directly from a face, its parent is the empty Font which returns null values for every font func.

Provided Methods

Implementors