Wayback Machine
66 captures
07 Jul 2019 - 15 Apr 2026
May JUN Jul
12
2020 2021 2022
success
fail
About this capture
COLLECTED BY
Collection: GDELT Project
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20210612033429/https://developer.apple.com/videos/play/wwdc2019/227/

View in English

  • Global Nav Open Menu Global Nav Close Menu
  • Apple Developer
Search Developer
Cancel
  • Apple Developer
  • Discover
  • Design
  • Develop
  • Distribute
  • Support
  • Account
Limit search to

Quick Links

5 Quick Links

Videos

Open Menu Close Menu
  • Collections
  • Topics
  • All Videos

Back to WWDC 2019

Streaming is available in most browsers,
and in the WWDC app.

  • Overview
  • Transcript
  • Font Management and Text Scaling

    Starting with iOS 13, your iOS app can contribute fonts for systemwide use. Understand how fonts are managed on iOS, and learn how to install and access fonts. Get details on the font picker interface that allows users to choose fonts, and the System UI fonts that are now available for use in your app. Review best practices for text scaling that works regardless of device.

    Resources

      • HD Video
      • SD Video
    • Presentation Slides (PDF)

    Related Videos

    WWDC 2020

    • Optimize the interface of your Mac Catalyst app
    • SF Symbols 2

    WWDC 2019

    • Creating Great Localized Experiences with Xcode 11
    • Introducing iPad Apps for Mac
    • Introducing SF Symbols
    • What’s New in AppKit for macOS
  • Download

    Good morning. My name is Julio Gonzalez. I manage the Type Engineering Team and it's great to be here with you today to share with you all the new advances that we have for text and fonts in iOS.

    We have a full agenda today.

    I'll start by showing you some access to some new system fonts for your apps.

    I will then continue by showing you what it takes to build an app that can make fonts available systemwide as well as how to make an app access those very same fonts.

    Then, we'll talk about some new mechanisms that we have for apps to select fonts.

    And we'll end up by talking about some text scaling considerations that you may have as you bring your iPad apps to the Mac.

    Let's get started.

    We'll be making available three new system fonts in all the new releases.

    The first one is a rounded system font which you can see here being used by the schedule label at the very top of the Reminders app.

    There is also a serif system font that we're making available which you see here being used in multiple places in the Books application.

    Finally, we're making available the monospaced system font which you may have seen before used in Swift Playgrounds.

    I encourage you to consult the Human Interface Guidelines to see what are the best uses of these system fonts in your application UIs.

    You can get access to the system fonts by new APIs in UIFontDescriptor.

    We've defined four new constants.

    The first one, the default is the standard system sans serif system font that you've all used throughout the years. And then, we've defined a constant for each of the new system fonts that we're making available.

    You can use these constants with a new method called withDesign whose purpose is to transform a font descriptor from one design to another. It's fairly simple to use. You start with a font descriptor. In this case, we're getting a font descriptor from a bold system font that we've instantiated. And then, what we want to do is actually obtain a rounded system font. So, we make the withDesign call with the rounded constant. And if that's successful, we're able to instantiate our rounded bold system font. Notice we instantiated the system font using a high-level API. We did not instantiate the system font by using its name which leads me to the next topic.

    We've noticed that many apps still today instantiate system fonts by name.

    This is something that in the past we've strongly discouraged apps to do. So, it's starting with the new releases, any such font instantiation will fail. You need to use one of the high-level system calls to instantiate such fonts. You know that you're instantiating a system font by name because if you look at the name that you're passing with if it starts with a dot, you're using a, an Apple private name.

    Now, there are many good reasons to instantiate fonts by name. That's how you get access to custom system fonts in your apps as well as if you are parsing a document, that's how you would instantiate a font that the document needs.

    Now, we've also noticed that many apps are not handling properly font instantiation by name.

    Sometimes, they crash. And the reason is, is because they don't actually look at the return of the instantiation. They assume that it's always going to succeed.

    As we change fonts in the OS for some of our fonts, or we remove fonts from the OS, those, those fonts are no longer present. So, your apps cannot assume that a font that isn't in one version of the OS will be in another. You need to pay attention to the result of the instantiation and take appropriate action in the app and substitute that with another font if necessary. With that, I'd like to switch subjects to something that I as a user and as a developer of fonts have been waiting for a long time. And that is the ability for apps to be able to install fonts systemwide in the OS. So, we call these apps Font Provider Apps. And basically, they are apps that you submit to the Store which can make fonts available systemwide in the OS. Along with those apps, we've created a very simple UI setting in which users can browse the fonts that applications have installed as well as remove fonts that they no longer want to use.

    To create one of these apps, there are two things that the app needs to do. First, it must obtain entitlement.

    And second, as the app gets submitted to the store, it needs to be submitted with all the fonts that the app can make available to the OS.

    This is important. The fonts need to be part of your bundle, or they could be part of an asset catalog.

    The key thing is that the OS will not let a font provider application install any arbitrary fonts. As you submit your fonts to the store for validation, it'll run through a similar validation that like what we do in, in macOS in Font Book. One of the things we do is we check for the type of the format of the, of the font. We support all the modern formats; ttf, otf, ttc, and all of its modern variants. What we do not support are old font formats such as suitcase fonts or postscript fonts.

    To obtain the entitlement is fairly easy. In Xcode, now there's a new capability called Fonts.

    Once you select it, you're presented with two options. The first option is to install fonts. And that gives the app the ability to make fonts available systemwide.

    The second option is to use installed fonts. And why do we need this option? Well, by default, apps do not get access to user installed fonts. The app needs to opt in by selecting this capability to be able to see those fonts. Now, clients of or users of these applications will have some expectations. The first one will be that the app should provide a meaningful UI where users can browse fonts, install, and remove fonts. That's necessary because, in iOS, we do not have an application that can install fonts in the OS like we have in macOS.

    Also, the application should respond to system font change notifications. And the reason it needs to do so is because the user is able to remove fonts in the settings app and the app should notice when that happens and update its UI.

    And finally, if you're a font provider application that plans to make a large set of fonts available to the, to the user, a large library of fonts.

    We highly recommend that you use On-Demand resources and package your fonts in an asset catalog.

    That's a far more effective way to deliver fonts that your users need because the users will only download the fonts that they actually are going to use. Instead of downloading a huge font library that may be sitting where they only use a handful of fonts.

    So, let me walk over to the demo machine and show you how this feature works.

    So, let's assume that the user has downloaded from the store an application that browses documents. And this is one such app. I call it the Font Consumer app.

    And here on the left, it has a set of documents that I can display. On the right, it just shows the