Crate ug_max

Source
Expand description

UGLY-MAXIMAL font.

Each character representation is defined as series of columns consisting of 5 bits at maximum. Bits are ordered down-top and columns left-right. So 0 index bit of 0 index column is top left corner. For example, for 0x1e = 0b11_110 which is 1ˢᵗ column of A this is 0.

Constants§

DIGITS
From ‘0’ to ‘9’.
LETTERS
English alphabet. 26 letters.
SPACING
One column of ’0’s.
SYMBOLS
Set of chosen symbols.
UNSUPPORTED
Special matrix for unsupported char mapping.

Functions§

buff_size
Computes expected buffer size for text provided. Goes with str.len() thus size is computed from size in bytes not chars nor graphemes. Optionally extends size with extra.
col_def
Provides c into 5×5 matrix defined projection. Some chars are unsuitable for exact 5×5 representation. For instance ‘!’ which is only 1 column wide. All letters are capitalized.
col_defs
Provides mappings for input text into 5x5 matrixes. Each char mapping is followed by SPACING with exception for last one. Whole text is optinally followed by final_sp count of SPACINGs. For details see col_def.