pub struct NameTable<'a> {
pub string_storage: ReadScope<'a>,
pub name_records: ReadArray<'a, NameRecord>,
pub opt_langtag_records: Option<ReadArray<'a, LangTagRecord>>,
}Expand description
Fields§
§string_storage: ReadScope<'a>§name_records: ReadArray<'a, NameRecord>§opt_langtag_records: Option<ReadArray<'a, LangTagRecord>>Language tag records
Present if name table version is 1 or newer. If present, language ids >= 0x8000 refer to
language tag records with 0x8000 the first record, 0x8001 the second, etc.
Implementations§
Source§impl NameTable<'_>
impl NameTable<'_>
pub const COPYRIGHT_NOTICE: u16 = 0u16
pub const FONT_FAMILY_NAME: u16 = 1u16
pub const FONT_SUBFAMILY_NAME: u16 = 2u16
pub const UNIQUE_FONT_IDENTIFIER: u16 = 3u16
pub const FULL_FONT_NAME: u16 = 4u16
pub const VERSION_STRING: u16 = 5u16
pub const POSTSCRIPT_NAME: u16 = 6u16
pub const TRADEMARK: u16 = 7u16
pub const MANUFACTURER_NAME: u16 = 8u16
pub const DESIGNER: u16 = 9u16
pub const DESCRIPTION: u16 = 10u16
pub const URL_VENDOR: u16 = 11u16
pub const URL_DESIGNER: u16 = 12u16
pub const LICENSE_DESCRIPTION: u16 = 13u16
pub const LICENSE_INFO_URL: u16 = 14u16
pub const TYPOGRAPHIC_FAMILY_NAME: u16 = 16u16
pub const TYPOGRAPHIC_SUBFAMILY_NAME: u16 = 17u16
pub const COMPATIBLE_FULL: u16 = 18u16
pub const SAMPLE_TEXT: u16 = 19u16
pub const POSTSCRIPT_CID_FINDFONT_NAME: u16 = 20u16
pub const WWS_FAMILY_NAME: u16 = 21u16
pub const WWS_SUBFAMILY_NAME: u16 = 22u16
pub const LIGHT_BACKGROUND_PALETTE: u16 = 23u16
pub const DARK_BACKGROUND_PALETTE: u16 = 24u16
pub const VARIATIONS_POSTSCRIPT_NAME_PREFIX: u16 = 25u16
Sourcepub fn string_for_id(&self, name_id: u16) -> Option<String>
pub fn string_for_id(&self, name_id: u16) -> Option<String>
Return a string for the supplied name_id.
Returns the first match in this order:
- Unicode platform
- Windows platform, English language ids
- Apple platform, Roman language id
Trait Implementations§
Source§impl<'b> ReadBinary for NameTable<'b>
impl<'b> ReadBinary for NameTable<'b>
Auto Trait Implementations§
impl<'a> Freeze for NameTable<'a>
impl<'a> RefUnwindSafe for NameTable<'a>
impl<'a> Send for NameTable<'a>
impl<'a> Sync for NameTable<'a>
impl<'a> Unpin for NameTable<'a>
impl<'a> UnwindSafe for NameTable<'a>
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<T> ReadBinaryDep for Twhere
T: ReadBinary,
impl<T> ReadBinaryDep for Twhere
T: ReadBinary,
type Args<'a> = ()
type HostType<'a> = <T as ReadBinary>::HostType<'a>
fn read_dep<'a>( ctxt: &mut ReadCtxt<'a>, _: <T as ReadBinaryDep>::Args<'_>, ) -> Result<<T as ReadBinaryDep>::HostType<'a>, ParseError>
Source§impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
Source§type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by
write_dep.Source§fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
Write the binary representation of Self to
ctxt.