Greetings,
In my work on a project, I can't seem to get image fonts to work correctly. Already checked out the samples on the wiki. I have attached an example.
Problems / questions:
--------------------------
1) They seem to be mirrored and inverted by default as compared to the source image (obviously not a big deal, just odd).
2) It looks like it's cutting off pixels before the separator color and it's appearing a bit offset.
3) When I scale the font and print something, color bleeds slightly into the letters from the separator line.
4) Is there any way to change the filter used to scale fonts? I need them to look chunky when I scale them up to keep with my aesthetic, not smoothed.
Thanks for the help.
Issues with ImageFonts (filter,offset,bleed,etc.)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Issues with ImageFonts (filter,offset,bleed,etc.)
Well, I solved most of the mystery.
This however doesn't fix the left-side truncation and bottom repeat (they appear to be quads with incorrect x's and y's set). This could be caused by possibly incorrectly formatting the image. And i fixed the flip by saving it as a png in photoshop. Not sure if that is a LOVE error reading tif files or the tif had exif data to flip it.
Code: Select all
function love.load()
image = love.graphics.newImage("lofi_smallfont.png") --Create an Image object
image:setFilter(1,0) --Set the filter on the Image to nearest neighbor
font = love.graphics.newImageFont(image,
" 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-=+[]{}:;'`<>,.?/\\"); --Create an ImageFont object
love.graphics.setFont(font); --Set the Font
end
- Attachments
-
- testbed.love
- (2.15 KiB) Downloaded 157 times
Who is online
Users browsing this forum: No registered users and 14 guests