Skip to main content

TableType

Trait TableType 

Source
pub trait TableType: Table + Sized {
    const TAG: Tag;
    const COMPANION: Option<Tag> = None;

    // Required method
    fn decompile(data: &[u8], font: &mut Font) -> Result<Self>;

    // Provided methods
    fn decompile_as(tag: Tag, data: &[u8], font: &mut Font) -> Result<Self> { ... }
    fn new_as(tag: Tag) -> Self
       where Self: Default { ... }
}
Expand description

A table type with a fixed tag, which Font::get can return.

Required Associated Constants§

Source

const TAG: Tag

The tag of this table type.

Provided Associated Constants§

Source

const COMPANION: Option<Tag> = None

The tag of the beyond-64k companion that this type also implements, as GLYF for glyf. Font::get prefers it, as fontTools does with its "GLYF" if "GLYF" in font else "glyf".

Required Methods§

Source

fn decompile(data: &[u8], font: &mut Font) -> Result<Self>

Parses the table (decompile).

Provided Methods§

Source

fn decompile_as(tag: Tag, data: &[u8], font: &mut Font) -> Result<Self>

Parses the table under one of its tags.

Source

fn new_as(tag: Tag) -> Self
where Self: Default,

An empty table with one of its tags (newTable).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TableType for Ankr

Source§

impl TableType for AsciiTable

Source§

impl TableType for Avar

Source§

impl TableType for Base

Source§

impl TableType for Bgcl

Source§

impl TableType for Bhed

Source§

impl TableType for Bsln

Source§

impl TableType for Cff

Source§

impl TableType for Cff2

Source§

impl TableType for Cidg

Source§

impl TableType for Cmap

Source§

impl TableType for Colr

Source§

impl TableType for Cpal

Source§

impl TableType for Cvar

Source§

impl TableType for Cvt

Source§

impl TableType for Debg

Source§

impl TableType for Dmap

Source§

impl TableType for Dsig

Source§

impl TableType for Ebsc

Source§

impl TableType for fontoxide_ttlib::tables::graphite::Feat

Source§

impl TableType for fontoxide_ttlib::tables::otl::Feat

Source§

impl TableType for Fftm

Source§

impl TableType for Fpgm

Source§

impl TableType for Fvar

Source§

impl TableType for Gasp

Source§

impl TableType for Gcid

Source§

impl TableType for Gdef

Source§

impl TableType for Glat

Source§

impl TableType for Gloc

Source§

impl TableType for Glyf

Source§

impl TableType for Gpos

Source§

impl TableType for Gsub

Source§

impl TableType for Gvar

Source§

impl TableType for Hdmx

Source§

impl TableType for Head

Source§

impl TableType for Hhea

Source§

impl TableType for Hmtx

Source§

impl TableType for Hvar

Source§

impl TableType for Ift

Source§

impl TableType for Iftx

Source§

impl TableType for Jstf

Source§

impl TableType for Kern

Source§

impl TableType for Lcar

Source§

impl TableType for Loca

Source§

impl TableType for Ltag

Source§

impl TableType for Ltsh

Source§

impl TableType for Math

Source§

impl TableType for Maxp

Source§

impl TableType for Meta

Source§

impl TableType for Mort

Source§

impl TableType for Morx

Source§

impl TableType for Mvar

Source§

impl TableType for Name

Source§

impl TableType for Opbd

Source§

impl TableType for Os2

Source§

impl TableType for Post

Source§

impl TableType for Prep

Source§

impl TableType for Prop

Source§

impl TableType for Sbix

Source§

impl TableType for Silf

Source§

impl TableType for Sill

Source§

impl TableType for Stat

Source§

impl TableType for Svg

Source§

impl TableType for Trak

Source§

impl TableType for Tsi5

Source§

impl TableType for TsiIndex

Source§

const TAG: Tag = TSI0

Source§

impl TableType for TsiPrograms

Source§

const TAG: Tag = TSI1

Source§

impl TableType for Tsic

Source§

impl TableType for Varc

Source§

impl TableType for Vdmx

Source§

impl TableType for Vhea

Source§

impl TableType for Vmtx

Source§

impl TableType for Vorg

Source§

impl TableType for Vvar

Source§

impl<const COLOR: bool, const APPLE: bool> TableType for BitmapData<COLOR, APPLE>

Source§

impl<const COLOR: bool, const APPLE: bool> TableType for BitmapLocator<COLOR, APPLE>