2

I'm trying to use a custom font (Sassoon Infant) in Xcode. Despite looking at the numerous posts here on this issue, i haven't been able to resolve the problem.

These are the steps i have taken so far.

  1. Added font to resources
  2. Added font to Font Book
  3. Added SassoonInfantCom-Regular.ttf to Fonts Provided by Application
  4. Tried using fontWithName:@"Sassoon Infant Com", the name in Font Book
  5. Also tried just @"Sassoon"

The font name is not showing up in IB either under the dropdown font menu. The above seems to work for most people but i can't get it working. Anyone have any ideas?

enter image description here

4 Answers 4

2

Remove the extension .otf / .ttf from the file and the plist.

Sign up to request clarification or add additional context in comments.

Comments

1

Also make sure you are editing the correct plist file for the "Fonts provided by application property"! I spent two days trying everything to make some custom fonts work. Then I realised I was editing the APPTest-info.plist (which is in the resources folder of the Tests folder in XCODE) instead of editing the APP-info.plist file!

In my defence, both files are really close to each other in the files navigator in Xcode... ;-)

Comments

0

I just added it into the bundle and did this

myLabel.font = [UIFont fontWithName:@"MyCustomFont" size:19];

MyCustomFont being a .ttf file.

Hope this helps.

Comments

0
  1. Make sure that the font is added to your target. Select the font and check the target membership in the left Xcode sidebar.

  2. Make sure that you got the correct font name. Open the font in "Font Book" and see its name.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.