51

I added my two fonts to my project folder:

enter image description here

I added them to info.plist:

enter image description here

I can not see them in my custom font list in the storyboard:

enter image description here

What have i done wrong?

2
  • 3
    change font color then again check in storyboard Commented Sep 7, 2019 at 6:27
  • After restarting XCode upteen times and banging my head against the wall, I finally found this comment to change the font color which caused the font list to reload. Thank you @shahulhameed
    – jdavidbakr
    Commented Jul 2, 2020 at 20:00

16 Answers 16

95

I know this is a pretty old question, but I ran into the same issue. And the above tips didn't work for me. Apart from the standard checks (present in bundle, restarting XCode, the thing that fixed my issue was that my label text type was marked as "Plain" and hence some fonts were not showing in the dropdown in the Storyboard. As soon as I changed the text type to "Attributed", all the fonts appeared in the dropdown.

Hope this'll help someone stuck with the same issue.

3
  • 4
    But the custom font used to appear even if the cell was plain. I don't understand when or why suddenly I need to convert to attributed text (which is more cpu costly I imagine?) Commented Mar 29, 2019 at 20:57
  • In my case, my custom font was selectable in other files before but for other files it wasn't. If you were able to initially select your custom font, I would recommend closing your Xcode and re-opening it
    – btrballin
    Commented Mar 25, 2020 at 1:50
  • 1
    Your answer combined with DarkDust's answer solved the issue, thank you! Commented May 11, 2020 at 17:29
28

This drop-down box shows the system-wide installed fonts. So you need to install your custom font on your system first so it's appearing in that drop-down box. You can do that by double-clicking it, the FontBook.app opens and asks you whether you want to install the font.

6
  • 8
    I did but they are still not displaying? Commented Sep 24, 2015 at 7:14
  • Have you restarted Xcode after installing the font? Are you able to use it in other apps, e.g. TextEdit?
    – DarkDust
    Commented Sep 24, 2015 at 7:15
  • 1
    Check if you added them to the application bundle. They should be visible in the resources tab.
    – David
    Commented Sep 24, 2015 at 7:25
  • 3
    Solved it, had to add them to the supporting files folder in xcode. Commented Sep 24, 2015 at 7:34
  • @LordVermillion Can you tell me where are these 'supporting files folder' in xcode ? Commented Nov 1, 2019 at 9:07
7

I Installed the font in the system as per DarkDust solution and i am able to see the font in attributed type.

Then i changed the type to plain and i able to see the Custom font in the font types drop down.

2
  • Where everything else failed, THIS helped me. Commented Nov 10, 2020 at 8:51
  • Had to first uninstall the font in Font Book, re-install the font, relaunch XCode. Only THEN did IB finally show all my custom fonts in the Font/Family dropdown.
    – 100grams
    Commented Jun 14 at 9:42
7

In my case I just turn the text from plain to attributed then turn it back again to plain then it showed up., hope this help anyone.

2
  • This works every time.
    – edhnb
    Commented Oct 1, 2022 at 21:01
  • That worked. Seems like an Xcode bug. Commented Oct 8, 2022 at 1:10
5
+50

This was a huge headache for me but I simply fixed it by: I fixed the issue by restarting my Mac. Then restarting Xcode.

1
  • 1
    In a sense, this is the correct answer. Current Xcode "ALWAYS" needs a restart for this to work. The other answers - also very helpful - are "sometimes" also needed. Another complete shambles from Apple.
    – Fattie
    Commented Apr 19, 2020 at 14:59
5

I ran into the same issue and fixed with below steps

  1. Closed storyboard
  2. Cleared derived data
  3. Cleaned the project and open the story board

If this is not working then restart the Xcode.

Thanks

4

Had the same problem but this SO answer by user Saranjith solved it while the other solutions in this thread didn't: Xcode 8 custom font doesn't show up in interface builder

Basically in Font Book select "Computer Fonts" and then hit the + button and re add the Fonts.

This is happened to me after moving to Xcode 11 in Catalina from Xcode 10 in Mojave.

3

Well, silly mistake on my part, but I didn't realize my font was named something way different from the file name.

Double-clicking the actual font file opened it in the font book, and that showed the actual font name. It was in the dropdown all along.

2

I solved my problem when i used font name. Do not use file name. I was used like this [UIFont fontWithName:@"appFont" size:17] but it is wrong.

  1. Upload your font file to https://fontdrop.info/ and use the name
  2. My font file name is appFont.ttf but when i uploaded i saw Roboto Regular.
  3. [UIFont fontWithName:@"Roboto Regular" size:17]
2

Sometime I go to another file and come back, then my custom fonts are arrived. I think this is an issue of Xcode and will be solved in following version.

2
  • 16
    I honestly don't think this will be fixed in any version.
    – Jeroen
    Commented Apr 17, 2020 at 10:03
  • Even I am getting the same issue so many times. Sometimes It comes, sometimes not.
    – An Kit
    Commented Nov 28, 2020 at 3:14
2

Custom fonts show up at the very top!

I think maybe Apple changed it, but it seems that custom fonts show up at the very top of the list. No wonder I couldn't find them alphabetically :)

1
  • This! Obvious when you know it, saved the rest of my hair from being pulled out, thx
    – Mr_P
    Commented Jan 23 at 13:26
1

Restart the computer was the only way to restore custom fonts on Xcode 15.4.

1
  • I was have to roll back to Xcode 15.1 to be able to change label font.
    – Argus
    Commented Jul 4 at 10:32
0

If Xcode showed your custom font before but stopped to do it at some moment, try to readd font files to your project. It solved the problem for me. Other answers weren't helpful.

1
  • Heh... it helps me on Intel device, but on M1 I'm still not able to display custom fonts since Xcode 15.3.
    – Splash
    Commented May 23 at 8:37
0

For me it was case sensitive issue with the font file name. Not sure if it's always for this reason...

0

In my case my fonts were in woff2 formats. Although woff2 is supported in iOS, the fonts don't appear or get rendered in Storyboards.

0

What worked for me was to add a key named "Application fonts resource path" to the Info.plist file with an empty value.

Not the answer you're looking for? Browse other questions tagged or ask your own question.