[][src]Struct ttf_parser::Name

pub struct Name<'a> { /* fields omitted */ }

Methods

impl<'a> Name<'a>[src]

pub fn platform_id(&self) -> Option<PlatformId>[src]

Parses the platform ID.

pub fn encoding_id(&self) -> u16[src]

Parses the platform-specific encoding ID.

pub fn language_id(&self) -> u16[src]

Parses the language ID.

pub fn name_id(&self) -> u16[src]

Parses the Name ID.

A predefined list of ID's can be found in the name_id module.

pub fn name(&self) -> &'a [u8][src]

Parses the Name's data as bytes.

Can be empty.

pub fn name_utf8(&self) -> Option<String>[src]

Parses the Name's data as a UTF-8 string.

Only Unicode names are supported. And since they are stored as UTF-16BE, we can't return &str and have to allocate a String.

Supports:

  • Unicode Platform ID
  • Windows Platform ID + Unicode BMP

Trait Implementations

impl<'a> Debug for Name<'a>[src]

impl<'a> Copy for Name<'a>[src]

impl<'a> Clone for Name<'a>[src]

Auto Trait Implementations

impl<'a> Unpin for Name<'a>

impl<'a> Send for Name<'a>

impl<'a> Sync for Name<'a>

impl<'a> UnwindSafe for Name<'a>

impl<'a> RefUnwindSafe for Name<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.