So far I can get it to print the strings in the correct colour but I need a way to determine the width of the previous strings so words dont overlap. I tried just counting the length of the string but LOVE's default font doesnt seem to be fixed width. Do I need to find a fixed width font or is there a way to calculate the size of a string (in pixels)?
I think love.graphics.getFont() will automatically create the default font in future versions of LÖVE, but doesn't currently. So for now: no, you will need to create the font.
So far I can get it to print the strings in the correct colour but I need a way to determine the width of the previous strings so words dont overlap. I tried just counting the length of the string but LOVE's default font doesnt seem to be fixed width. Do I need to find a fixed width font or is there a way to calculate the size of a string (in pixels)?
local _newFont = love.graphics.newFont
love.graphics.newFont = function(font, size)
if type(font) == "number" or not font then
size = font
font = vera_ttf
end
return _newFont(font, size or 12)
end