Hi everyone,
I’m developing a low-resolution retro game (180×360), and I decided to create a custom pixel art font. The font is 5×3 pixels, which is exactly the size I want to use in the game.
After generating the .fnt and .png files, I imported them into Defold. I assigned the builtins/fonts/font-fnt.material material as described in the documentation, then created a Label component and assigned my custom font to it.
The first thing I noticed is that the font appears very blurry in the editor. The difference is especially obvious when I compare it side by side with a sprite created using the exact same font at the same size. I’m not sure if I made a mistake while importing the font or if the editor simply has trouble displaying fonts this small.
I also tried running the game, and I noticed two additional issues:
- the font is rendered much smaller than expected;
- its position is completely different from what I see in the editor.
I’m starting to suspect that the positioning issue may be caused by a script in my project that modifies the camera projection and the window size:
function init(self)
window.set_size(640, 1280)
window.set_position(1000, 80)
msg.post("@render:", "use_fixed_fit_projection", { near = -1, far = 1 })
end
To make things easier to investigate, I created a minimal project containing the font, the sprite, and the script so you can reproduce exactly what I’m seeing: font_test.zip (75.3 KB)
Thanks a lot in advance for your help!


