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.)