How to select San Francisco font using Interface Builder for attributed UITextView?

11,200

You need to download the font, then install/use it according to the guidelines:

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

WWDC video on the subject:

https://developer.apple.com/videos/wwdc/2015/?id=804

There's also a github repo that contains the fonts and alternative instructions (in case you don't happen to have your Apple developer account handy):

https://github.com/supermarin/YosemiteSanFranciscoFont

*The font is still in a beta stage it looks like; use in production code at your own risk.

Share:
11,200

Related videos on Youtube

Meriw
Author by

Meriw

Updated on September 26, 2022

Comments

  • Meriw
    Meriw almost 2 years

    I have an UITextView with attributed text in which I want to select the new 'San Francisco' font for certain parts of the text. However, I can't find the font from Xcode's font picker.

    Is there a way to select San Francisco or select the system's default font (as as I normally would if using plain text) using attributed text in Interface Builder?

  • Meriw
    Meriw almost 9 years
    Thanks. I thought there was a better approach.
  • TommyBs
    TommyBs over 8 years
    The question asks about using the font in an app, but I think according to the guidelines you're only allowed to use the font in mockups. So is this answer actually correct? Or am I misreading something. I assume you should just use the system font which will be San Francisco on iOS 9 and higher
  • l'L'l
    l'L'l over 8 years
    @TommyBs: This question was asked before the system font San Francisco was officially released, so it was a work around solution. Now you should use the official system font.
  • Jonny
    Jonny over 8 years
    Is the official system font on iOS 9 San Francisco? Will it always be from now on? SF does still not show up in IB.
  • l'L'l
    l'L'l about 8 years
    @Jonny: You will still need to download the font from the Apple developer site and install it. It doesn't make a whole lot of sense in my opinion, but that's apparently how they do things at the moment.