FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CmapFormat12Or13Table

    struct · ferroui-base · v0.5.0

    struct CmapFormat12Or13Table
    

    A format 12 (segmented coverage) or format 13 (many-to-one) cmap subtable.

    Lookups read the table data lazily and never allocate.

    View source

    Members

    new

    fn new(table: ReadOnlyMemory<u8>) -> Result<Self, FontTableError>
    

    Parses the subtable header; Err when the header is truncated.

    Source

    format

    fn format(self: &Self) -> CmapFormat
    

    Source

    language

    fn language(self: &Self) -> u32
    

    Source

    get_glyph

    fn get_glyph(self: &Self, code_point: i32) -> u16
    

    The glyph for the code point, 0 when it is not mapped.

    Source

    contains_glyph

    fn contains_glyph(self: &Self, code_point: i32) -> bool
    

    Source

    get_glyphs

    fn get_glyphs(self: &Self, code_points: &[i32], glyph_ids: &mut [u16])
    

    Maps every code point to its glyph (0 when unmapped).

    Panics when glyph_ids is shorter than code_points.

    Source

    try_get_glyph

    fn try_get_glyph(self: &Self, code_point: i32) -> Option<u16>
    

    The glyph for the code point; None when it is not mapped or maps to glyph 0.

    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

    Availability

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