NameTable
struct · ferroui-base · v0.5.0
struct NameTable
The name (naming) table.
Cultures are identified by their Windows language id (LCID), as stored in the table's Windows-platform records.
Members
TABLE_NAMETAGidfont_namefont_family_namefont_sub_family_nameget_name_by_idget_name_by_id_u16loaditer
TABLE_NAME
const TABLE_NAME: &'static str
TAG
const TAG: OpenTypeTag
id
fn id(self: &Self, culture: u16) -> String
font_name
fn font_name(self: &Self, culture: u16) -> String
font_family_name
fn font_family_name(self: &Self, culture: u16) -> String
font_sub_family_name
fn font_sub_family_name(self: &Self, culture: u16) -> String
get_name_by_id
fn get_name_by_id(self: &Self, culture: u16, name_id: KnownNameIds) -> String
The name with the given id for the culture.
Falls back to the US English Windows record, then the first Windows record, then the first record of any platform; the empty string when the table has no record with that id.
get_name_by_id_u16
fn get_name_by_id_u16(self: &Self, culture: u16, name_id: u16) -> String
get_name_by_id for a raw name id.
load
fn load(font: &dyn IFontMemory) -> Option<NameTable>
Loads the table; None when the font has no name table or the table
is malformed.
iter
fn iter(self: &Self) -> std::slice::Iter<'_, NameRecord>
Enumerates the records in table order.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDebugIntoIterator
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.