Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

xcode

ios

ios9

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?

like image 248
Meriw Avatar asked Sep 24 '15 01:09

Meriw


People also ask

What is the closest font to San Francisco?

Helvetica Yet it was the primary source of inspiration for Apple when creating San Francisco.

Can I use San Francisco font on my website?

The newly created Apple's San Francisco font is comfortable for human eyes as per research. Normally Apple's font can not be used on any webpage through CSS. These kind of fonts are in-build in Apple's product but the new San Francisco font can be used in any web content.


1 Answers

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.

like image 91
l'L'l Avatar answered Sep 17 '22 17:09

l'L'l