Blurry Text? (Remove Anti-Aliasing)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 4
- Joined: Sun Sep 15, 2013 5:01 pm
Blurry Text? (Remove Anti-Aliasing)
I've been trying to create some games that resemble the 16-bit games from the past, and I found out when I resize images that are very small they become very blurry and not sharp. However, I found out that by using love.graphics.setDefaultImageFilter("nearest", "nearest") I can fix the problem. However, it does not work with text. Help, please?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Blurry Text? (Remove Anti-Aliasing)
You could just use a larger font size, instead of scaling the text.
Help us help you: attach a .love.
- DaedalusYoung
- Party member
- Posts: 413
- Joined: Sun Jul 14, 2013 8:04 pm
Re: Blurry Text? (Remove Anti-Aliasing)
You can do it with text, if you use an image for font.
-
- Prole
- Posts: 4
- Joined: Sun Sep 15, 2013 5:01 pm
Re: Blurry Text? (Remove Anti-Aliasing)
Robin: I'm actually scaling down the text, because everything is scaled up (so the 16-bit sprites are visible)
Also, I'm using a ttf so I can't use an image.
Also, I'm using a ttf so I can't use an image.
-
- Prole
- Posts: 4
- Joined: Sun Sep 15, 2013 5:01 pm
Re: Blurry Text? (Remove Anti-Aliasing)
I used an image font and it didn't work either. Using :setFilter does nothing. After a bit of reading, I discovered Love 0.90 is going to have font:setFilter and hopefully integrate a set default font filter into love.graphics.setDefaultFilter.
-
- Prole
- Posts: 4
- Joined: Sun Sep 15, 2013 5:01 pm
Re: Blurry Text? (Remove Anti-Aliasing)
Here is a link to my .love: https://www.dropbox.com/s/u5nzoukrfer4ixo/BouncerX.love
My code organization is very messy, sorry
If there's any bad habits I'm making in my code management please castigate me ferociously!
My code organization is very messy, sorry
If there's any bad habits I'm making in my code management please castigate me ferociously!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Blurry Text? (Remove Anti-Aliasing)
You packaged the .love wrong (zip the contents, not the folder), but anyway: I'd unscale before drawing the text. Text drawing doesn't play well with love.graphics.scale.
Code: Select all
...
love.graphics.push()
love.graphics.scale(scale, scale)
...
Code: Select all
...
love.graphics.pop()
love.graphics.print("score", 0, 0)
...
Help us help you: attach a .love.
Who is online
Users browsing this forum: Google [Bot] and 3 guests