From b96550ab247f53c84d52fe7bbfbccbd2f672d7d1 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sun, 8 Jul 2018 20:41:02 +0200 Subject: Creation of Font class and code update accordingly (fix) --- font_api/font.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'font_api') 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)) -- cgit v1.2.3