Closed therainingmonkey closed 1 month ago
This isn't a bug, you need to draw your canvas with a premultiplied alpha blending mode.
function love.load()
canvas = love.graphics.newCanvas()
font = love.graphics.newFont(48)
love.graphics.setFont(font)
love.graphics.setBackgroundColor(1,1,1)
end
function love.draw()
love.graphics.setCanvas(canvas)
love.graphics.clear()
love.graphics.print('Lauren Ipsem was a very naughty girl', 20, 50)
love.graphics.setCanvas()
love.graphics.setBlendMode("alpha", "premultiplied")
love.graphics.draw(canvas)
love.graphics.setBlendMode("alpha", "alphamultiply")
love.graphics.print('The quick brown fox ran into the city', 20, 100)
end
Changing filter to 'nearest' doesn't appear to make a difference. The effect holds at different font sizes and different fg/bg color combinations.
Here I've drawn white text on a white background to highlight the shadows:
Here is the code to reproduce: