diff options
author | Pierre-Yves Rollo <dev@pyrollo.com> | 2018-07-08 20:41:02 +0200 |
---|---|---|
committer | Pierre-Yves Rollo <dev@pyrollo.com> | 2018-07-08 20:41:02 +0200 |
commit | b96550ab247f53c84d52fe7bbfbccbd2f672d7d1 (patch) | |
tree | 290649c6c82aa60a9eb7f5987c6662618b89cbbc | |
parent | c6cad702bcea7f7836153b9b7f6ad847e3bd605e (diff) | |
download | display_modpack-b96550ab247f53c84d52fe7bbfbccbd2f672d7d1.tar.gz display_modpack-b96550ab247f53c84d52fe7bbfbccbd2f672d7d1.tar.bz2 display_modpack-b96550ab247f53c84d52fe7bbfbccbd2f672d7d1.zip |
Creation of Font class and code update accordingly (fix)
-rw-r--r-- | font_api/font.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/font_api/font.lua b/font_api/font.lua index 60563d8..6c848f6 100644 --- a/font_api/font.lua +++ b/font_api/font.lua @@ -187,12 +187,11 @@ function font_api.Font:make_line_texture(line, texturew, x, y) local pos = 1 -- TODO: Use iterator - while pos <= #text do + while pos <= #line do char, pos = get_next_char(line, pos) -- Replace chars with no texture by the NULL(0) char if self.widths[char] == nil -or char == 88 --DEBUG then print(string.format("["..font_api.name .."] Missing char %d (%04x)",char,char)) |