Page 1 of 1

Can't seem to change image font color -- 0.72

Posted: Sat Sep 17, 2011 7:02 pm
by chute
Hi guys. I am having a problem with image fonts. the font works just fine, but it only shows up in one color (the color that's in the image).

Here's the code:

Code: Select all

love.graphics.setFont(font.cards) -- this is an image font
love.graphics.setColor(255,255,255,255) -- white
love.graphics.print("234", 200, 208)
love.graphics.setColor(255,0,0,255) -- red
love.graphics.print("567", 200, 240)
love.graphics.setFont(font.medium) -- this is a plain ttf
love.graphics.print("normal text", 200,275)
I've tried both colormodes...
here is default
default.png
default.png (4.42 KiB) Viewed 3298 times
here is replace
replace.png
replace.png (4.42 KiB) Viewed 3298 times
I'm not sure what I'm doing wrong.

Re: Can't seem to change image font color -- 0.72

Posted: Sat Sep 17, 2011 10:03 pm
by benloran
Is your image font black? Black + any color = black...

Re: Can't seem to change image font color -- 0.72

Posted: Sat Sep 17, 2011 10:19 pm
by kraftman
benloran wrote:Is your image font black? Black + any color = black...
black * any color = black makes more sense, since multiplying by 0 = 0.

Re: Can't seem to change image font color -- 0.72

Posted: Sat Sep 17, 2011 11:22 pm
by benloran
Well yeah. Right.

I was being lazy, using mathematics symbols to avoid typing english words, but this was a bad context to be lazy in that way. :o:

Re: Can't seem to change image font color -- 0.72

Posted: Mon Sep 19, 2011 4:03 am
by chute
That worked. thanks! :)