Calculating the width of a text string from the entire string produces a different (smaller) number than calculating the width of the same string letter by letter. e.g.:
Width(“LMNOP”) -> 50
Width(“L”) + Width(“M”) + Width(“N”) + Width(“O”) + Width(“P”) -> 62
with the following width function:
function Width(txt,font, size)
–calc display width
local tempDisplayLine = display.newText(txt, 0, 0, font, size)
return tempDisplayLine.contentWidth
end
The font I’m using has no kerning table.
Is this a known problem? Are there known workarounds?
TIA,
-Tom [import]uid: 100708 topic_id: 25175 reply_id: 325175[/import]