Blurred Text
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Blurred Text
Just tried LÖVE 0.10.0 and I have to say, love the new Text object! I updated my current work-in-progress game to the new version and of course, many problems happened. I'm using few libraries offered by community for my game and one of them is LöveFrames. Some of you already know this library. Turning LöveFrames to a new version is a huge mess. Input is the main problem since LÖVE don't use strings for mouse constants anymore. Well I solved all problems (including setStencil, phew), now my problem that I need help with is blurred text. Yup. I know what is the cause of this and why it happens (correct me if I'm wrong). It is because I use default font with size of less than 14 (or 12), the default size used by default font. LÖVE 0.10.0 changelog said "Updated the default font to use less memory", so maybe this that caused blurred text. I thought it was blurred because I used love.graphics.print function, then I tried the new Text object but still, no result. I want to use default font with size of less than the default size of default font. Any help?
- slime
- Solid Snayke
- Posts: 3132
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Blurred Text
0.10.0 no longer automatically snaps text positions to pixels (it did in 0.9.2 and earlier), and drawing text at non-integer positions can cause it to be blurry, so flooring the positions e.g. love.graphics.print(text, math.floor(x), math.floor(y)) might fix it for you.
Re: Blurred Text
Wrong guess as expected.
Again, thank you, slime, I'll try it as soon as possible.
EDIT: I tried to replace love.graphics.print with mine so it can snaps positions to pixels but LÖVE gave me a stack overflow error. It's painful flooring all my (and libraries) positions calculations, but there's no other way, right?
Again, thank you, slime, I'll try it as soon as possible.
EDIT: I tried to replace love.graphics.print with mine so it can snaps positions to pixels but LÖVE gave me a stack overflow error. It's painful flooring all my (and libraries) positions calculations, but there's no other way, right?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Blurred Text
Then you were calling your overridden function rather than the original .Ortimh wrote: EDIT: I tried to replace love.graphics.print with mine so it can snaps positions to pixels but LÖVE gave me a stack overflow error. It's painful flooring all my (and libraries) positions calculations, but there's no other way, right?
Re: Blurred Text
Well, bartbes, you know how stupid I am.
After placed many math.floors among many positions (I wished bartbes replied after I posted my last post so it could be less painful) and tried it.. then of course, slime, you're right, flooring does solve the problem. My assumptions always wrong.
After placed many math.floors among many positions (I wished bartbes replied after I posted my last post so it could be less painful) and tried it.. then of course, slime, you're right, flooring does solve the problem. My assumptions always wrong.
- Jasoco
- Inner party member
- Posts: 3725
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Blurred Text
Yeah, I discovered this myself when I switched to 0.10.0 a week ago. I quickly learned I needed to floor the coords. (I was using pixel fonts on a canvas so it was like it was deleting certain columns of pixels from my text, but not all my text, in my toolbar tooltips. Easy fix.)
Who is online
Users browsing this forum: Bing [Bot] and 220 guests