0

I am making a pixel mobile game, and using a 3x5 pixel font. But Godot is adding a pixel of spacing around and I cant figure out why. Is this something to do with the font, or is there a Godot setting somewhere?

What I would like is characters to have no spaces, except between them. In the example below you can see:

  • 1px below numbers - I assume because of the comma, but I would prefer not to have it just like for the apostrophe symbol which draws outside of the box.
  • 1px at the end of the 5

Any ideas?

enter image description here

Edit

I've updated to Godot 4.5 C# and now the font settings seem to work! But I still cant remove the last pixel and the end of the line.

I see that the "Extra Spacing > Glyph setting changes the spacing each character (0 is 1 pixel) but there is no option to remove it on the last character in the line.

enter image description here

3
  • 1
    Are the Font Options not working for you? You should be able to specify things like margins when you first import the font. Commented Sep 13 at 20:17
  • That's basically how any font or font-layout works - it adds some extra space (side bearings) around the glyph – otherwise words would be unreadable. But since the font is based on a 3x5 grid you should be able to compensate by some sort of margin like 1/3 of the current font-size – albeit I'm not sure this is possible in Godot. Commented Sep 14 at 19:42
  • what is the fontsize of the label? when using pixel fonts, weird stuff can happen if the font size is not correct. should be a multiple of the width or height of the numbers Commented Sep 17 at 7:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.