I would like to use the font "Avenir" which is included in iOS 6. Does that mean a device running iOS 5 won't be able to see the font? If so, is there a way to fallback on a different font if "Avenir" isn't available on their device?
You can choose the font you want to be used in iOS < 6 and assign it if necessary. Define a macro like this:
#define SYSTEM_VERSION_LESS_THAN(v)
([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
and then you can do in your code:
NSString *fontName = @"Avenir";
if SYSTEM_VERSION_LESS_THAN(6.0) {
fontName = @"ArialMT";
}
You can find a list of supported fonts here: http://iosfonts.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With