-1

I followed the Apple guide to add a custom font to my application. It does work only if I also add the font to my system. If I don't I get the following error when opening a storyboard which contains the custom font:

Font “AlmaMono-Bold” does not exist on this system, substituting the system font instead. Saving the document will lose the original font reference.

Is it required to add the custom font to the system or is there other way to do it? There are two main problems with requiring to add the font to the system:

  • If some other dev wants to work on the project, he gotta remember to add this custom font to his system.
  • How to handle it in the Continuous Integration server? I use fastlane to build the application and send to the store, but the font was not working.
Leonardo da Silva
  • 1,285
  • 2
  • 10
  • 25
  • Does this answer your question? [Custom font in a storyboard?](https://stackoverflow.com/questions/9090745/custom-font-in-a-storyboard) – timbre timbre Jan 11 '22 at 14:28

1 Answers1

2

A storyboard does not magically look in your project for fonts. So opening a storyboard will not display a font unless that font is available on your machine as a whole.

The usual approach is to set the font in code, not in the storyboard.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • 1
    This has nothing to do with the fastlane issue. Fastlane builds apps with embedded fonts just fine. Ask a separate question. – matt Jan 11 '22 at 14:29
  • I don't think it would be magical if it did, all the information is provided in the project which the Xcode is built to recognize. It would improve the developer experience. But developer experience using Apple tools have never been good anyway. – Leonardo da Silva Jan 11 '22 at 14:57
  • Also, adding the font in code did fix my issue, so that would be the actual answer to my question. Thanks for your time! – Leonardo da Silva Jan 11 '22 at 15:03