Struct unifont_bitmap::Unifont[][src]

pub struct Unifont { /* fields omitted */ }
Expand description

A data structure for caching Unifont character bitmaps. Decompresses the compressed font data in the executable on demand, and caches it in blocks (“pages”) of 256 code points each.

Implementations

Loads the Unifont bitmap corresponding to the given Unicode codepoint (if necessary), and returns it.

Will return the bitmap for U+FFFD REPLACEMENT CHAR (�) if Unifont does not include a glyph for this bitmap.

PANICS if you pass a codepoint larger than MAX_UNICODE_CODEPOINT.

Gets the Unifont bitmap corresponding to the given Unicode codepoint, if and only if it is already loaded.

Will return the bitmap for U+FFFD REPLACEMENT CHAR (�) if Unifont does not include a glyph for this bitmap, iff the respective page of the font is already loaded.

PANICS if you pass a codepoint larger than MAX_UNICODE_CODEPOINT.

Loads a given page, if it’s not loaded already. (Since loading is usually done transparently, this isn’t usually needed.)

Creates a new instance of this class, with no glyphs cached yet.

The font data is embedded in your executable, and does not need to be provided any other way.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.