Inter Tight font showing artefacts when used as a distance field font

I’ve finally found a quite beautiful font for my game, namely Inter Tight on Google Fonts.

I like to render fonts using a distance field material, to get the flexibility of resizing them and retain their sharpness.

For some reason, this particular font, shows thin lines on some glyphs when rendered with the distance field material:


Inter Tight font test.zip (159.5 KB)

Changing the material to use highp for all variables shows a marginal improvement, but the lines are still visible.

Is there something else I could try to be able to use this font as a distance field?

2 Likes

Follow up question: Using the default Text Tracking in Defold (0), the kerning seems off in paces, in this example the space between the T and e is much bigger than the space shown on fonts.google.com. What’s the reason for this, and could this be tweaked somehow?

The kerning seems to be consistent in Defold regardless of using bitmap or distance field.

1 Like

This artefact has been reported before:

It’s a bug (imho) in our distance field generator that doesn’t account for shape intersections.
This is a small and isolated piece of code, so perhaps someone may be able to help out?

4 Likes

That is a pity, it is a beautiful font.
You could try and tidy it up using a font editor (but do check the license if you are allowed to alter and then use the font in your projects). This would be quite a lot of work though and probably wouldn’t solve the kerning problem.

And since I love fonts, I had a quick look for similar Google Fonts, all seem to be ok (I just checked the capital D):
Arimo, Work Sans, maybe IBM Plex Sans. Or other Helvetica Alternatives.

Thanks! Here is the relevant forum post..

I’ll look around for a different font. Thanks for the suggestions @anon95708182!

Update: Arimo and Work Sans are both good alternatives, but, alas, also suffer from the issue.

1 Like

You are right, Work Sans has also overlapping. Not in the “D” though, which is what I quickly looked at in fontforge. Sorry!
I don’t have overlapping troubles with Arimo though :thinking:
But: Arimo has the same kerning problem where “T” and “e” meet. I then also tried with my favourite font, Montserrat. Same thing. I never noticed this before and I use this font in almost every app. :astonished:

Arimo
arimo

Montserrat:
montserrat

2 Likes