[−][src]Struct ttf_parser::cmap::Subtable
A character encoding subtable.
Implementations
impl<'a> Subtable<'a>[src]
pub fn platform_id(&self) -> PlatformId[src]
Returns encoding's platform.
pub fn encoding_id(&self) -> u16[src]
Returns encoding ID.
pub fn format(&self) -> Format[src]
Returns encoding's format.
pub fn is_unicode(&self) -> bool[src]
Checks that the current encoding is Unicode compatible.
pub fn glyph_index(&self, c: u32) -> Option<GlyphId>[src]
Maps a character to a glyph ID.
This is a low-level method and unlike Face::glyph_index is doesn't
check that the current encoding is Unicode.
It simply maps a u32 codepoint number to a glyph ID.
Returns None:
- when glyph ID is
0. - when format is
MixedCoverage, since it's not supported. - when format is
UnicodeVariationSequences. Useglyph_variation_indexinstead.
pub fn glyph_variation_index(
&self,
c: char,
variation: char
) -> Option<GlyphVariationResult>[src]
&self,
c: char,
variation: char
) -> Option<GlyphVariationResult>
Resolves a variation of a glyph ID from two code points.
Returns None:
- when glyph ID is
0. - when format is not
UnicodeVariationSequences.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Subtable<'a>
impl<'a> Send for Subtable<'a>
impl<'a> Sync for Subtable<'a>
impl<'a> Unpin for Subtable<'a>
impl<'a> UnwindSafe for Subtable<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,