MarkL
MarkL

Reputation: 109

Creating a body font rule for iOS and Android

In a Phonegap App would this rule display the body copy in the native system font?

body
{
font-family: -apple-system, "Roboto", Helvetica, Arial, sans-serif;
}

On iOS the rule above would display -apple-system (San Fransisco) and fall back to Helvetica

On Android it wouldnt know -apple-system so fall back to Roboto the system font or again fall back to Helvetica

Upvotes: 0

Views: 157

Answers (1)

user3255670
user3255670

Reputation:

@MarkL
font control on Android is not that good. Unlike Apple, which controls every aspect of the mobile device. Google allows manufactures to do whatever they want - within reason. Google ships a base set of fonts with all devices, but a manufactures often get new fonts - because they are relatively inexpensive. Your best work-around is to import fonts - Either SVG or true-type or similar fonts.

NOTE: store these fonts on the mobile device for best performance. Do not get the fonts from the internet or you app have problems. Best of Luck

Upvotes: 1

Related Questions