Custom Xcode Fonts Not Displayed in Storyboard

I added two of my fonts to the project folder:

enter image description here

I added them to info.plist:

enter image description here

I do not see them in my list of custom fonts in the storyboard:

enter image description here

What have I done wrong?

+22
ios fonts xcode
source share
6 answers

I know this is a pretty old question, but I ran into the same problem. And these tips did not help me. Besides the standard checks (present in the kit, restarting Xcode, what fixed my problem was that my label text type was marked โ€œNormalโ€ and therefore some fonts did not appear in the storyboard drop-down list. As soon as I changed in the text type "Attributed", all fonts appeared in the drop-down list.

Hope this helps someone stuck with the same issue.

+45
source share

The drop-down list displays system-wide installed fonts. Therefore, you must first install your own font in your system so that it appears in this drop-down list. You can do this by double-clicking on it, FontBook.app will open and ask you if you want to install the font.

+11
source share

If Xcode previously showed your own font, but at some point stopped doing it, try adding font files to your project. This solved the problem for me. Other answers did not help.

+1
source share

I installed the font on the system according to the DarkDust solution, and I can see the font in the attribute type.

Then I changed the type to normal and could see the Custom font in the drop-down list of font types.

0
source share

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

  1. Download the font file at https://fontdrop.info/ and use the name
  2. My font file name is appFont.ttf, but when I downloaded, I saw Roboto Regular.
  3. [UIFont fontWithName: @ "Roboto Regular" size: 17]
0
source share

There was the same problem, but this SO-answer from Saranjith user solved it, while there were no other solutions in this thread: Custom Xcode 8 font does not appear in the interface designer

Basically in the Font Book, select โ€œComputer Fonts,โ€ then click the โ€œ+โ€ button and add the fonts again.

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

0
source share

All Articles