Skip to main content

FontTableFunction

Struct FontTableFunction 

Source
pub struct FontTableFunction {
    table_fn: Arc<dyn Fn(Tag) -> Option<FontBlob> + Send + Sync>,
    tables: Arc<PerTableData<OnceLock<Option<(AtomicU8, FontBlob)>>>>,
}
Expand description

Lazy, per table font data provided by a function.

Fields§

§table_fn: Arc<dyn Fn(Tag) -> Option<FontBlob> + Send + Sync>§tables: Arc<PerTableData<OnceLock<Option<(AtomicU8, FontBlob)>>>>

Implementations§

Source§

impl FontTableFunction

Source

pub fn new(table_fn: Arc<dyn Fn(Tag) -> Option<FontBlob> + Send + Sync>) -> Self

Creates a new font table function with the given callback that should return a blob containing the table data for the requested tag.

Trait Implementations§

Source§

impl Clone for FontTableFunction

Source§

fn clone(&self) -> FontTableFunction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl From<FontTableFunction> for FontSource

Source§

fn from(value: FontTableFunction) -> Self

Converts to this type from the input type.
Source§

impl<'a> TableDataProvider<'a> for &'a FontTableFunction

Source§

type Entry = OnceLock<Option<(Atomic<u8>, FontBlob)>>

Source§

fn tables(&self) -> &'a PerTableData<Self::Entry>

Source§

fn table_state( &self, tag: Tag, entry: &'a Self::Entry, ) -> Option<TableState<'a>>

Source§

fn ankr(&self) -> Option<TableState<'a>>

Source§

fn avar(&self) -> Option<TableState<'a>>

Source§

fn base(&self) -> Option<TableState<'a>>

Source§

fn cff(&self) -> Option<TableState<'a>>

Source§

fn cff2(&self) -> Option<TableState<'a>>

Source§

fn cbdt(&self) -> Option<TableState<'a>>

Source§

fn cblc(&self) -> Option<TableState<'a>>

Source§

fn colr(&self) -> Option<TableState<'a>>

Source§

fn cpal(&self) -> Option<TableState<'a>>

Source§

fn cmap(&self) -> Option<TableState<'a>>

Source§

fn cvar(&self) -> Option<TableState<'a>>

Source§

fn cvt(&self) -> Option<TableState<'a>>

Source§

fn dsig(&self) -> Option<TableState<'a>>

Source§

fn ebdt(&self) -> Option<TableState<'a>>

Source§

fn eblc(&self) -> Option<TableState<'a>>

Source§

fn feat(&self) -> Option<TableState<'a>>

Source§

fn fpgm(&self) -> Option<TableState<'a>>

Source§

fn fvar(&self) -> Option<TableState<'a>>

Source§

fn gasp(&self) -> Option<TableState<'a>>

Source§

fn gdef(&self) -> Option<TableState<'a>>

Source§

fn glyf(&self) -> Option<TableState<'a>>

Source§

fn gpos(&self) -> Option<TableState<'a>>

Source§

fn gsub(&self) -> Option<TableState<'a>>

Source§

fn gvar(&self) -> Option<TableState<'a>>

Source§

fn hdmx(&self) -> Option<TableState<'a>>

Source§

fn head(&self) -> Option<TableState<'a>>

Source§

fn hhea(&self) -> Option<TableState<'a>>

Source§

fn hmtx(&self) -> Option<TableState<'a>>

Source§

fn hvar(&self) -> Option<TableState<'a>>

Source§

fn ift(&self) -> Option<TableState<'a>>

Source§

fn iftx(&self) -> Option<TableState<'a>>

Source§

fn jstf(&self) -> Option<TableState<'a>>

Source§

fn kern(&self) -> Option<TableState<'a>>

Source§

fn kerx(&self) -> Option<TableState<'a>>

Source§

fn loca(&self) -> Option<TableState<'a>>

Source§

fn ltag(&self) -> Option<TableState<'a>>

Source§

fn math(&self) -> Option<TableState<'a>>

Source§

fn maxp(&self) -> Option<TableState<'a>>

Source§

fn meta(&self) -> Option<TableState<'a>>

Source§

fn morx(&self) -> Option<TableState<'a>>

Source§

fn mvar(&self) -> Option<TableState<'a>>

Source§

fn name(&self) -> Option<TableState<'a>>

Source§

fn os2(&self) -> Option<TableState<'a>>

Source§

fn post(&self) -> Option<TableState<'a>>

Source§

fn prep(&self) -> Option<TableState<'a>>

Source§

fn sbix(&self) -> Option<TableState<'a>>

Source§

fn stat(&self) -> Option<TableState<'a>>

Source§

fn svg(&self) -> Option<TableState<'a>>

Source§

fn trak(&self) -> Option<TableState<'a>>

Source§

fn varc(&self) -> Option<TableState<'a>>

Source§

fn vhea(&self) -> Option<TableState<'a>>

Source§

fn vmtx(&self) -> Option<TableState<'a>>

Source§

fn vorg(&self) -> Option<TableState<'a>>

Source§

fn vvar(&self) -> Option<TableState<'a>>

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.