love.graphics.print makes pixelated text blurry.
Posted: Sun Feb 16, 2025 11:01 am
my font (created in bitfontmaker2) is pixilated, but love2d blurrs it. how to stop it???
(`setDefaultFilter("nearest", "nearest")` or `t.window.highfpi = false` are useless)
EDIT: I found a solution -
(`setDefaultFilter("nearest", "nearest")` or `t.window.highfpi = false` are useless)
Code: Select all
th = 1
function love.load()
monospaced = love.graphics.newFont("Monospaced.ttf", 11)
love.graphics.setFont(monospaced)
love.graphics.setDefaultFilter("nearest", "nearest")
end
function love.draw()
love.graphics.print("...###...#...#.#...###\n...#.#...#...#.#...#.#\n...##....#...#.#...##.\n...#.#...#...#.#...#.#\n...###...#...###...#.#\n", 0, 0, 0, th, th)
end
function love.wheelmoved(x, y)
th = th + y * 0.1
end
Code: Select all
monospaced = love.graphics.newFont("Monospaced.ttf", 11, "mono", 11)