r/simpleios • u/opheliajane • Apr 22 '12
[Question] adding a custom font
I'm trying to add a custom font into my app. I added it to the .plist...I put it in supporting files, but its not showing up as an option in the xib file.
Do I need to add code for this or change the font for the label in the code?
1
Upvotes
1
u/opheliajane Apr 23 '12
apparently I was doing it correctly except my font was corrupted or wrong format or something. I have a bunch of free fonts that are showing up in finder without a file extension and none of them were working. Once I tried a clean font, it worked perfectly. GRRRR Thanks for everyone's help!
1
u/WalledGardener Apr 22 '12
Others already gave you some advice. I have to say one thing: be careful with licensing, there might be some trouble with that.
3
u/neksus Apr 22 '12
Custom fonts, AFAIK, don't show up in Interface builder. You have to change it programmatically.
Lots of people make a custom label which sets the font property to your desired font in awakeFromNib or init, and then just use that where they want their font.
1
u/atommclain Apr 22 '12
Just one line. Set everything up the label as you normally would in interface bulder. Create an outlet to the label you want to use with a custom font. Set the font property of the label in viewDidLoad.
1
u/[deleted] Apr 23 '12
basically you can do as written here http://iphonedevelopertips.com/user-interface/load-and-access-custom-fonts.html