Skip to main content

FontFuncsDispatch

Struct FontFuncsDispatch 

Source
pub(crate) struct FontFuncsDispatch<'a, 'u> {
    builtin: BuiltinFontFuncs<'a>,
    scale: Scale,
    funcs: Option<&'u mut (dyn FontFuncs + 'u)>,
}

Fields§

§builtin: BuiltinFontFuncs<'a>§scale: Scale§funcs: Option<&'u mut (dyn FontFuncs + 'u)>

Implementations§

Source§

impl<'a, 'u> FontFuncsDispatch<'a, 'u>

Source

pub(crate) fn new( face: &'a hb_font_t<'a>, scale: Scale, funcs: Option<&'u mut (dyn FontFuncs + 'u)>, ) -> Self

Source

pub(crate) fn font(&self) -> &'a hb_font_t<'a>

Source

pub(crate) fn scale(&self) -> &Scale

Source

fn scale_x(&self, value: i32) -> i32

Source

fn scale_y(&self, value: i32) -> i32

Source

fn scale_point(&self, point: (i32, i32)) -> (i32, i32)

Source

fn scale_extents(&self, extents: GlyphExtents) -> GlyphExtents

Source

pub(crate) fn nominal_glyph(&mut self, c: u32) -> Option<GlyphId>

Source

pub(crate) fn has_glyph(&mut self, c: u32) -> bool

Source

pub(crate) fn variant_glyph(&mut self, c: u32, vs: u32) -> Option<GlyphId>

Source

pub(crate) fn advance_width(&mut self, glyph: GlyphId) -> i32

Source

pub(crate) fn advance_height(&mut self, glyph: GlyphId) -> i32

Source

pub(crate) fn vertical_origin(&mut self, glyph: GlyphId) -> (i32, i32)

Source

pub(crate) fn extents(&mut self, glyph: GlyphId) -> Option<GlyphExtents>

Source

pub(crate) fn populate_advance_widths(&mut self, batch: AdvanceWidthBatch<'_>)

Auto Trait Implementations§

§

impl<'a, 'u> !Freeze for FontFuncsDispatch<'a, 'u>

§

impl<'a, 'u> !RefUnwindSafe for FontFuncsDispatch<'a, 'u>

§

impl<'a, 'u> !Send for FontFuncsDispatch<'a, 'u>

§

impl<'a, 'u> !Sync for FontFuncsDispatch<'a, 'u>

§

impl<'a, 'u> Unpin for FontFuncsDispatch<'a, 'u>

§

impl<'a, 'u> UnsafeUnpin for FontFuncsDispatch<'a, 'u>

§

impl<'a, 'u> !UnwindSafe for FontFuncsDispatch<'a, 'u>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.