2019-03-23 12:02:01 +01:00
|
|
|
local cwd = (...):gsub('%.imagefonts$', '') .. "."
|
|
|
|
local Font = require(cwd.. "fonts")
|
2019-03-10 12:55:16 +01:00
|
|
|
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
|