Search code examples
iosiphoneswiftios7ios8

Font not scaling or working for iPhone 6 and 6+


I am using OpenSans font (Regular bold and semibold) it works great in iOS 7.1 on iPhone 5 and great in simulator on iPhone 5 iOS 8.3 but in iPhone 6 and 6+ iOS 8.3 it reverts to using the system font. I want this work work in interface builder but I've also tried setting it through code as well.

I've printed out the font list and got that its definitely included

Font Family Name = [Open Sans]
Font Names = [[OpenSans-Semibold, OpenSans, OpenSans-Bold]]

I've set it manually like so:

var font = UIFont(name: "OpenSans", size: 5)
println("font \(font)")
descLabel.font = font

I've run out of things to try I have no idea why it isn't working.


Solution

  • Size 5 is insanely small. A label will refuse to permit its font to be set to a size so small that it would not be legible under any circumstances. Set the label's font to a reasonable size, like 12 or 18.