different width in screen

I define tow “newText” to show “iiiii” and “aaaaa”,but they are different width in screen
how can make them the same width?

local t1 = display.newText( "iiiii: ", 25, y, nil, 16 );
local t2 = display.newText( "aaaaa: ", 25, y, nil, 16 );
–t1,t2 have different width in screen, but string lenth are the same 5 [import]uid: 29364 topic_id: 15131 reply_id: 315131[/import]

The same width? As in you want “aaaaa” to be exactly as wide as “iiiii”?

If that is what you mean you’d have to change the text size, making “i” bigger or “a” smaller, because with a text size of 16 for both “a” will always be wider than “i”. [import]uid: 52491 topic_id: 15131 reply_id: 56004[/import]

I believe you will need to use a custom monospaced font (maybe courier…). Let us know if this works. :slight_smile:

try:
http://www.lowing.org/fonts/ [import]uid: 21331 topic_id: 15131 reply_id: 56020[/import]

That’s a good suggestion, actually - it didn’t even cross my mind I’m ashamed to say.

+1 [import]uid: 52491 topic_id: 15131 reply_id: 56135[/import]