FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    TABLE_NAME

    const TABLE_NAME: &'static str
    

    Source

    TAG

    const TAG: OpenTypeTag
    

    Source

    id

    fn id(self: &Self, culture: u16) -> String
    

    Source

    font_name

    fn font_name(self: &Self, culture: u16) -> String
    

    Source

    font_family_name

    fn font_family_name(self: &Self, culture: u16) -> String
    

    Source

    font_sub_family_name

    fn font_sub_family_name(self: &Self, culture: u16) -> String
    

    Source

    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.

    Source

    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.

    Source

    load

    fn load(font: &dyn IFontMemory) -> Option<NameTable>
    

    Loads the table; None when the font has no name table or the table is malformed.

    Source

    iter

    fn iter(self: &Self) -> std::slice::Iter<'_, NameRecord>
    

    Enumerates the records in table order.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • IntoIterator

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.