Options Provider#
The options
provider is a special mcfonts-specific provider that is only available when
exporting a font with mcfonts. It is not recognized by Vanilla.
It may be declared with a type of either options
or mcfonts:options
; both are recognized the same.
Every option is contained within a "field"
dictionary.
Currently, the valid fields are:
width
spacing
fullwidth
shift
Important
Conflicting options (fullwidth, spacing) will be resolved by simply using the option that is lower down in the list.
Structure#
{
"type": "mcfonts:options",
"fields": {
"width": {"A": 0},
"shift": {"A": [5, 6]},
"spacing": {"A": 1},
"fullwidth": {"A": true}
}
}
Width#
The width option controls the total width of a character's glyph. It is an integer. By default, unset means automatic. A width of 0 means that a glyph will not take any space.
If 'A' has a width of 0, and 'B' has a width of 8, AB
would appear
as if B
was overlaid atop of the A
.
{
"type": "mcfonts:options",
"fields": {
"width": {
"A": 0
}
}
}
Warning
This option conflicts with: fullwidth
.
Spacing#
The spacing option controls the number of padding is added to the end of a glyph. It is a positive integer. By default, it is 1.
{
"type": "mcfonts:options",
"fields": {
"spacing": {
"A": 20,
"B": 0
}
}
}
Fullwidth#
The fullwidth option is a simple switch for automatically changing the width to the image width for a character. It is a boolean.
If true, that character's glyph will have a width equal to their entire cell width. If false, does nothing.
{
"type": "mcfonts:options",
"fieldss": {
"fullwidth": {
"A": true,
"B": false
}
}
}
Warning
This option conflicts with: width
.
Shift#
The shift option controls how a character's glyph is moved. It is 2-number array that controls the number of pixels a character's glyph will be shifted horizontally or vertically.
{
"type": "mcfonts:options",
"fields": {
"shift": {
"A": [5, 10],
"B": [-3, 0],
"C": [0, 1]
}
}
}
A shift of [0, 0]
is equivalent to being unset; it does nothing.