Struct FontTables
pub struct FontTables(/* private fields */);Expand description
Individual font table access.
Implementations§
§impl FontTables
impl FontTables
pub fn cff2_data(&self) -> Option<&[u8]>
pub fn cff2_data(&self) -> Option<&[u8]>
Compact font format 2.0 table data.
See the CFF2 specification.
pub fn cblc_data(&self) -> Option<&[u8]>
pub fn cblc_data(&self) -> Option<&[u8]>
Color bitmap location table data.
See the CBLC specification.
pub fn cmap_data(&self) -> Option<&[u8]>
pub fn cmap_data(&self) -> Option<&[u8]>
Character to glyph mapping table data.
See the cmap specification.
pub fn ebdt_data(&self) -> Option<&[u8]>
pub fn ebdt_data(&self) -> Option<&[u8]>
Embedded bitmap data table data.
See the EBDT specification.
pub fn eblc_data(&self) -> Option<&[u8]>
pub fn eblc_data(&self) -> Option<&[u8]>
Embedded bitmap location data table data.
See the EBLC specification.
pub fn gasp_data(&self) -> Option<&[u8]>
pub fn gasp_data(&self) -> Option<&[u8]>
Grid-fitting and scan-conversion procedure table data.
See the gasp specification.
pub fn hvar_data(&self) -> Option<&[u8]>
pub fn hvar_data(&self) -> Option<&[u8]>
Horizontal metrics variation table data.
See the HVAR specification.
pub fn ift_data(&self) -> Option<&[u8]>
pub fn ift_data(&self) -> Option<&[u8]>
Incremental font transfer table data.
See the IFT specification.
pub fn iftx_data(&self) -> Option<&[u8]>
pub fn iftx_data(&self) -> Option<&[u8]>
Incremental font transfer table data.
See the IFTX specification.
pub fn math_data(&self) -> Option<&[u8]>
pub fn math_data(&self) -> Option<&[u8]>
Mathematical typesetting table data.
See the MATH specification.
pub fn morx_data(&self) -> Option<&[u8]>
pub fn morx_data(&self) -> Option<&[u8]>
Extended metamorphosis table data.
See the morx specification.
pub fn os2_data(&self) -> Option<&[u8]>
pub fn os2_data(&self) -> Option<&[u8]>
OS/2 and Windows-specific metrics table data.
See the OS/2 specification.
pub fn post_data(&self) -> Option<&[u8]>
pub fn post_data(&self) -> Option<&[u8]>
PostScript information table data.
See the post specification.
pub fn prep_data(&self) -> Option<&[u8]>
pub fn prep_data(&self) -> Option<&[u8]>
Control value program table data.
See the prep specification.
pub fn sbix_data(&self) -> Option<&[u8]>
pub fn sbix_data(&self) -> Option<&[u8]>
Standard bitmap graphics table data.
See the sbix specification.
pub fn svg_data(&self) -> Option<&[u8]>
pub fn svg_data(&self) -> Option<&[u8]>
Scalable vector graphics table data.
See the SVG specification.
§impl FontTables
impl FontTables
pub fn new(
source: impl Into<FontSource>,
index: u32,
) -> Result<FontTables, ReadError>
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§
§impl<'a> TableProvider<'a> for &'a FontTables
impl<'a> TableProvider<'a> for &'a FontTables
§fn loca(&self, is_long: impl Into<Option<bool>>) -> Result<Loca<'a>, 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 cvt(&self) -> Result<&'a [BigEndian<i16>], 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 data_for_tag(&self, _tag: Tag) -> Option<FontData<'a>>
fn head(&self) -> Result<Head<'a>, ReadError>
fn name(&self) -> Result<Name<'a>, ReadError>
fn hhea(&self) -> Result<Hhea<'a>, ReadError>
fn vhea(&self) -> Result<Vhea<'a>, ReadError>
fn hmtx(&self) -> Result<Hmtx<'a>, ReadError>
fn hdmx(&self) -> Result<Hdmx<'a>, ReadError>
fn vmtx(&self) -> Result<Vmtx<'a>, ReadError>
fn vorg(&self) -> Result<Vorg<'a>, ReadError>
fn fvar(&self) -> Result<Fvar<'a>, ReadError>
fn avar(&self) -> Result<Avar<'a>, ReadError>
fn hvar(&self) -> Result<Hvar<'a>, ReadError>
fn vvar(&self) -> Result<Vvar<'a>, ReadError>
fn mvar(&self) -> Result<Mvar<'a>, ReadError>
fn maxp(&self) -> Result<Maxp<'a>, ReadError>
fn os2(&self) -> Result<Os2<'a>, ReadError>
fn post(&self) -> Result<Post<'a>, ReadError>
fn gasp(&self) -> Result<Gasp<'a>, ReadError>
fn glyf(&self) -> Result<Glyf<'a>, ReadError>
fn gvar(&self) -> Result<Gvar<'a>, ReadError>
fn cvar(&self) -> Result<Cvar<'a>, ReadError>
fn cff(&self) -> Result<Cff<'a>, ReadError>
fn cff2(&self) -> Result<Cff2<'a>, ReadError>
fn cmap(&self) -> Result<Cmap<'a>, ReadError>
fn gdef(&self) -> Result<Gdef<'a>, ReadError>
fn gpos(&self) -> Result<Gpos<'a>, ReadError>
fn gsub(&self) -> Result<Gsub<'a>, ReadError>
fn feat(&self) -> Result<Feat<'a>, ReadError>
fn ltag(&self) -> Result<Ltag<'a>, ReadError>
fn ankr(&self) -> Result<Ankr<'a>, ReadError>
fn trak(&self) -> Result<Trak<'a>, ReadError>
fn morx(&self) -> Result<Morx<'a>, ReadError>
fn kerx(&self) -> Result<Kerx<'a>, ReadError>
fn kern(&self) -> Result<Kern<'a>, ReadError>
fn colr(&self) -> Result<Colr<'a>, ReadError>
fn cpal(&self) -> Result<Cpal<'a>, ReadError>
fn cblc(&self) -> Result<Cblc<'a>, ReadError>
fn cbdt(&self) -> Result<Cbdt<'a>, ReadError>
fn eblc(&self) -> Result<Eblc<'a>, ReadError>
fn ebdt(&self) -> Result<Ebdt<'a>, ReadError>
fn sbix(&self) -> Result<Sbix<'a>, ReadError>
fn stat(&self) -> Result<Stat<'a>, ReadError>
fn svg(&self) -> Result<Svg<'a>, ReadError>
fn varc(&self) -> Result<Varc<'a>, ReadError>
fn meta(&self) -> Result<Meta<'a>, ReadError>
fn base(&self) -> Result<Base<'a>, ReadError>
fn dsig(&self) -> Result<Dsig<'a>, ReadError>
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>,
Auto Trait Implementations§
impl Freeze for FontTables
impl !RefUnwindSafe for FontTables
impl Send for FontTables
impl Sync for FontTables
impl Unpin for FontTables
impl UnsafeUnpin for FontTables
impl !UnwindSafe for FontTables
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more