Wrong fonts loaded from Storyboards in Xcode 15

We use Storyboards and custom fonts in our app. Once we started developing new features for iOS 17 and did the first build in Xcode 15, we've noticed that in quite a few places incorrect fonts are set to views. In some places it is incorrect weight, while in other it's completely different font.

Some observations:

  • Fonts may change the next time app is build. E.g., instead of SF Pro Display Semibold we got SF Pro Display Heavy, and then after few relaunches it switched to Nunito Bold 😵‍💫
  • We’ve ensured that correct font is set in Storyboard, and even tried to re-assign it. That didn’t help.
  • All custom fonts are properly added to a target and are registered in info.plist
  • All custom fonts are listed in UIFont.familyNames, so they are indeed registered with the system.
  • Wrong fonts are loaded on both development environment and in TestFlight builds
  • We’ve never experienced anything similar before Xcode 15

What we've tried:

  • Re-assigning fonts in Storyboard.
  • Creating new Storyboard in Xcode 15 and copying screens into it.

I wonder if anybody else having similar issues and maybe knows the workaround.

Thank you.

P.S. I've filed a Feedback to Apple: FB12903371

  • I have the same issue. For me, issue was solving by adding custom fonts programmatically. But the thing is I have to add custom fonts by code wherever I have added custom fonts in storyboard.

  • Yes, we ended up doing the same... 😵‍💫

  • Sample project I've created for Apple to reproduce the issue: https://github.com/SergejLogis/FB12903371

Add a Comment

Accepted Reply

The issue seems to be fixed in Xcode 15.1 Beta 1! Fonts in my test project are loaded correctly now. 🥳 Too bad, we are already setting all fonts from the code 😅

Here is how it looks in Xcode 15.0

Replies

I have the same issue as well since the first beta until now. for some of the screen, we assign the font in the code instead of storyboards and it works but we can't do it for all screens since our project is too big and assign all fonts will be huge effort

I'm having the same issue. For my iPad app, one screen switched all labels to bold. In another screen, my iPhone app has switched the labels for one section of my tableview to bold. I printed out the font in the console and even though my storyboard is set to Roboto-Thin, it's printing Nunito-Bold.

  • @nerezza07 @Serzhas , Can you both tell me what font size these labels are? I found that the my tableview that has some labels bold and some regular font is because they're font size 18.0. I switched half to 17.0 and those were fixed. This makes sense because my other screen that has the issue only for iPad has a font size of 18.0 for iPad but 16.0 for iOS.

  • We have many different sizes in our app and many are affected by this issue. Also, I have created a sample project to reproduce the issue, it also has wide range of sizes.

Add a Comment

We are seeing the same behaviour. Fonts are all messed up in xcode 15 beta 6

We have same issue, fonts are changed from regular to medium or from bold to regular etc. No real logic here why and on what view...

Same issue here, any movement here? I have seen this cause some major strange behavior in our app.

Same issue here. Only solution we found, is to set custom font programmatically.

We ended up assigning all the fonts from the code...

We're suffering from the same problem.

Hello, I have the same problem, also yesterday with the latest version of Xcode RC, I thought this problem would be solved, but it was not. Our project is too big. I hope that for the latest version the problem will be solved.

It's a known issue in the Xcode 15 release notes: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes

Interface Builder documents using custom App fonts may load incorrect font at runtime. (113624207) (FB12903371) Workaround: Set font manually in code.

Same issue, it helps to open xib or storyboard, set font to some other and then assign the one u need. After such reassigning it starts to work correctly again. But its weird and I hope it will be fixed asap...

I would recommend to follow the below steps, which will make things easier and quick

  • Delete custom fonts from your project. || *Backup fonts
  • Run the app to the simulator or a real device
  • Now re-add your custom fonts to your project
  • Run it again

Good luck! 🥳

  • @ayazrafai ... tried, did not work.

  • Yes, it was working for me yesterday, and today facing the same issue.

Add a Comment

Any updates on this? Held off on updating to Xcode 15 for our company's project to ensure things were more stable. We have a very large project with thousands of labels. Changing all of these to be programmatically set will be a huge effort. Now having to downgrade to Xcode 14 until this is resolved.

  • don't update your mac os. The updated OS will force you to use xcode 15 since xcode 14 is not usable in the updated OS

  • Updated to the newest MacOS And using Xcode 14. No issues for the past 2 weeks.

Add a Comment

This issue is mentioned in Xcode 15 Release Notes:

Note: Interface Builder documents using custom App fonts may load incorrect font at runtime. To workaround this, set font manually in code.

P.S. I have opened a Feedback Request for this issue after the Xcode 15 Beta 2, but it isn't fixed in release version. Therefore, I wouldn't hold my breath for it to be fixed any time soon. Probably, Interface Builder is now considered a legacy technology, so it doesn't get as much attention anymore... 🤷‍♂️

  • makes sense but I can’t imagine Apple introducing major issues and refusing to resolve due to legacy.

Add a Comment

Same issue here. It's OK to consider any feature as legacy technology, but leave it working as it was before, never broke it and look away as if nothing is happening...

  • Couldn't say better myself! But we have what we have, unfortunately... 🤷‍♂️

Add a Comment