Perfect Vertical Text Alignment Across Devices

440
Vote up!

By measuring the total font height and where the actual text is visible from top and bottom, you can get the percentage offset required to get perfect placement. Because it's different in the Corona Simulator, Android, and iOS, you need to do this at least 3 times. Testing indicates that the offset is consistent across devices within a given platform, so you only need to do this once for each platform.

Category: 
Contributor: 
jonjonsson

The website is no longer being updated, and is for archival purposes only.

 

Corona SDK is now Solar2D

https://Solar2D.com/

×