sonic-radiance/sonic-radiance.love/core/modules/assets/imagefonts.lua

15 lines
446 B
Lua
Raw Normal View History

local Font = require "core.modules.assets.fonts"
local ImageFont = Font:extend()
function ImageFont:new(filename, extraspacing)
local data = require(filename)
local extraspacing = extraspacing or data.extraspacing or 1
self.font = love.graphics.newImageFont(filename .. ".png", data.glyphs, extraspacing)
self.filter = ""
self:setColor(1, 1, 1, 1)
self:setSpacing(false, 0)
self.align = "left"
end
return ImageFont