Post

Replies

Boosts

Views

Activity

Reply to Preinstalled font use
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:)
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’22
Reply to SF Symbols & Fonts - Commercial use
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.
Topic: Design SubTopic: General Tags:
Apr ’22
Reply to Use SF font to build custom sign in with apple button
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
Topic: Design SubTopic: General Tags:
May ’21
Reply to Can I use a system front in a commercial game via Unity?
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
Jan ’21
Reply to can i use sf font as a web font?
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."
Topic: Safari & Web SubTopic: General Tags:
Jan ’21
Reply to alternate six and nine on the Apple Watch
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)
Topic: App & System Services SubTopic: General Tags:
Jan ’21
Reply to How to get UIFont for 'SF Pro Display' consistently?
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
Topic: UI Frameworks SubTopic: UIKit Tags:
Dec ’20
Reply to iOS app built in 2014 - Font license for Helvetica Neue?
Hello, Generally, fonts that were already installed by the OS were not embedded in iOS apps. You would typically use UIFont APIs to use the fonts included with the OS. UIFont.systemFont(ofSize:) would have given you Helvetica Neue when it was the system font. You could also use something like UIFont.init(name: "Helvetica Neue", size: 14). Font embedding means that you have the font binary locally and embedded it your app with a build step. This means that you had to acquire the font from somewhere and download it locally. Where you got the font would be important as that would set the terms of the license agreement. If it was downloaded from Apple then I would go to them and ask about their license agreement. If the font was acquired through a font provider, you would need to discuss it with them. I see that fonts often have license agreements embedded in them, and that might be a good place to start looking. Unfortunately, this appears to be a license agreement issue and you'll probably need to discuss this with someone who knows copyright/IP law. For example, Apple might indemnify developers who use their fonts within their iOS apps. Someone who knows law would be able to explain that better. But as to your question, it was not standard practice to embed Helvetica Neue on iOS apps when that font was already installed in the system. Good luck! Doug Hill https://github.com/djfitz/SFFontFeatures
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’20
Reply to Entire iOS App Font Override
I don't think there's any way to change out the system font at either the device/Settings level or the app level. You might be able to use the UIAppearance classes to achieve similar things though. For example: UILabel.appearance(whenContainedInInstancesOf: [UIViewController.self]).font = UIFont.init(name: "Courier", size: 14) to customize appearance in all view controllers. To customize specific UI elements, you can do something like this: UIBarButtonItem.appearance(whenContainedInInstancesOf: [UIViewController.self]).font = UIFont.init(name: "Courier", size: 14) if you want to just customize just the Navigation Bar or Tab Bar. You'll probably have to go through your UI to find things that need to be customized but it's relatively easy to create theme classes that abstract all this away and include all customizations in one place. Doug Hill https://github.com/djfitz/SFFontFeatures
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’20
Reply to SF Compact for iOs
You used to be to enumerate installed fonts and get San Francisco variants. In iOS 14 this may no longer be the case. If you do see SFCompact show up then I don't see why you can't use an installed font in your non-watch app. But I would check with Apple to be sure.
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’20
Reply to SF pro display font
You can use San Francisco font in both your Apple ecosystem devices (iphone, ipad, apple watch, etc.), and your websites. For your app, use the UIFont.systemFont APIs. You will get San Francisco font on phones for which San Francisco is the system font, which I think is iOS 9 and later. 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 are for UI mockups only. Hope this helps. Doug Hill https://github.com/djfitz/SFFontFeatures
Topic: App & System Services SubTopic: General Tags:
Dec ’20
Reply to Can I install SF fonts on iPhone?
Just to be clear, app developers can use San Francisco font in their app using the systemFont APIs. You just can't download the font from Apple and install it in your app. Downloading the font can only be used for mockups, which graphic designers need to do when developing UI in Sketch, etc. That said, why the live preview show correct fonts/symbols with Adobe XD is something you should bring up with Adobe.
Topic: App & System Services SubTopic: Hardware Tags:
Dec ’20
Reply to Use Basic a of System Font
I believe what you're referring to is a "one story a". Which doesn't have the swoop on top of the lower-case 'a'. If so, the San Francisco system font has a 'one-story a', which is an OpenType alternative stylistic variant. I created a library to make using these variants in your app very easy. See here: https://github.com/djfitz/SFFontFeatures Doug Hill
Topic: Design SubTopic: General Tags:
Dec ’20
Reply to Why is applyFontTraits missing from UIKit?
I've documented many of the different typographic features of San Francisco font, and have a library to allow using them very easy: https://github.com/djfitz/SFFontFeatures See below for a list of features that I support. Doug Hill Straight-sided six and nine Open Four Vertically Centered Colon High Legibility One Story a Upper Case Small Capitals Lower Case Small Capitals Contextual Fractional Forms Monospaced/Proportional Numbers Superiors/Superscripts Inferiors/Subscripts
Topic: UI Frameworks SubTopic: UIKit Tags:
Dec ’20