Skip to main content

FontTables

Struct FontTables 

Source
pub(crate) struct FontTables(TableSource);
Expand description

Individual font table access.

Tuple Fields§

§0: TableSource

Implementations§

Source§

impl FontTables

Source

pub fn ankr_data(&self) -> Option<&[u8]>

Anchor point table data.

See the ankr specification.

Source

pub fn avar_data(&self) -> Option<&[u8]>

Axis variation table data.

See the avar specification.

Source

pub fn base_data(&self) -> Option<&[u8]>

Baseline table data.

See the BASE specification.

Source

pub fn cff_data(&self) -> Option<&[u8]>

Compact font format table data.

See the CFF specification.

Source

pub fn cff2_data(&self) -> Option<&[u8]>

Compact font format 2.0 table data.

See the CFF2 specification.

Source

pub fn cbdt_data(&self) -> Option<&[u8]>

Color bitmap data table data.

See the CBDT specification.

Source

pub fn cblc_data(&self) -> Option<&[u8]>

Color bitmap location table data.

See the CBLC specification.

Source

pub fn colr_data(&self) -> Option<&[u8]>

Color table data.

See the COLR specification.

Source

pub fn cpal_data(&self) -> Option<&[u8]>

Color palette table data.

See the CPAL specification.

Source

pub fn cmap_data(&self) -> Option<&[u8]>

Character to glyph mapping table data.

See the cmap specification.

Source

pub fn cvar_data(&self) -> Option<&[u8]>

CVT variations table data.

See the cvar specification.

Source

pub fn cvt_data(&self) -> Option<&[u8]>

Control value table data.

See the cvt specification.

Source

pub fn dsig_data(&self) -> Option<&[u8]>

Digital signature table data.

See the DSIG specification.

Source

pub fn ebdt_data(&self) -> Option<&[u8]>

Embedded bitmap data table data.

See the EBDT specification.

Source

pub fn eblc_data(&self) -> Option<&[u8]>

Embedded bitmap location data table data.

See the EBLC specification.

Source

pub fn feat_data(&self) -> Option<&[u8]>

Font feature table data.

See the feat specification.

Source

pub fn fpgm_data(&self) -> Option<&[u8]>

Font program table data.

See the fpgm specification.

Source

pub fn fvar_data(&self) -> Option<&[u8]>

Font variations table data.

See the fvar specification.

Source

pub fn gasp_data(&self) -> Option<&[u8]>

Grid-fitting and scan-conversion procedure table data.

See the gasp specification.

Source

pub fn gdef_data(&self) -> Option<&[u8]>

Glyph definition table data.

See the GDEF specification.

Source

pub fn glyf_data(&self) -> Option<&[u8]>

TrueType glyph data table data.

See the glyf specification.

Source

pub fn gpos_data(&self) -> Option<&[u8]>

Glyph positioning table data.

See the GPOS specification.

Source

pub fn gsub_data(&self) -> Option<&[u8]>

Glyph substitution table data.

See the GSUB specification.

Source

pub fn gvar_data(&self) -> Option<&[u8]>

Glyph variation table data.

See the gvar specification.

Source

pub fn hdmx_data(&self) -> Option<&[u8]>

Horizontal device metrics data.

See the hdmx specification.

Source

pub fn head_data(&self) -> Option<&[u8]>

Font header table data.

See the head specification.

Source

pub fn hhea_data(&self) -> Option<&[u8]>

Horizontal header table data.

See the hhea specification.

Source

pub fn hmtx_data(&self) -> Option<&[u8]>

Horizontal metrics table data.

See the hmtx specification.

Source

pub fn hvar_data(&self) -> Option<&[u8]>

Horizontal metrics variation table data.

See the HVAR specification.

Source

pub fn ift_data(&self) -> Option<&[u8]>

Incremental font transfer table data.

See the IFT specification.

Source

pub fn iftx_data(&self) -> Option<&[u8]>

Incremental font transfer table data.

See the IFTX specification.

Source

pub fn jstf_data(&self) -> Option<&[u8]>

Justification table data.

See the JSTF specification.

Source

pub fn kern_data(&self) -> Option<&[u8]>

Kerning table data.

See the kern specification.

Source

pub fn kerx_data(&self) -> Option<&[u8]>

Extended kerning table data.

See the kerx specification.

Source

pub fn loca_data(&self) -> Option<&[u8]>

Index to location table data.

See the loca specification.

Source

pub fn ltag_data(&self) -> Option<&[u8]>

Language tag table data.

See the ltag specification.

Source

pub fn math_data(&self) -> Option<&[u8]>

Mathematical typesetting table data.

See the MATH specification.

Source

pub fn maxp_data(&self) -> Option<&[u8]>

Maximum profile table data.

See the maxp specification.

Source

pub fn meta_data(&self) -> Option<&[u8]>

Metadata table data.

See the meta specification.

Source

pub fn morx_data(&self) -> Option<&[u8]>

Extended metamorphosis table data.

See the morx specification.

Source

pub fn mvar_data(&self) -> Option<&[u8]>

Metrics variation table data.

See the MVAR specification.

Source

pub fn name_data(&self) -> Option<&[u8]>

Naming table data.

See the name specification.

Source

pub fn os2_data(&self) -> Option<&[u8]>

OS/2 and Windows-specific metrics table data.

See the OS/2 specification.

Source

pub fn post_data(&self) -> Option<&[u8]>

PostScript information table data.

See the post specification.

Source

pub fn prep_data(&self) -> Option<&[u8]>

Control value program table data.

See the prep specification.

Source

pub fn sbix_data(&self) -> Option<&[u8]>

Standard bitmap graphics table data.

See the sbix specification.

Source

pub fn stat_data(&self) -> Option<&[u8]>

Style attributes table data.

See the STAT specification.

Source

pub fn svg_data(&self) -> Option<&[u8]>

Scalable vector graphics table data.

See the SVG specification.

Source

pub fn trak_data(&self) -> Option<&[u8]>

Tracking table data.

See the trak specification.

Source

pub fn varc_data(&self) -> Option<&[u8]>

Variable composite/component table data.

See the VARC specification.

Source

pub fn vhea_data(&self) -> Option<&[u8]>

Vertical header table data.

See the vhea specification.

Source

pub fn vmtx_data(&self) -> Option<&[u8]>

Vertical metrics table data.

See the vmtx specification.

Source

pub fn vorg_data(&self) -> Option<&[u8]>

Vertical origin table data.

See the VORG specification.

Source

pub fn vvar_data(&self) -> Option<&[u8]>

Vertical metrics variation table data.

See the VVAR specification.

Source§

impl FontTables

Source

pub fn new( source: impl Into<FontSource>, index: u32, ) -> Result<FontTables, ReadError>

Creates a new set of font tables for the given source.

Trait Implementations§

Source§

impl<'a> TableProvider<'a> for &'a FontTables

Source§

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.

Source§

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

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

Source§

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

Source§

fn head(&self) -> Result<Head<'a>, ReadError>

Source§

fn name(&self) -> Result<Name<'a>, ReadError>

Source§

fn hhea(&self) -> Result<Hhea<'a>, ReadError>

Source§

fn vhea(&self) -> Result<Vhea<'a>, ReadError>

Source§

fn hmtx(&self) -> Result<Hmtx<'a>, ReadError>

Source§

fn hdmx(&self) -> Result<Hdmx<'a>, ReadError>

Source§

fn vmtx(&self) -> Result<Vmtx<'a>, ReadError>

Source§

fn vorg(&self) -> Result<Vorg<'a>, ReadError>

Source§

fn fvar(&self) -> Result<Fvar<'a>, ReadError>

Source§

fn avar(&self) -> Result<Avar<'a>, ReadError>

Source§

fn hvar(&self) -> Result<Hvar<'a>, ReadError>

Source§

fn vvar(&self) -> Result<Vvar<'a>, ReadError>

Source§

fn mvar(&self) -> Result<Mvar<'a>, ReadError>

Source§

fn maxp(&self) -> Result<Maxp<'a>, ReadError>

Source§

fn os2(&self) -> Result<Os2<'a>, ReadError>

Source§

fn post(&self) -> Result<Post<'a>, ReadError>

Source§

fn gasp(&self) -> Result<Gasp<'a>, ReadError>

Source§

fn glyf(&self) -> Result<Glyf<'a>, ReadError>

Source§

fn gvar(&self) -> Result<Gvar<'a>, ReadError>

Source§

fn cvar(&self) -> Result<Cvar<'a>, ReadError>

Source§

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

Source§

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

Source§

fn cmap(&self) -> Result<Cmap<'a>, ReadError>

Source§

fn gdef(&self) -> Result<Gdef<'a>, ReadError>

Source§

fn gpos(&self) -> Result<Gpos<'a>, ReadError>

Source§

fn gsub(&self) -> Result<Gsub<'a>, ReadError>

Source§

fn feat(&self) -> Result<Feat<'a>, ReadError>

Source§

fn ltag(&self) -> Result<Ltag<'a>, ReadError>

Source§

fn ankr(&self) -> Result<Ankr<'a>, ReadError>

Source§

fn trak(&self) -> Result<Trak<'a>, ReadError>

Source§

fn morx(&self) -> Result<Morx<'a>, ReadError>

Source§

fn kerx(&self) -> Result<Kerx<'a>, ReadError>

Source§

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

Source§

fn colr(&self) -> Result<Colr<'a>, ReadError>

Source§

fn cpal(&self) -> Result<Cpal<'a>, ReadError>

Source§

fn cblc(&self) -> Result<Cblc<'a>, ReadError>

Source§

fn cbdt(&self) -> Result<Cbdt<'a>, ReadError>

Source§

fn eblc(&self) -> Result<Eblc<'a>, ReadError>

Source§

fn ebdt(&self) -> Result<Ebdt<'a>, ReadError>

Source§

fn sbix(&self) -> Result<Sbix<'a>, ReadError>

Source§

fn stat(&self) -> Result<Stat<'a>, ReadError>

Source§

fn svg(&self) -> Result<Svg<'a>, ReadError>

Source§

fn varc(&self) -> Result<Varc<'a>, ReadError>

Source§

fn meta(&self) -> Result<Meta<'a>, ReadError>

Source§

fn base(&self) -> Result<Base<'a>, ReadError>

Source§

fn dsig(&self) -> Result<Dsig<'a>, ReadError>

Source§

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

Source§

fn expect_table<T>(&self) -> Result<T, ReadError>
where T: TopLevelTable + FontRead<'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> 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.