I looked at the list of installed font families on iOS and iPadOS, and I don’t see Apple Chancery as being available.
Post
Replies
Boosts
Views
Activity
UIFont has a number of convenience constructors for creating variations of the system font.
// Bold system font
let boldSysFont = UIFont.boldSystemFont(ofSize: 12)
// Medium system font
let mediumSysFont = UIFont.systemFont(ofSize: 12, weight: .medium)
// Create a rounded variant using font descirptor
let sysFont = UIFont.systemFont(ofSize: 12)
if let descRound = sysFont.fontDescriptor.withDesign(.rounded) {
let roundedSysFont = UIFont(descriptor: descRound, size: 12)
}
The system font is San Francisco however it’s handled differently than other installed fonts. For example you can’t search for it by name, and it won’t show up in the list of installed fonts. This is because the system font can and has changed in the past. Ideally you would like to write your code without assuming the system font is San Francisco. You should also not make my assumptions about the font name specifics, like pro vs regular. These details can change at any time.
San Francisco is also unique because it has optical variants, Text and Display. The system picks which variant to use based on the point size. 19 pt and lower uses text, 20 and higher uses display.
In general you don’t pick the variant manually; just use the syatem font and set the point size and the system does the rest.
Doug Hill
https://github.com/djfitz/SFFontFeatures
"You can access system fonts in a standards-compliant way by utilizing the system-ui family. And in Safari 13.1 we introduced new standards-based keywords to access serif, monospace, and rounded forms."
https://developer.apple.com/forums/thread/127350?answerId=614912022#614912022
The restriction on San Francisco font is that if you download the font, any use would only be allowed for UI mockups. So don’t download the font and add to your app bundle. Use the tags above for web pages or use the System font in UIkit, SwiftUi. Etc.
I downloaded the SF Pro font installer at https://developer.apple.com/fonts
In the installer, I see some interesting license agreement terms:
"IMPORTANT NOTE: THE APPLE SF PRO FONT IS TO BE USED SOLELY FOR CREATING MOCK-UPS OF USER INTERFACES TO BE USED IN SOFTWARE PRODUCTS RUNNING ON APPLE’S iOS, iPadOS, macOS OR tvOS OPERATING SYSTEMS, AS APPLICABLE."
and
"B. Other Use Restrictions. The grants set forth in this License do not permit you to, and you agree not to, install, use or run the Apple Font for the purpose of creating mock-ups of user interfaces to be used in software products running on any non-Apple operating system or to enable others to do so. You may not embed the Apple Font in any software programs or other products. Except as expressly provided for herein, you may not use the Apple Font to, create, develop, display or otherwise distribute any documentation, artwork, website content or any other work product."
According to my read of this, you cannot use SF font for a book. If you are unsure of any of the license terms I would consult an IP attorney before using the font.
You can use San Francisco font in both your Apple ecosystem devices (iphone, ipad, apple watch, etc.), and your websites.
The OS hides SF font from the list of installed fonts enumerated by the app. So you can’t pick it from a list.
For your app, use the UIFont.systemFont APIs. You will get San Francisco font on devices for which San Francisco is the system font.
For your website, there are tags for Safari that allow you to specify system font.
"You can access system fonts in a standards-compliant way by utilizing the system-ui family. And in Safari 13.1 we introduced new standards-based keywords to access serif, monospace, and rounded forms."
https://developer.apple.com/forums/thread/127350?answerId=614912022#614912022
The restriction on San Francisco font is that if you download the font, any use would be allowed for UI mockups only. So don’t do this in your app. Give the fonts to your UI designer for mocks and use System font APIs in your app.
My understanding is that Symbols is similar to SF font in terms of license restrictions.
I am not aware of any separate requirement for including font licenses as part of app review or approval. FWIW I worked on an iOS app in the past that included Roboto with no issues from Apple app review.
Second, my understanding is that Apple doesn’t license SF font for use in apps on non-Apple devices. You will have to use a different font.
For installed fonts, use the UIFont initializer to refer to a font by name. For example
UIFont.init?(name: String, size: CGFloat)
Use the UIFont familyNames property to get the list of installed font families then get the actual installed fonts with fontNames(forFamilyName:)
My understanding is that San Francisco is only licensed for use to write apps for Apple devices (e.g. iPhone, Apple Watch, Macintosh, etc.)
Outside of app development, you can create UI mock-ups.
Otherwise I believe SF font is not licensed for other purposes, and I think this also includes symbols. I would suggest consulting the Symbols and SF font license terms.
It appears Apple has restricted getting SF font by name in latest OS release. Use System Font APIs instead.
NSFont has the following methods (amongst others):
systemFont(ofSize:)
preferredFont(forTextStyle:options:)
Hope this helps.
Doug Hill
https://github.com/djfitz/SFFontFeatures
There appears to be confusion about using the San Francisco Font. The restriction about only being able to use SF font for mockups is if you download the font yourself. Apple says you should not do this for native app development as Apple doesn't license their fonts for download so you can include a copy in your application. However, Apple actively encourages developers to use SF font in their apps by using system APIs.
For your application, use the system font APIs, and you will get San Francisco font. This will work for all your Apple ecosystem devices (iphone, ipad, apple watch, apple tv, Macintosh, etc.) as Apple has standardized San Francisco as system font across their product line.
For example, see UIFont.systemFont(ofSize: ) or UIFont.preferredFont(style:)
For your website, there are tags for browsers that allow you to specify system font.
"You can access system fonts in a standards-compliant way by utilizing the system-ui family. And in Safari 13.1 we introduced new standards-based keywords to access serif, monospace, and rounded forms."
https://developer.apple.com/forums/thread/127350?answerId=614912022#614912022
Doug Hill
https://github.com/djfitz/SFFontFeatures
Up front, I know almost nothing about Unity.
But whether or not you can use that font with a Unity game depends on how Unity allows you to specify fonts
For example, if you can specify the font by name using a Unity API, then you are probably fine.
If you're required to embed the font files in your app, then you absolutely cannot do this. My understanding is that Apple has NEVER licensed fonts for embedding in your app.
I would recommend you check with Unity for more details about using fonts.
Doug Hill
See here:
https://developer.apple.com/forums/thread/127350?answerId=614912022#614912022
"You can access system fonts in a standards-compliant way by utilizing the system-ui family. And in Safari 13.1 we introduced new standards-based keywords to access serif, monospace, and rounded forms."
I tried this code and it appears that the WatchKit label WKInterfaceLabel doesn't have a font property.
Use the attributedString property instead.
See below for a cleaned up version of the code and updated for Swift 5 and iOS 13.
Also, I created a library to easily use these Stylistic Alternative features of San Francisco font:
https://github.com/djfitz/SFFontFeatures
Doug Hill
let features =
		[
				[ UIFontDescriptor.FeatureKey.featureIdentifier: kStylisticAlternativesType,
					UIFontDescriptor.FeatureKey.typeIdentifier: kStylisticAltOneOnSelector ]
		]
let fontDescriptor = UIFont.systemFont(ofSize: 14, weight: .regular)
.fontDescriptor
.addingAttributes( [UIFontDescriptor.AttributeName.featureSettings: features] )
let alternate69Font = UIFont(descriptor: fontDescriptor, size: 14)
let theString = NSMutableAttributedString.init( string: "69",
							 attributes:[NSAttributedString.Key.font : alternate69Font] )
watchLabel.setAttributedText(theString)
Hello,
Apple is making it very clear they don't want developers to access San Francisco font unless they use the approved system APIs. For example
UIFont.systemFont(ofSize: )
or
UIFont.preferredFont(style:)
Attempting to load the font by name is no longer supported, as the warning indicates. San Francisco font doesn't seem to show up in the list of enumerated installed fonts any more either.
There's kind of a good reason for this though. According to how San Francisco font should be used, you don't want to pick the font yourself. For example, Apple says the Text variant is for point sizes less than 21 point. To make that work in all scenarios is difficult if not impossible to replicate. See here for more info on how the system makes the determination on which font variant should be used based on size:
WWDC: Introducing the New System - https://developer.apple.com/videos/play/wwdc2015/804/
So you probably shouldn't include Text and Display in a popup and just allow the user to pick it. As the app developer you need to make sure the correct variant is used.
There's also the question whether the app developer should arbitrarily choose the rounded or compact variants. I see that Apple has included the following in iOS 13:
UIFont.withDesign(design:)
That allows you to specify rounded variant but not compact. Apple says that compact is supposed to be for watch apps, so that's probably why it isn't made available on iOS.
I hope this gives you a better idea of how to use the San Francisco font.
Doug Hill
https://github.com/djfitz/SFFontFeatures