3 Replies Latest reply: May 17, 2009 10:44 PM by RayNewbie
sneakyimp Level 1 Level 1 (0 points)
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
  • RayNewbie Level 5 Level 5 (6,810 points)
    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.
  • sneakyimp Level 1 Level 1 (0 points)
    A truly helpful post. Thanks! PS: Is Watsonville near Manhattan Beach? There was a 5.0 temblor there tonite.
  • RayNewbie Level 5 Level 5 (6,810 points)
    You're very welcome. No, we didn't feel that one. Watsonville is about 90 mi. south of San Fran. We're about 5 mi. inland from Monterey Bay.

    Wishing you every success with your app,