TTF Provider#

The ttf provider embeds already-compiled TrueType and OpenType fonts. mcfonts does not handle TTF providers by default, and they cannot be exported.

Structure#

{
    "type": "ttf",
    "file": "font.otf",
    "shift": [0, 0],
    "size": 8,
    "oversample": 1,
    "skip": [""]
}

Shift#

The shift field defines how much each glyph contained in this font is to be moved horizontally and vertically. In contrast to a Options Provider shift field, the sign values of the values are swapped.

The first element controls the horizontal shifting (positive is leftwards, negative is rightwards).
The second element controls the vertical shifting (positive is downwards, negative is upwards).

Size#

The size field is similar to a Bitmap Provider height field. This value can vary greatly across fonts; experiment.

Note

All fonts that are exported with mcfonts and then used will always need a size value of 8.

Oversample#

The oversample field is the resolution to render at. Values that don't match the glyph's native em sizing will cause it to be anti-aliased.

Skip#

The skip field is either a list of strings or a string of the characters that this font will not texture.

Warning

mcfonts does not accept rangestrings for this.