Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Greencardman

macrumors 6502
Original poster
Apr 24, 2003
490
2
Madison, WI
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?
 

grimjim

macrumors member
May 24, 2003
75
0
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.
 

Greencardman

macrumors 6502
Original poster
Apr 24, 2003
490
2
Madison, WI
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?
 

Luke Redpath

macrumors 6502a
Nov 9, 2007
733
6
Colchester, UK
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?

Yes, and I'd recommend the latter.

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?

You can:

Code:
NSLog(@"%@", [UIFont familyNames]);

http://developer.apple.com/iphone/l...ference/UIFont_Class/Reference/Reference.html
 

Greencardman

macrumors 6502
Original poster
Apr 24, 2003
490
2
Madison, WI
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.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,560
6,059
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.
 

Greencardman

macrumors 6502
Original poster
Apr 24, 2003
490
2
Madison, WI
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.