-
Notifications
You must be signed in to change notification settings - Fork 6
Using the GUI Tool
Click to add a new font to the list. Each font has a unique key associated with it, which you may choose to use later when managing your fonts in-game. You also need to specify a path to the font file, such as TTF or OTF. For a full list of supported filetypes, see here.
Alternatively, you can add fonts by dragging a supported font file onto the list area. You can then edit the selected font by clicking .
Below is an overview of the common settings:
-
Glyphs: The character set to include in the rendered font atlas. Click the "Edit" button to add or remove characters. Unicode escape codes are also supported (such as
\u00A9
for the © symbol). - Size: The width and height dimensions of the resulting texture page(s). For OpenGL applications, it's recommended to use a power-of-two size (4, 8, 16, 32, 64, 128, 256, 512, 1024, etc). If the size is too small for the glyphs, you may get an error when generating fonts.
- Spacing: This is the spacing used during the texture packing step. It's recommended to use 1 or more to avoid bleeding issues when scaling text.
- Padding: This is the padding applied around each glyph, necessary to allow for things like drop shadows and outer glow.
-
Shadow: You can enable/disable a drop shadow or outer glow effect. Once enabled, click to adjust the following parameters:
- Blur Radius: The strength of the blur. If zero is set, the effect will not be blurred.
- Blur Iterations: The number of times to apply the blur. The higher the number, the smoother the blur effect.
- Offset: The X and Y offset of the shadow. Using zero would give us an outer-glow effect.
- Color: The color of the shadow or glow.
- Opacity: The opacity of the shadow or glow.
- Sizes: The point sizes to include for each font. You can specify multiple sizes here to generate glyphs for each size.
Output settings:
- Format: The format to output the font definitions in; both use BMFont spec. You can specify XML or plain-text format. For LibGDX, you should use plain-text.
-
Name: The name of the image file(s). If multiple pages are generated, they will be in the format
name_N.png
where N is the index of that page. If left blank, this field will default to "fonts" - Folder: The output folder, where the generated FNT and PNG files will be saved.
You can view the resulting texture pages in the glyph view. They will be exported with a transparent background; but you can view them on different backgrounds for testing.
Click the Test Fonts checkbox under the fonts list to toggle the OpenGL testing view. This allows you to see the result as it would appear in-game. Here you can scale the text, enter a sample string, and toggle Linear/Nearest texture scaling.