# Trait TableProvider

    pub trait TableProvider<'a> {
    Show 51 methods    // Required method
        fn data_for_tag(&self, tag: Tag) -> Option<FontData<'a>>;

        // Provided methods
        fn expect_data_for_tag(&self, tag: Tag) -> Result<FontData<'a>, ReadError> { ... }
        fn expect_table<T>(&self) -> Result<T, ReadError>
           where T: TopLevelTable + FontRead<'a> { ... }
        fn head(&self) -> Result<TableRef<'a, HeadMarker>, ReadError> { ... }
        fn name(&self) -> Result<TableRef<'a, NameMarker>, ReadError> { ... }
        fn hhea(&self) -> Result<TableRef<'a, HheaMarker>, ReadError> { ... }
        fn vhea(&self) -> Result<TableRef<'a, VheaMarker>, ReadError> { ... }
        fn hmtx(&self) -> Result<TableRef<'a, HmtxMarker>, ReadError> { ... }
        fn hdmx(&self) -> Result<TableRef<'a, HdmxMarker>, ReadError> { ... }
        fn vmtx(&self) -> Result<TableRef<'a, VmtxMarker>, ReadError> { ... }
        fn vorg(&self) -> Result<TableRef<'a, VorgMarker>, ReadError> { ... }
        fn fvar(&self) -> Result<TableRef<'a, FvarMarker>, ReadError> { ... }
        fn avar(&self) -> Result<TableRef<'a, AvarMarker>, ReadError> { ... }
        fn hvar(&self) -> Result<TableRef<'a, HvarMarker>, ReadError> { ... }
        fn vvar(&self) -> Result<TableRef<'a, VvarMarker>, ReadError> { ... }
        fn mvar(&self) -> Result<TableRef<'a, MvarMarker>, ReadError> { ... }
        fn maxp(&self) -> Result<TableRef<'a, MaxpMarker>, ReadError> { ... }
        fn os2(&self) -> Result<TableRef<'a, Os2Marker>, ReadError> { ... }
        fn post(&self) -> Result<TableRef<'a, PostMarker>, ReadError> { ... }
        fn gasp(&self) -> Result<TableRef<'a, GaspMarker>, ReadError> { ... }
        fn loca(
            &self,
            is_long: impl Into<Option<bool>>,
        ) -> Result<Loca<'a>, ReadError> { ... }
        fn glyf(&self) -> Result<TableRef<'a, GlyfMarker>, ReadError> { ... }
        fn gvar(&self) -> Result<TableRef<'a, GvarMarker>, ReadError> { ... }
        fn cvt(&self) -> Result<&'a [BigEndian<i16>], ReadError> { ... }
        fn cvar(&self) -> Result<TableRef<'a, CvarMarker>, ReadError> { ... }
        fn cff(&self) -> Result<Cff<'a>, ReadError> { ... }
        fn cff2(&self) -> Result<Cff2<'a>, ReadError> { ... }
        fn cmap(&self) -> Result<TableRef<'a, CmapMarker>, ReadError> { ... }
        fn gdef(&self) -> Result<TableRef<'a, GdefMarker>, ReadError> { ... }
        fn gpos(&self) -> Result<TableRef<'a, GposMarker>, ReadError> { ... }
        fn gsub(&self) -> Result<TableRef<'a, GsubMarker>, ReadError> { ... }
        fn feat(&self) -> Result<TableRef<'a, FeatMarker>, ReadError> { ... }
        fn ltag(&self) -> Result<TableRef<'a, LtagMarker>, ReadError> { ... }
        fn ankr(&self) -> Result<TableRef<'a, AnkrMarker>, ReadError> { ... }
        fn trak(&self) -> Result<TableRef<'a, TrakMarker>, ReadError> { ... }
        fn morx(&self) -> Result<TableRef<'a, MorxMarker>, ReadError> { ... }
        fn kerx(&self) -> Result<TableRef<'a, KerxMarker>, ReadError> { ... }
        fn kern(&self) -> Result<Kern<'a>, ReadError> { ... }
        fn colr(&self) -> Result<TableRef<'a, ColrMarker>, ReadError> { ... }
        fn cpal(&self) -> Result<TableRef<'a, CpalMarker>, ReadError> { ... }
        fn cblc(&self) -> Result<TableRef<'a, CblcMarker>, ReadError> { ... }
        fn cbdt(&self) -> Result<TableRef<'a, CbdtMarker>, ReadError> { ... }
        fn eblc(&self) -> Result<TableRef<'a, EblcMarker>, ReadError> { ... }
        fn ebdt(&self) -> Result<TableRef<'a, EbdtMarker>, ReadError> { ... }
        fn sbix(&self) -> Result<TableRef<'a, SbixMarker>, ReadError> { ... }
        fn stat(&self) -> Result<TableRef<'a, StatMarker>, ReadError> { ... }
        fn svg(&self) -> Result<TableRef<'a, SvgMarker>, ReadError> { ... }
        fn varc(&self) -> Result<TableRef<'a, VarcMarker>, ReadError> { ... }
        fn meta(&self) -> Result<TableRef<'a, MetaMarker>, ReadError> { ... }
        fn base(&self) -> Result<TableRef<'a, BaseMarker>, ReadError> { ... }
        fn dsig(&self) -> Result<TableRef<'a, DsigMarker>, ReadError> { ... }
    }

Expand description

An interface for accessing tables from a font (or font-like object)

## Required Methods§

#### fn data_for_tag(&self, tag: Tag) -> Option<FontData<'a>>

## Provided Methods§

#### fn expect_data_for_tag(&self, tag: Tag) -> Result<FontData<'a>, ReadError>

#### fn expect_table<T>(&self) -> Result<T, ReadError>
where T: TopLevelTable + FontRead<'a>,

#### fn head(&self) -> Result<TableRef<'a, HeadMarker>, ReadError>

#### fn name(&self) -> Result<TableRef<'a, NameMarker>, ReadError>

#### fn hhea(&self) -> Result<TableRef<'a, HheaMarker>, ReadError>

#### fn vhea(&self) -> Result<TableRef<'a, VheaMarker>, ReadError>

#### fn hmtx(&self) -> Result<TableRef<'a, HmtxMarker>, ReadError>

#### fn hdmx(&self) -> Result<TableRef<'a, HdmxMarker>, ReadError>

#### fn vmtx(&self) -> Result<TableRef<'a, VmtxMarker>, ReadError>

#### fn vorg(&self) -> Result<TableRef<'a, VorgMarker>, ReadError>

#### fn fvar(&self) -> Result<TableRef<'a, FvarMarker>, ReadError>

#### fn avar(&self) -> Result<TableRef<'a, AvarMarker>, ReadError>

#### fn hvar(&self) -> Result<TableRef<'a, HvarMarker>, ReadError>

#### fn vvar(&self) -> Result<TableRef<'a, VvarMarker>, ReadError>

#### fn mvar(&self) -> Result<TableRef<'a, MvarMarker>, ReadError>

#### fn maxp(&self) -> Result<TableRef<'a, MaxpMarker>, ReadError>

#### fn os2(&self) -> Result<TableRef<'a, Os2Marker>, ReadError>

#### fn post(&self) -> Result<TableRef<'a, PostMarker>, ReadError>

#### fn gasp(&self) -> Result<TableRef<'a, GaspMarker>, ReadError>

#### fn loca(&self, is_long: impl Into<Option<bool>>) -> Result<Loca<'a>, ReadError>

is_long can be optionally provided, if known, otherwise we look it up in head.

#### fn glyf(&self) -> Result<TableRef<'a, GlyfMarker>, ReadError>

#### fn gvar(&self) -> Result<TableRef<'a, GvarMarker>, ReadError>

#### fn cvt(&self) -> Result<&'a [BigEndian<i16>], ReadError>

Returns the array of entries for the control value table which is used for TrueType hinting.

#### fn cvar(&self) -> Result<TableRef<'a, CvarMarker>, ReadError>

#### fn cff(&self) -> Result<Cff<'a>, ReadError>

#### fn cff2(&self) -> Result<Cff2<'a>, ReadError>

#### fn cmap(&self) -> Result<TableRef<'a, CmapMarker>, ReadError>

#### fn gdef(&self) -> Result<TableRef<'a, GdefMarker>, ReadError>

#### fn gpos(&self) -> Result<TableRef<'a, GposMarker>, ReadError>

#### fn gsub(&self) -> Result<TableRef<'a, GsubMarker>, ReadError>

#### fn feat(&self) -> Result<TableRef<'a, FeatMarker>, ReadError>

#### fn ltag(&self) -> Result<TableRef<'a, LtagMarker>, ReadError>

#### fn ankr(&self) -> Result<TableRef<'a, AnkrMarker>, ReadError>

#### fn trak(&self) -> Result<TableRef<'a, TrakMarker>, ReadError>

#### fn morx(&self) -> Result<TableRef<'a, MorxMarker>, ReadError>

#### fn kerx(&self) -> Result<TableRef<'a, KerxMarker>, ReadError>

#### fn kern(&self) -> Result<Kern<'a>, ReadError>

#### fn colr(&self) -> Result<TableRef<'a, ColrMarker>, ReadError>

#### fn cpal(&self) -> Result<TableRef<'a, CpalMarker>, ReadError>

#### fn cblc(&self) -> Result<TableRef<'a, CblcMarker>, ReadError>

#### fn cbdt(&self) -> Result<TableRef<'a, CbdtMarker>, ReadError>

#### fn eblc(&self) -> Result<TableRef<'a, EblcMarker>, ReadError>

#### fn ebdt(&self) -> Result<TableRef<'a, EbdtMarker>, ReadError>

#### fn sbix(&self) -> Result<TableRef<'a, SbixMarker>, ReadError>

#### fn stat(&self) -> Result<TableRef<'a, StatMarker>, ReadError>

#### fn svg(&self) -> Result<TableRef<'a, SvgMarker>, ReadError>

#### fn varc(&self) -> Result<TableRef<'a, VarcMarker>, ReadError>

#### fn meta(&self) -> Result<TableRef<'a, MetaMarker>, ReadError>

#### fn base(&self) -> Result<TableRef<'a, BaseMarker>, ReadError>

#### fn dsig(&self) -> Result<TableRef<'a, DsigMarker>, ReadError>

## 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§

§

### impl<'a> TableProvider<'a> for FontRef<'a>