How do I change the font color in Love2d/Lua? I already checked the wiki and Lua tutorials.
What I need is to have bold sharp ( no antialiasing ) white and black text. The white text will be over a grey background and the black will be over a white background in the same scene which means that I might need two text styles showing at the same time. Is this possible in Love2d?
Look at the font in the screenshot below.
This is what I am trying to do but when I use Bradley Handwriting as the font type it is aliased and sort of grayish white which is extremely hard to read over a grey or white background.
I really want to use Bradly Handwriting (BRADHITC) as the font type like in the mock-up screenshot as it completes the notebook theme I am going for.
Echo wrote:I really want to use Bradly Handwriting (BRADHITC) as the font type like in the mock-up screenshot as it completes the notebook theme I am going for.
I used love.graphics.setFont already but the font is aliased, like it has blurry edges, and so I was wondering if I could make the font bold and also if possible remove the antialiasing ( antialiasing is a way the computer makes small images like sprites and font appear smooth by adding shading to the edges ).
and in addition to that is there a way to use two different font styles at the same time, like if I want to have a heading in Ariel Black and then the adjacent text in Times New Roman. or if I want to have a specific word colored in red how would I go about this?
Echo wrote:
and in addition to that is there a way to use two different font styles at the same time, like if I want to have a heading in Ariel Black and then the adjacent text in Times New Roman. or if I want to have a specific word colored in red how would I go about this?
function love.load()
fontA = love.graphics.newFont(font_A_path)
fontB = love.graphics.newFont(font_B_path)
end
function love.draw()
love.graphics.setFont(fontA)
-- draw some stuff
love.graphics.setFont(fontB)
-- draw some stuff
...
For non-anti-aliased fonts, you might want to try using a program to convert fonts to images like Bitmap Font Generator and using it in LÖVE as an ImageFont