---
title: Day 116
author: Daniel Devesa Derksen-Staats
date: 2022-09-11 11:44
tags: Dynamic Type, iOS
categories: ["Accessibility"]
series: ["365 Days iOS Accessibility"]
image: /Images/365DaysIOSAccessibility/image96.jpg
---

It is possible to use custom fonts and for them to still work great with Dynamic Type. You need to define the default size and use UIFontMetrics to get the scaled font for each one of the styles you'd like to use. 

[https://developer.apple.com/documentation/uikit/uifontmetrics/scaledfont(for:)](https://developer.apple.com/documentation/uikit/uifontmetrics/scaledfont%28for:%29)

![Four labels with the text "Large Title" exemplifying the size for extra small, large (default), extra-extra-extra large, and 5th accessibility size. There is some code showing how to do that with a custom font, in this case: ComicNeue-Regular. It creates a font with the name of the font and the size 34.0 (for the default size). Then it creates a UIFontMetrics for the .largeTitle text style. And finally, it configures the font for the label y calling scaledFont on the font metrics created, and passing the custom font as a paramterer.](/Images/365DaysIOSAccessibility/image96.jpg)