Is there a way to get an app using the System Font to keep using Helvetica Neue in iOS 9?

My app's UI is geared to using Helvetica Neue at particular sizes and gets the font via the systemFontOfSize: and similar methods. The wider spacing (of numbers in particular) of the San Francisco font break my app's UI.


Short of overhauling the entire app, is there any way to signify to iOS 9 that it should use the old system font instead of the new system font?

You could replace your use of systemFontOfSize: with name:size:, with the name being Helvetica Neue (in PostScript format: "HelveticaNeue").


E.g.

UIFont(name: "HelveticaNeue", size: 15.0)


or

[UIFont fontWithName: @"HelveticaNeue" size:15.0]

Keep in mind that you may get slightly different results than you did before when using this workaround technique. The versions of Helvetica Neue accessible through the systemFontOfSize et. al. methods were (at least on OS X) UI-optimized versions of the font with the layout metrics tweaked a bit. If you access the font explicitly, you'll get the document version. Just something to look out for.

Another problem with this technique is, while it will change all my custom usage of fonts, it won't change standard items like button text.

Most control classes (at least on OS X) will allow you to set an NSAttributedString as the title, which includes the ability to set custom fonts. You could also change the font from inside IB. However, at small sizes Helvetica Neue and SF are practlcally indistinguishable, so it might not be worth your while.


Why are you trying to hang on to Helvetica Neue in your app, anyway?

Numbers in San Fransisco are proportional width (by default) so one would expect them to take up less space rather than more.


Some thoughts:


  • fighting against San Fransisco is probably not a good approach in the long term
  • you might be able to use the Appearance Proxy methods to globally set the font for buttons and navigation bar titles. That doesn't seem to work for some system view controllers (e.g. mail) that are actually out-of-process using XPC
  • apps built with Xcode 6.x/iOS 8 can run on iOS 9 and will keep the Helvetica system font. If past precedent holds true, there'll be a good few months after iOS 9 is released before Apple will start requiring apps to be submitted with Xcode 7. This approach might buy you some time to adapt your UI whilst still allowing updates. However, of course, it prevents you from taking advantage of any iOS 9 features.

Hi -


I'm experiencing the same problem as Strengthiness. My existing app, which has been in the app store for about a year, is not working correctly on iOS 9 Beta. Certain fields (they do contain numbers) are being truncated since the new system font seems to be wider than the old one.


You wrote the following:

apps built with Xcode 6.x/iOS 8 can run on iOS 9 and will keep the Helvetica system font.

I'm pretty sure that my app was built with Xode 5 and not Xcode 6. Are you saying that if I rebuild the app with Xcode 6, and don't make any changes, then it will work ok on iOS 9? I have Xcode Version 7.0 beta 5 (7A176x) installed, but I haven't tried rebuilding the app with Xcode 7. I'm concerned that it will require a lot of work to convert it. Since I have iOS 9 beta 5 installed on my iPhone, I'm not sure if I can easily test the app with Xcode 6.

Any help that you can provide would be greatly appreciated.

Thanks,

Howie

When I said Xcode 6 I really meant NOT Xcode 7. An Xcode 5 app was built a long time ago, and Apple have not allowed new submissions built with Xcode 5 for a long time.


I'm sure Apple originally said that San Fransisco would only be used in apps that were explicitly compiled with Xcode 7/iOS 9. In the past, similar functionality changes have been "opt in" based on using the new tools. So, in theory, an app built with a version of Xcode prior to 7 should behave as it always did, and get Helvetica. So, if you don't want to change anything in your app, the current app store version should "just work" on iOS 9. In theory! And if you do need to make some changes (perhaps to fix a problem that only appears on iOS 9), it should be possible to build with Xcode 6 (since you can't submit Xcode 5 builds anymore) without opting in to the new system font. Again, in theory...


I'm not entirely sure if this has changed during the betas, but I have recently noticed in beta 6 that an app I build using Xcode 6.4 and run on an iOS 9 device is getting a San Fransisco font when I use UIFont's systemFontOfSize method. But things like table views and navigation bar titles seem to be to be using Helvetica. This could just be a bug. Or maybe they really are going to force the new system font on old apps (which seems very aggressive) and developers have to make changes to ensure apps continue to work correctly on iOS 9 (whilst also supporting as many earlier versions of iOS as you deem necessary).


Sorry I couldn't be more help.

On further thought and skimming the PDF for WWDC 804 Introducting the New System Fonts, maybe I misunderstood and the only "opt in" features were the proportional numbers. Page 292 mentions that proportional numbers are opt in.


So, it looks like you're going to either:


1) change your code to explicitly ask for Helvetica instead of getting the system font

2) improve the layout of your labels etc. to correctly handle the different sizes that strings occupy

3) try using Xcode 7 and see if the proportional numbers make up for the difference and things still fit (seems unlikely, but you never know)

We ran our existing apps, both iTunes and internal Enterrprise, through iOS 9 in all devices, and there were many cases of getting ellipsis on the text - the new SF font is bigger, enough to cause havoc on display - the prime reason for changing the System to the discreet font. The secondary reason is that Helvetica Neue is our corporate standard font, as dictated by Creative Services.

Our solution is to do Find/Replace on all nibs, as follows. The point sizes remain the same. Note - you will need to view the xml version of the nib to get the Find/Replace functionality:


Find: <fontDescription key="fontDescription" type="boldSystem"

Replace: <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue"

Find: <fontDescription key="fontDescription" type="system"

Replace <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue"

Is there a way to get an app using the System Font to keep using Helvetica Neue in iOS 9?
 
 
Q