Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to set font, font size in iPhone app using Interface Builder

I'm learning how to code for iPhone. I've added a Label to my iPhone Window object and I'm trying to set the font size and face. I've tried everything on the font menu (bigger, smaller) and this seems to do nothing. I've tried cmd-T which shows the fonts window but selecting a font there does not always change my font. Selecting a font in the fonts window seems to work for some fonts but not others and I can see no rhyme or reason to which fonts work and which do not. Courier and Courier new seem to work as does Georgia, Zapfino, and some other totally random ones.

***?

Do I need to add the fonts to my project? Are some fonts simply not going to work? Are certain fonts available on the iPod and others not?

iMac, Mac OS X (10.5.6), iPhone 2.0

Posted on May 15, 2009 4:43 PM

Reply
Question marked as Best reply

Posted on May 15, 2009 5:20 PM

Are certain fonts available on the iPod and others not?


Yes. The font selection shown in IB includes all of the fonts installed on the Mac host. Only a subset of these is available on the iPhone. When you select an unavailable font for an iPhone project, IB will just give you the default or the available font that was last selected.

Btw, there are at least two free iPhone apps that will display the available fonts. I have FontViewer.

Font selection in IB can be a little tricky. For example, you might select a UILabel instance, then select a different size or style in the Font window and find the selection doesn't affect the label. You need to "sync" the editor window with the Font window. I've found the best way is to tab through the controls while the Font window is open. At some point you'll see it "catch" and the selections in the window will start to track the selected controls. When that happens, you should be able to tab to the label and make the change you want.
3 replies
Question marked as Best reply

May 15, 2009 5:20 PM in response to sneakyimp

Are certain fonts available on the iPod and others not?


Yes. The font selection shown in IB includes all of the fonts installed on the Mac host. Only a subset of these is available on the iPhone. When you select an unavailable font for an iPhone project, IB will just give you the default or the available font that was last selected.

Btw, there are at least two free iPhone apps that will display the available fonts. I have FontViewer.

Font selection in IB can be a little tricky. For example, you might select a UILabel instance, then select a different size or style in the Font window and find the selection doesn't affect the label. You need to "sync" the editor window with the Font window. I've found the best way is to tab through the controls while the Font window is open. At some point you'll see it "catch" and the selections in the window will start to track the selected controls. When that happens, you should be able to tab to the label and make the change you want.

How to set font, font size in iPhone app using Interface Builder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.