Unihex provider

The unihex provider maps characters to GNU Unihex-format glyphs.

The value of its type field is "unihex". Its priority is 1. It stores bitmap glyphs.

Structure

{
    "type": "unihex",
    "hex_file": resource location,
    "size_overrides": [
        {
            "from": str,
            "to": str,
            "left": int,
            "right": int

        },
        ...
    ]
}
hex_file : str

Resource location to ZIP file containing any number of *.hex files at its root.

size_overrides : list[dict[str, ...]]

List of objects of bearing overrides for specific ranges of characters.

from : str

Starting character.

to : str

Ending character, inclusive. Must come after from.

left : int

Left bearing. Must be <= 32 and >= 0.

Right bearing. Must be <= 32 and >= 0.

Glyph format

Files inside of the hex_files archive follow the GNU Unihex format. Each line of a .hex text file is a hexadecimal codepoint, a colon, and data.

For example, 0041:0000000018242442427E424242420000 maps a glyph to U+0041 A.

See Unihex glyph and https://en.wikipedia.org/wiki/GNU_Unifont#.hex_format for details.

API

mcfonts.provider.unihex.UnihexProvider