FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CharacterToGlyphMap

    struct · ferroui-base · v0.5.0

    struct CharacterToGlyphMap
    

    Maps Unicode code points to glyph indices using the font's cmap table.

    A cheap handle: cloning shares the underlying subtable. The default value maps nothing. Lookups never allocate.

    View source

    Members

    format

    fn format(self: &Self) -> CmapFormat
    

    The format of the subtable the map reads.

    Source

    get_glyph

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

    The glyph for the code point, 0 when it is not mapped (the reference's indexer and GetGlyph).

    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

    get_mapped_ranges

    fn get_mapped_ranges(self: &Self) -> CodepointRangeEnumerator
    

    Enumerates the code point ranges the map covers.

    Source

    as_read_only_dictionary

    fn as_read_only_dictionary(self: &Self) -> CharacterToGlyphMapDictionary
    

    A dictionary view (code point to glyph) of the map.

    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
    • Default

    Availability

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