Xcode custom font won't load numbers - iphone

I'm making an app which uses a custom font (Rockwell.ttf). I have done everything correctly and it works when I am using for UILabels (text only), however, when I try to use it with a UILabel that contains numbers, the font does not work with the numbers.
In finder when I open up the .ttf it shows the text as well as the numbers but as soon as I import it into Xcode, the numbers dissapear and I'm left only with the text! Please help.

try with some other .ttf fonts and check if they show the numbers. This way you can will be able to identify if the problem is with the .ttf font or with the iOS :)

Related

how to use corbel and calibri font in Xcode

i need to use corbel and caliber font in textview , textfield and label in my new application. I have searched for it in google but i did not got any solutions . Can any one please help me. Thanks in advance.
Follow these steps:
1) Add desired fonts to Xcode as resource.
2) Open info.plist file. Now create a key called UIAppFonts and make it an array. Add the filename of the font as a value.
<key>UIAppFonts</key>
<array>
<string>corbel.ttf</string>
</array>
3) Save info.plist FILE.
4) To use the font in your application add this line.
[UIFont fontWithName:#"corbel" size:32.0]
Courtesy :
Can I embed a custom font in an iPhone application?
CUSTOM FONTS IN IOS.
P.S. But to determine the exact name of font put temporary line of code as even small case sensitivity might cause a problem loading fonts.
NSLog(#"%#",[UIFont familyNames]);
This will print names of all the fonts on the device. Find the one that matches your font.Whatever the font name you get use it in the line in Step 4.
Courtesy: How do I include a font with my iPhone application?
You can add custom fonts to Xcode, I think this article can help you out doing so. I also found this video. As for the caliber and corbel files, a quick search in google will get what you want: corbel caliber tff.
Install same font in Mac OSX and try to find same font name in textedit application.
type exact spelling (with case sensitivity) in Xcode.
some time it happens font file name is different and we type it differently.
put the exect file name in plist file... but use the installed font name in application (Xcode.)

Add Custom Fonts In Xcode 4.1

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 :)
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.
The above advice did not work for me, so I wanted to share what did:
Opening the font in Finder gave a long name that did not work (TypeWrong Smudged - DGL), but when I looked for the same font in the Photoshop font list it showed the name as just TypeWrong, which did work. So if Finder shows a long name with spaces in it, you might want to try just using the first space-free chunk.
You have to check what is the font name it is at times different from font file name...
check this link

Font not appearing in UILabel

I have a UILabel that I've placed in IB. In the inspector I have changed the font to "Papyrus". When I launch the app in the simulator, the font is not Papyrus. How can I change the font?
You can add custom fonts but you need to add them into your .plist file under the key "Fonts provided by application" to a new row.
Fonts must be added to the Resources of the project and TTF and OpenType fonts are supported.
I believe this is only available in iOS 3.2 or later.
Thanks
Not all fonts listed in IB are available on the iPhone as standard. Papyrus is one of those not available on the iPhone.
More here:
http://ajnaware.wordpress.com/2008/10/24/list-of-fonts-available-on-the-iphone/
You can add custom fonts to the iPhone, but I'd think hard before doing that -- if you're putting a weird looking font onto normal UI items, ask yourself if it actually looks any good! I've seen some real eyesore apps where someone thought it would be cute to put some crime against typography on all the UI controls.

iOS custom font glyph spacing problem

I've added a custom TTF font to my iOS universal app (put .ttf file into resources, add the font file name to the info.plist as indicated on other threads here and the Apple dev forum).
I see the font applied to the UILabel's where I set it to, but there's a spacing problem: it appears as if there is a space character typed in between each glyph. When I install the same .ttf file on my mac and use it in an app like TextEdit, there is no such spacing issue.
Any ideas? Could this be a .ttf problem? What parameter would I adjust? Can anyone recommend a TTF editor for the mac?
Or is this a iOS TTF issue perhaps? I really hope I don't have to delve into CoreText and subclass UILabel in order to get this to work (but if I do, any code samples would be appreciated).
thanks for any help!
Looks like it was just a widely-spaced font.

iPhone SDK: Interface Builder label font, only shows when editing label

I have tried this on a few installations of the 3.1.3 SDK.
When I add a label to my view, I would like to change the font to something like Futura. I know how to change the font, but, for some reason, it does not show that it is changed. ONLY when I edit the label by double clicking, do I see my new font. And, this is the only time that I do get to see the new font, is when editing the label.
Why does this happen? How can I change the font of my labels, and have it show up? Why would I care to have the font changed when I edit the label?!
There are only a few system fonts installed on the iPhone. So when you try to use a non standard font, ala Future, it will not work, because that is no installed on the iPhone.