wrong bitmap Font rendering in löve 0.10.2

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.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

wrong bitmap Font rendering in löve 0.10.2

Post by SiENcE »

Since love 0.10.2 i noticed, that bitmap font rendering is broken. I think this has todo with the space (width) you give to the drawing container.

love 0.7.2
Image

love 0.8.0
Image

love 0.9.2
Image

love 0.10.2 (broken)
Image

Can someone help or tell how to solve this?
Last edited by SiENcE on Tue May 23, 2017 7:52 am, edited 1 time in total.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: wrong bitmap Font rendering in löve 0.10.2

Post by raidho36 »

Looks like a bug. You should put that to the issue tracker.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: wrong bitmap Font rendering in löve 0.10.2

Post by slime »

Since love 0.10.0, the separator pixels in an image font aren't treated as spacing when rendering text with the font. You can use the optional spacing argument in love.graphics.newImageFont to add a constant amount of spacing to every glyph in the font.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: wrong bitmap Font rendering in löve 0.10.2

Post by raidho36 »

slime wrote: Thu May 18, 2017 2:17 pm Since love 0.10.0, the separator pixels in an image font aren't treated as spacing when rendering text with the font. You can use the optional spacing argument in love.graphics.newImageFont to add a constant amount of spacing to every glyph in the font.
It should be just rendering letters all crammed together, not with strips of pixels missing. And sometimes it shows those strips anyway? That doesn't look right.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: wrong bitmap Font rendering in löve 0.10.2

Post by slime »

Without seeing what the code's actually doing, I could guess that the rendered text is being translated or scaled by non-integer values. 0.10.0 removed the internal floor() it used to do to the x and y parameters of love.graphics.print.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: wrong bitmap Font rendering in löve 0.10.2

Post by SiENcE »

Spacing does not fix the crippled letters :-/ and it's not scaled.

All monospaced bitmap fonts are correct rendered.

So I assume that this problem happens only with uneven bitmap fonts (uneven spacing) as the one above.

All monospaced bitmap font works correct with love 0.10.2
Image
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: wrong bitmap Font rendering in löve 0.10.2

Post by slime »

Can you provide a minimal .love which reproduces the issue?
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: wrong bitmap Font rendering in löve 0.10.2

Post by SiENcE »

Sure :).

It seems the problem has todo with font:getWidth and also with extraspacing.

For uneven fonts you can't use it and font:getWidth seems to return wrong values.

Test (same for all löve versions):
First string uses a calc. x and y position depending on fontsizes
Second string uses a fixed x,y position

love 0.7.2, 0.8.0, 0.9.2
Image

love 0.10.1 or 0.10.2
Image

love 0.10.1 or 0.10.2 with extraspacing of 1
Image
Attachments
fontbug_love0.10.2.love
(2.07 KiB) Downloaded 151 times
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: wrong bitmap Font rendering in löve 0.10.2

Post by SiENcE »

Can anybody confirm this?
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: wrong bitmap Font rendering in löve 0.10.2

Post by Nixola »

I tried your demo, I can confirm it works in 0.7.2, 0.8.0, 0.9.2; it's bugged in 0.10.2 and whatever the love-hg AUR package is (I'm assuming last commit)
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests