# HD Fonts#

Danger

This feature is obsolete. Do not use it. Minecraft’s font system has fixed the issues HD fonts was created to resolve.

Warning

Characters outside the ASCII range are not supported

HD Fonts can define custom widths for 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.

• Default font: assets/minecraft/optifine/font/ascii.png

• SGA (enchanting) font: assets/minecraft/optifine/font/ascii_sga.png

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 to customize:

• assets/minecraft/optifine/font/ascii.properties

• assets/minecraft/optifine/font/ascii_sga.properties

## Properties#

Each line in this file specifies the width of a character:

Note

Each character must be in it’s decimal codepoint, not hexadecimal; this is why SPACE U+0020 is 32.

# Custom width
width.<ascii value 0-255>=<width 0-8>


For example, to specify the widths of capital A, B, and C, the following might be used:

# A
width.65=5.9

# B
width.66=5

# C
width.67=5.25


Values can be floating point numbers (Vanilla only supports integer widths) and range from 0-8 regardless of the resolution of the font. The widths for all characters do not need to be specified, only those that should override the default width.

The space character default width is 4.0. This can be overridden by setting width.32 to a custom value.

🆚️ This documentation assumes the latest OptiFine version. Notes are not made for legacy versions (1.8).
🔙️ This documentation is updated to commit 8410499f.
©️ This file is offered without any copyright restrictions. Please copy and modify it to suit your needs. Credit is optional, but appreciated.