Difference at screen for me between “simulator on windows” (with shift), and all other platforms (see attached image) :
- simulator on mac = ok
- device iphone = ok
- device android = ok
ok this is not a big big bug and i can bypass it and found a solution to avoid to add blank spaces at the end of my text, but in all case this is a real bug when a = b on a platform, and then a <> b on another one !
so the problem seems to be only on the simulator running on windows who “trim” the text.
nice description of the bug :
local native\_1 = display.newText("a test" , 0, 0, native.systemFont, 18) local native\_2 = display.newText("a test ", 0, 0, native.systemFont, 18) local perso\_1 = display.newText("a test" , 0, 0, MY\_FONT, 18) local perso\_2 = display.newText("a test ", 0, 0, MY\_FONT, 18) if native\_1.width == native\_2.width then print("Bug!", native\_1.width, native\_2.width) else print("OK", native\_1.width, native\_2.width) end if perso\_1.width == perso\_2.width then print ("Bug!", perso\_1.width, perso\_2.width) else print ("OK", perso\_1.width, perso\_2.width) end --[[simulator on windows : Bug 44.437782287598 44.437782287598 Bug 47.856071472168 47.856071472168 simulator on mac : OK 44 50 OK 48 54 device iphone : OK 43.86xxxxxxx 48.60xxxxxx OK 48.60xxxxxx 53.34xxxxxxx]]--
So Rob, not a bug ? 