Struct owned_ttf_parser::name::Name [−][src]
pub struct Name<'a> {
pub platform_id: PlatformId,
pub encoding_id: u16,
pub language_id: u16,
pub name_id: u16,
pub name: &'a [u8],
}
Expand description
A Name Record.
Fields
platform_id: PlatformId
A platform ID.
encoding_id: u16
A platform-specific encoding ID.
language_id: u16
A language ID.
name_id: u16
name: &'a [u8]
A raw name data.
Can be in any encoding. Can be empty.
Implementations
Returns 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 + Symbol
- Windows Platform ID + Unicode BMP
Checks that the current Name data has a Unicode encoding.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Name<'a>
impl<'a> UnwindSafe for Name<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more