display.newText Format different on screen. Why? Font kerning? Spacing?

I’m making an app that accesses data via telnet. The text I get is formatted with spaces and looks fine in the Corona Simulator Output (via print()) but NOT when put on the simulator/device. Why?

The attached files are the text (formatted well) and a screenshot of the output on the screen of the simulator/device (formatted not well). Why???

How do I fix this?

Is there a font that works better?(for both devices)

You need to use a fixed width font. Most fonts are variable width, that is the letter “i” takes up less space than the letter “M”. In a fixed with font, each letter takes up the same space and will take care of your formatting issues.

Most devices understand “Courier” as the standard fixed with font, but because it’s not guaranteed to be on all devices, you might want to find a freely usable fixed width font and use it with your app.

Rob

Yes, that was it. I now set up a clumsy condition to check system.getInfo(“model”) in order to pick the correct font :slight_smile: But, it works! Thanks!

You need to use a fixed width font. Most fonts are variable width, that is the letter “i” takes up less space than the letter “M”. In a fixed with font, each letter takes up the same space and will take care of your formatting issues.

Most devices understand “Courier” as the standard fixed with font, but because it’s not guaranteed to be on all devices, you might want to find a freely usable fixed width font and use it with your app.

Rob

Yes, that was it. I now set up a clumsy condition to check system.getInfo(“model”) in order to pick the correct font :slight_smile: But, it works! Thanks!