But anyways, I'm trying to center text on the X axis *only*. On one of my canvas' I tried getting the width of the font then dividing by 2. It looked pretty centered. So for another canvas, I used the same 'algorithm', however, it was no where near centered. It was completely visibly off.
How would I center something on the X axis only so I could change the Y axis as I please?
'Algorithm' being used:
Code: Select all
function love.load()
TitleFont = love.graphics.newFont("/fonts/FaceYourFears.ttf", 45)
end
function love.draw()
love.graphics.print("Example Text", (TitleFont:getWidth("Example Text")/2), 10)
end