1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Silly Question: can you use your own font in an app?

Discussion in 'iPhone/iPad Programming' started by Greencardman, Aug 20, 2008.

  1. macrumors 6502

    So I'm working on some of my ideas, and before I get into it to much, can you choose to use any font, font size or style for text inside a native iPhone app?
  2. macrumors member

    I would guess that you can't install arbitrary fonts onto the iPhone, but you should be able to use any of the fonts that are already installed. The class reference docs for UIFont give some useful ways of listing the available fonts and using them.
  3. macrumors 6502a

    You'll probably have to use an image if want to use your own typeface for UI elements.
  4. macrumors 6502

    So a trivia game where I wanted the question to appear in a certain font would have to use a default font or have a separate image for each question?

    I assume you can change the size of the default font, but are there different weights and styles (ie. bold, italics, etc.) Is there a list of the default fonts somewhere that I can look at?
  5. macrumors 6502a

    Yes, and I'd recommend the latter.

    You can:

    NSLog(@"%@", [UIFont familyNames]);
  6. macrumors G4

    Small White Car

  7. macrumors 6502

    Thanks guys, that works awesome. Having the default being Helvetica isn't actually that bad. Why would you recommend each question being an image? I'm thinking once I get to hundred of questions and answers, it might get out of hand that way.
  8. macrumors 603


    If I were trying to do something like have a custom font, I think I would just design each character that you'll need and then write the code to replace any text string with the appropriate images. It'd probably be a challenge if you're just starting (like me...) but I'm confident that it's possible without many lines of code at all.
  9. macrumors 6502

    I'm not the coder, I'm just doing the game design and background work. I'm not a big fan of the aqua blue and grey on the iPhone, so I was investigating ways to make the interface look better using some really great graphic design. I realized that if I didn't have a pick of good fonts, spending my time coming up with designs would be a waste of my time, time I could use working on other parts of the app.

    I actually like helvetica, so thats good. But like I said, there's likely to be lots of questions and answers, so having an image for each one would be time consuming, and would make updates time consuming as well. Having an image for each letter makes it more streamlined, but that increases the coding needed, like you said.

    Thanks for everyone's answers, you've been a big help.
  10. macrumors 6502a

    Sorry, I meant the former (It's Friday!). I wouldn't recommend it.
  11. Moderator


    Staff Member

    I wouldn't recommend using images at all. Just use one of the built in fonts.
  12. macrumors 6502

    Yeah, it is a Friday. Thanks for clarifying that. :)

Share This Page