Rendering bug with .ttf font.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
mburk
Prole
Posts: 3
Joined: Sun Oct 16, 2011 9:21 pm

Rendering bug with .ttf font.

Post 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 3475 times
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Rendering bug with .ttf font.

Post 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
Attachments
noproblem.love
(170.2 KiB) Downloaded 169 times
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: Rendering bug with .ttf font.

Post 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).
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Rendering bug with .ttf font.

Post 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.
Last edited by Boolsheet on Mon Oct 17, 2011 2:30 am, edited 1 time in total.
Shallow indentations.
mburk
Prole
Posts: 3
Joined: Sun Oct 16, 2011 9:21 pm

Re: Rendering bug with .ttf font.

Post 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!
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 11 guests