if you try this little code:
local text={} text[1]="line1\nline2\nline3\n" text[2]="line1\rline2\rline3\r" text[3]="line1\r\nline2\r\nline3\r\n" local myText={} local posX=50 for i=1, #text do local options = { text=text[i], x = posX, y = 150, --width=100, font = native.systemFontBold, fontSize = 18, align = "left" --new alignment parameter } myText[i] = display.newText(options ) myText[i]:setFillColor( 1, 0, 0 ) posX=posX+110 end
you will notice that in Android and IOS it will run different. on android it will provide linebreaks when it found “\n”. it will ignore “\r”. In IOS, it will igone “\n” and “\r”. BUT if i uncomment width line it will reconize both “\n” and “\r”. i reported the bug, and i told that ios was broken, because if should not need width to be declared to react to both. the response was that android is the one is broken, width is used for multilines so it must be declared. i’m the only one thinking this is crasy? width should be to limit chars to certain point and to alignment nothing more. display.newText should respect \n or \r without width beeing declared.

