Page 1 of 1

Default font on iOS at different resolutions

Posted: Sat Nov 24, 2012 12:45 pm
by Willits
Hi everybody,

In the next free update of NativeGeometry (2.5), I want to improve the function ng_getSystemFont() in the NativeGeometry API.
This function simply returns the default system font and size for the system you are on. (Including screen dpi size :) )

So as I am not an iOS developper, I am asking what are the default font and size for LiveCode for the following iPhone:
- iPhone 3
- iPhone 4
- iPhone 5

Thanks you !

Re: Default font on iOS at different resolutions

Posted: Tue Nov 27, 2012 11:52 am
by endernafi
Hi Damien,

iPhone3 and 3GS use Helvetica as system font,
while iPhone4, 4s and 5 use Helvetica Neue.
You can read more here

As font size, it's somewhat complicated,
since mobileControlGet(tControllerId,"fontSize") doesn't return anything {possibly bug}.
And I know next to nothing about xCode environment :oops:
I've run a comparison and can say that the default font size is 12.
But this is not a system info, just an estimation based on visual comparison.
I'm pretty sure, though 8)
A more interesting point is no matter what device or screen resolution the app works on, font size is still 12.
It's something about relative point calculation of retina displays, I guess.

Maybe a more experienced developer or an xCoder can explain further more.

Hope it helps...

Best,

~ Ender Nafi