mirror of
https://github.com/pyrollo/display_modpack.git
synced 2025-01-10 17:10:18 +01:00
Rename get_glyph to getglyph
This is for naming consistency among other font def params like `linespacing`, `margintop` etc.
This commit is contained in:
parent
3612b7a7ec
commit
2e5d006e70
@ -258,10 +258,10 @@ function Font:render(text, texturew, textureh, style)
|
|||||||
|
|
||||||
-- Add image only if it is visible (at least partly)
|
-- Add image only if it is visible (at least partly)
|
||||||
if x + self.widths[codepoint] >= 0 and x <= texturew then
|
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)
|
glyph = string.format("font_%s_%04x.png", self.name, codepoint)
|
||||||
else
|
else
|
||||||
glyph = self.get_glyph(codepoint):gsub("[\\^:]", "\\%0")
|
glyph = self.getglyph(codepoint):gsub("[\\^:]", "\\%0")
|
||||||
end
|
end
|
||||||
texture = texture..
|
texture = texture..
|
||||||
string.format(":%d,%d=%s", x, y, glyph)
|
string.format(":%d,%d=%s", x, y, glyph)
|
||||||
|
@ -30,6 +30,6 @@ font_api.register_font(
|
|||||||
linespacing = -3,
|
linespacing = -3,
|
||||||
height = 16,
|
height = 16,
|
||||||
widths = widths,
|
widths = widths,
|
||||||
get_glyph = get_glyph,
|
getglyph = get_glyph,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user