Hi - I have a problem displaying native text - in specific sizes that adjust depend on the type of iOS device used (due to the various screen resolutions). I store display.contentScaleX and then use it to display text at the appropriate size based on the device screen res using:
credits_title.size=50/scalex
The actual order of syntax is a generic display.newText, followed by setting the colours, and then the size using the command above, followed by setReferencePoint (if needed) for positioning on screen, followed by X and Y setting.
This all worked brilliantly on build 971 - and the text would always appear correct size / position. However…
I have just installed build 1076 - and now my text appears huge (running on iPad 3).
So, what has changed between these builds that is likely to change these font sizes???
I’d rather find out the actual reason before I go back and started manually tweaking sizes to make them fit, and retest on all the different device types again (physical device tests, as the results are different to just in the simulator).
The full example code would be:
credits_title = display.newText(“Credits”,0,0,native.systemFont,1)
credits_title:setTextColor(255,255,255)
credits_title.size=50/scalex
credits_title:setReferencePoint(display.CenterLeftReferencePoint)
credits_title.x = _W*0.40 credits_title.y = _H*0.10 – _W - contentWidth, _H - contentHeight
Regards,
Dave.
