Typography
We are still deciding whether or how the native app should use a custom typeface (Frutiger).
We’ll update this page when we’ve decided how to approach custom typography within the app.
Standard styles
The design system supports these styles which match the named font properties in SwiftUI but add an nhs prefix, and use Frutiger instead of San Francisco.
The styles are defined relative to the native SwiftUI Font styles - this means that they scale with Dynamic Type.
| Font style | SwiftUI equivalent |
|---|---|
.nhsLargeTitle |
.largeTitle |
.nhsTitle |
.Title |
.nhsTitle2 |
.title2 |
.nhsTitle3 |
.title3 |
.nhsHeadline |
.headline |
.nhsSubheadline |
.subheadline |
.nhsBody |
.body |
.nhsCallout |
.callout |
.nhsFootnote |
.footnote |
.nhsCaption |
.caption |
.nhsCaption2 |
.caption2 |
Custom sizes
You can also use a custom font size with the Frutiger font.
These will still scale with Dynamic Type.
To do this, use either .nhsCustom and specify a size:
Text("Vaccinations")
.font(.nhsCustom(size: 20))
You can use the bold weight by adding the .bold() modifier:
Text("Vaccinations")
.font(.nhsCustom(size: 20)).bold()
Do not use italics.