Default font on iOS at different resolutions

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Willits
Posts: 3
Joined: Mon Apr 10, 2006 4:59 pm
Contact:

Default font on iOS at different resolutions

Post by Willits » Sat Nov 24, 2012 12:45 pm

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 !
Damien Girard
NativeSoft France | LiveCode extensions.

http://www.nativesoft.net

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Default font on iOS at different resolutions

Post by endernafi » Tue Nov 27, 2012 11:52 am

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
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Post Reply