0

I'm having trouble adding a custom front on my IOS project on Xcode 9...

I tried everything proposed on this toppic: Xcode 9 custom fonts not working but nothing worked out.

On my project, I got my FugazOne-Regular.ttf file, his target membership is set to my app. My Info.plist has Front provided by application and Item 0 is set to FugazOne-Regular.ttf. FugazOne-Regular.ttf is also in Copy bundle resources, in Build phases.

If I try to print every font name with something like this:

for family in UIFont.familyNames.sorted() { let names = UIFont.fontNames(forFamilyName: family) print("Family: \(family) Font names: \(names)") }

I can see all the defaults fonts but no FugazOne-Regular or anything similar,

I tried deleting the font, cleaning the project but nothing changed...

(it is my first time posting here so tell me if I am doing anything wrong)

UPDATE: I thing this might be an Xcode bug, I'm using Xcode 9.4.1 but un macOS Mojave.

Nolan Mulder
  • 81
  • 1
  • 5

1 Answers1

0

Repeat the following steps:

  1. Import the font to the project by dragging it to Xcode and check Copy items if needed and your desired targets

Import to Xcode

  1. Add into your .plist file (careful with spelling)

enter image description here

  1. Drag the imported font from the project inside Xcode, NOT from Finder into Build Phases > Copy Bundle Resources

Copy Bundle Resources

aleixrr
  • 461
  • 4
  • 18