i want to use custom fonts in y application.
i have declared the "Fonts provided by the application" in the info.Plist file
and set the label.font to the font with name with / without the .TTF extension
draged the TTF file in to the project and copied the file to the project
created an outlet to the label but still, nothing works.
if someone knows what is going on over there i would like to get some help.
recently i have noticed the this problem are known @ the 4.1 (xcode version).
TNX :)
Add this by drag and drop to your files on the left side of the project. Add your CUSTOM fonts to the info. plist file. Make sure that you've linked all custom fonts you need: "Build Phases" -> "Copy Bundle Resources" -> "+" add your font.
You can download fonts from the App Store app , then use them in documents you create on iPhone. After you download an app containing fonts from the App Store, open the app to install the fonts. To manage installed fonts, go to Settings > General, then tap Fonts.
Add the font file to your Xcode project Select File menu > Add Files to "Your Project Name"... from the menu bar, select all the fonts you need to add, then click the Add button. Or drag the file from Finder and drop it into your Xcode project. Drag the font files from Finder and drop it into your Xcode project.
The font name isn't the name of the file. What you want to do is double click on the font in Finder.
This should open it in Font Book like this image
The font name you want is the one in the title which I've highlighted so attractively in red.
I just spent a big chunk of my day trying to figure my problem out... what I missed was, when I dragged the .ttf file into xcode, I did not select my app's name under "Add to target:" section.
Even though it seemed as if the file was in the correct directory and what not, it wasn't recognising it under the family names, using this code:
NSLog(@"FONT FAMILIES\n%@",[UIFont familyNames]);
So hopefully this can help someone if they're stuck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With