HD Fonts¶

The default font texture snippet.¶
File location
/assets/minecraft/optifine/font/**/*.{png,properties}
Danger
HD Fonts can define custom widths for ASCII characters.
OptiFine first looks for fonts in the /assets/minecraft/optifine/font
folder.
This allows having a custom font that works in vanilla and a higher-resolution font that requires OptiFine to display properly.
To allow for more control over the widths of individual characters, OptiFine offers a way to specify them manually. Create a properties file corresponding to the font you want to customize.
Properties¶
width.<ascii>
¶
<ascii>
is a value from 0 to 255The width of the ASCII character.
blend
¶
Whether to use alpha blending.
offsetBold
¶
Horizontal offset by which to render the bold copy of a glyph.
JSON schema¶
Note
Although this page is .properties
based, it can be mapped to JSON.
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "https://gitlab.com/whoatemybutter/optifinedocs/-/blob/master/schemas/hd_fonts.schema.json",
"title": "HD Fonts",
"description": "HD Fonts can define custom widths for characters.",
"type": "object",
"properties": {
"blend": {
"type": "boolean",
"description": "Whether to use alpha blending.",
"deprecated": true
},
"offsetBold": {
"type": "number",
"minimum": 0.0,
"default": 1.0,
"description": "Horizontal offset by which to render the bold copy of a glyph.",
"deprecated": true
}
},
"patternProperties": {
"^width.(?:\\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2})\\b\\s?)+$": {
"type": "number",
"minimum": 0,
"maximum": 8,
"description": "The width of a character.",
"deprecated": true
}
},
"additionalProperties": false,
"deprecated": true
}