Skip to content
Snippets Groups Projects
Commit bdd2d68c authored by Alex Ksandra's avatar Alex Ksandra
Browse files

Added missing tables in font size

parent 3c7ebe43
No related branches found
No related tags found
No related merge requests found
......@@ -861,10 +861,11 @@ local word_size_cache = {}
local fontoldsize = getmetatable(tmps).__index.size
getmetatable(tmps).__index.simplesize = fontoldsize
local fontcachewordsize = function(font, fstyle, v)
if not word_size_cache[font][fstyle][v] then
word_size_cache[font][fstyle][v] = {fontoldsize(font, v)}
local cache = table.getTable(word_size_cache, font, fstyle)
if not cache[v] then
cache[v] = {fontoldsize(font, v)}
end
return unpack(word_size_cache[font][fstyle][v])
return unpack(cache[v])
end
getmetatable(tmps).__index.size = function(font, str)
local tstr = str:toTString()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment