Question

I know this question has been asked before, but so far have not found an answer to my problem. I am trying to use a custom font (Rockwell) in my app, but can't get it to load in.

I have used the correct name from Font Book, which is just "Rockwell". I've added the file to the project, and its target is the project. I've added the file to the plist, and also to the bundle resources.

I'm using the following code to set the font of a label, with no luck.

UIFont *customFont = [UIFont fontWithName:@"Rockwell" size:18.0];
[self._textView setFont:customFont];

It also doesn't appear when I run something like:

NSLog(@"Available fonts: %@", [UIFont familyNames]);

What am I missing?

Was it helpful?

Solution

Downloaded .ttf file from a different source, and now it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top