Font Editor
Pyxen includes a font editor for creating bitmap fonts on iPad and Mac that you can use with the Text component. Design crisp, pixel-perfect text for your games without any external tools.
How bitmap fonts work
A bitmap font in Pyxen is a font atlas — a single image containing every character, plus a JSON file describing where each glyph is located. When your game renders text, the engine looks up each character in the atlas and draws the corresponding region.
Creating a font
To create a new font, add a .font.json asset to your project. The font editor opens automatically when you select it.
Configuration
The font editor lets you configure:
- Source font — choose from system fonts or import a custom
.ttf/.otffile - Size — the pixel size to rasterize at (e.g. 8px, 12px, 16px)
- Anti-aliasing — toggle smooth edges on or off. Turn it off for crisp pixel art fonts.
- Line height — vertical spacing between lines of text
- Baseline — where characters sit on the line
Character sets
Choose which characters to include in the font atlas:
- ASCII — basic Latin letters, digits, and punctuation (the default)
- Extended Latin — accented characters for European languages
- Custom — define your own set of characters
Including fewer characters produces a smaller atlas, which is better for performance and memory. Only include what your game needs.
Atlas preview
The bottom of the editor shows a live preview of the generated font atlas. This is the actual image that ships with your game. You can see exactly how each character will look at the configured size and settings.
The atlas updates in real time as you change settings — adjust the size or toggle anti-aliasing and see the result immediately.
Using fonts in your game
Once you’ve created a font, use the Text component to render text:
label = world.spawn(text=Text("Score: 0", font="myfont"))
The font parameter matches the name of your .font.json asset (without the extension). If you omit it, Pyxen uses the built-in default font.
See the Text reference for the full API.