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
love 0.8.0
love 0.9.2
love 0.10.2 (broken)
Can someone help or tell how to solve this?
wrong bitmap Font rendering in löve 0.10.2
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
wrong bitmap Font rendering in löve 0.10.2
Last edited by SiENcE on Tue May 23, 2017 7:52 am, edited 1 time in total.
Re: wrong bitmap Font rendering in löve 0.10.2
Looks like a bug. You should put that to the issue tracker.
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: wrong bitmap Font rendering in löve 0.10.2
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.
Re: wrong bitmap Font rendering in löve 0.10.2
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.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.
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: wrong bitmap Font rendering in löve 0.10.2
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.
Re: wrong bitmap Font rendering in löve 0.10.2
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
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
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: wrong bitmap Font rendering in löve 0.10.2
Can you provide a minimal .love which reproduces the issue?
Re: wrong bitmap Font rendering in löve 0.10.2
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
love 0.10.1 or 0.10.2
love 0.10.1 or 0.10.2 with extraspacing of 1
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
love 0.10.1 or 0.10.2
love 0.10.1 or 0.10.2 with extraspacing of 1
- Attachments
-
- fontbug_love0.10.2.love
- (2.07 KiB) Downloaded 162 times
Re: wrong bitmap Font rendering in löve 0.10.2
Can anybody confirm this?
Re: wrong bitmap Font rendering in löve 0.10.2
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
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests