diff --git a/font_api/font.lua b/font_api/font.lua index 537990c..6a99334 100644 --- a/font_api/font.lua +++ b/font_api/font.lua @@ -258,10 +258,10 @@ function Font:render(text, texturew, textureh, style) -- Add image only if it is visible (at least partly) if x + self.widths[codepoint] >= 0 and x <= texturew then - if self.get_glyph == nil then + if self.getglyph == nil then glyph = string.format("font_%s_%04x.png", self.name, codepoint) else - glyph = self.get_glyph(codepoint):gsub("[\\^:]", "\\%0") + glyph = self.getglyph(codepoint):gsub("[\\^:]", "\\%0") end texture = texture.. string.format(":%d,%d=%s", x, y, glyph) diff --git a/unifont/init.lua b/unifont/init.lua index 465a615..f31456e 100644 --- a/unifont/init.lua +++ b/unifont/init.lua @@ -30,6 +30,6 @@ font_api.register_font( linespacing = -3, height = 16, widths = widths, - get_glyph = get_glyph, + getglyph = get_glyph, } )