[][src]Struct ttf_parser::Name

pub struct Name<'a> {
    pub name: &'a [u8],
    pub platform_id: PlatformId,
    pub encoding_id: u16,
    pub language_id: u16,
    pub name_id: NameId,
}

Fields

name: &'a [u8]

Raw name data.

platform_id: PlatformId

Platform ID.

encoding_id: u16

Platform-specific encoding ID.

language_id: u16

Language ID.

name_id: NameId

Name ID.

Methods

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

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

Converts Name's data into a 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> Copy for Name<'a>[src]

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

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

Auto Trait Implementations

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

impl<'a> Unpin 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<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> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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