Page 1 of 1

Rendering bug with .ttf font.

Posted: Sun Oct 16, 2011 9:33 pm
by mburk
I am loading this font http://www.fixedsysexcelsior.com/, and it works fine except for 'A' which does not render correctly or advance the pen position after rendering. This happens when using 16px as the font size (the recommended size), but at some other sizes it works fine. I'm using this font for displaying code, and because it looks good with love's font rendering, a lot of fonts do not. Is there any known *simple* workaround for this problem? I would use a different font, but haven't been able to find a suitable replacement.

You can see it here, in 2 places
bad font render
bad font render
badfont.JPG (13.98 KiB) Viewed 3474 times

Re: Rendering bug with .ttf font.

Posted: Sun Oct 16, 2011 9:48 pm
by thelinx
I'm not having any issues with either 0.7.2 or 0.8.0 with the attached love file.

Can you give us a .love game file of your code? The issue might be something hidden.

Game Distribution


Actually, with the font size set at 16, I'm getting weird errors in both 0.7.2 and 0.8.0. Curious.

I've reported this to the issue tracker for now. Good spotting.
https://bitbucket.org/rude/love/issue/3 ... ring-issue

Re: Rendering bug with .ttf font.

Posted: Sun Oct 16, 2011 10:46 pm
by bmelts
I'm afraid there's nothing we can really do on the LÖVE end of things. It appears to be a glitch either in the font or with FreeType's rendering - the advance is indeed reported as 0. LÖVE is just doing what it's told to by FreeType.

This isn't the only time this issue has appeared - cf https://netbeans.org/bugzilla/show_bug.cgi?id=189986 (12pt being equivalent to 16px in this case).

Re: Rendering bug with .ttf font.

Posted: Sun Oct 16, 2011 11:23 pm
by Boolsheet
The font itself apparently has some problems. If you load it in FontForge and export it to ttf again it works.
FontForge is a few clicks (lines?) away for Linux users. For Windows there's a lot more work involved.

Re: Rendering bug with .ttf font.

Posted: Mon Oct 17, 2011 1:34 am
by mburk
Boolsheet wrote:The font itself apparently has some problems. If you load it in FontForge and export it to ttf again it works.
FontForge is a few clicks (lines?) away for Linux users. For Windows there's a lot more work involved.

Here's what I got out of it.
Awesome, thanks, works perfectly!