Code: Select all
Class = require 'class'
push = require 'push'
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
VIRTUAL_WIDTH = 432
VIRTUAL_HEIGHT = 243
function love.load()
love.window.setTitle('Maze')
love.graphics.setDefaultFilter('nearest', 'nearest')
smallFont = love.graphics.newFont('HARRYP__.TTF', 25)
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
fullscreen = false,
vsync = true,
resizable = false,
})
end
function love.draw()
push:apply('start')
love.graphics.clear(30 / 255, 30 / 255, 50 / 255, 1)
love.graphics.setFont(smallFont)
love.graphics.printf('Hello, world!', 0, VIRTUAL_HEIGHT / 2 - 6, VIRTUAL_WIDTH, 'center')
push:apply('end')
end
I've tried to change the font size but it still comes out pixelated. But I've seen others use a similar code to this and their text comes out all crisp and clear.