0
votes

As Apple announced that San Francisco font would be used in iOS9, the font would become wider then before. (https://developer.apple.com/fonts/)

However, I can't find the changes in iOS 9 simulator. I am using Yosemite OS, Xcode 7.02 and Xcode 7.1 Beta, but the system font is still Helvetica Nue.

I am not sure if it helps if I upgrade to El Capitan, but I wish to simulate Sans Francisco with Yosemite and Xcode 7. I have done installing the Sans Francisco font but it is still not working. The Sans Francisco font does not even appear when customising UILabel's font.

So how can I use San Francsico font in Xcode 7 simulator? Preferrably make it as system font.

1

1 Answers

0
votes

I just struggled through this so I'll provide the way that worked for me. It's definitely not a perfect solution but it was the only way I could find to test my app in the Simulator using the San Francisco font, so at least it worked for that. Even though my app uses "System" as the default font, I couldn't figure out how to get Xcode to use San Francisco instead of Helvetica Neue for "System"--I had to change it to Custom font and specifically choose San Francisco. Also, it appears like you would have to do my fix per project; it doesn't look like it remembers it systemwide. You said you downloaded the font successfully but I'll provide all the steps starting with that. I basically followed this website:

http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

First go here (it'll make you enter your developer account) and download the font:

https://developer.apple.com/fonts/

enter image description here

Add the fonts to your project. You don't need to put them in a fonts folder but I did that for organization.

enter image description here

Verify that they appear in the Bundle Resources. I didn't have to do anything here; they just appeared automatically.

enter image description here

Go to your plist file and add them, one line for each font. I did have to do this step. To make it easier, I opened a terminal window and ran the ls command to list the fonts so I could copy/paste each name rather than type them all.

enter image description here

Here's the list in terminal:

enter image description here

Now in the story editor, I could click a control and change its font. This is the part where I don't know how to make Xcode automatically use the San Francisco font when it's set to "System". I had to change it to Custom as shown here:

enter image description here

Once I picked System, I could scroll down and change the font from Helvetica Neue to SF UI Display.

enter image description here

As I said earlier, this trick at least let me test the SF font in the Simulator, but it's not the perfect fix, because ideally all you'd have to do is change it to iOS9 and Xcode would be smart enough to use San Francisco rather than Helvetical Neue, since that's what a real device would do. However, this should at least enable you do see SF in the simulator.