Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 20, 2008, 11:52 AM   #1
Greencardman
macrumors 6502
 
Join Date: Apr 2003
Location: Milwaukee, WI
 
Silly Question: can you use your own font in an app?

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?
Greencardman is offline   0 Reply With Quote
Old Aug 22, 2008, 04:29 AM   #2
grimjim
macrumors member
 
Join Date: May 2003
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.
grimjim is offline   0 Reply With Quote
Old Aug 22, 2008, 08:44 AM   #3
Luke Redpath
macrumors 6502a
 
Join Date: Nov 2007
You'll probably have to use an image if want to use your own typeface for UI elements.
Luke Redpath is offline   0 Reply With Quote
Old Aug 22, 2008, 08:55 AM   #4
Greencardman
Thread Starter
macrumors 6502
 
Join Date: Apr 2003
Location: Milwaukee, 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?
Greencardman is offline   0 Reply With Quote
Old Aug 22, 2008, 09:13 AM   #5
Luke Redpath
macrumors 6502a
 
Join Date: Nov 2007
Quote:
Originally Posted by Greencardman View Post
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.

Quote:
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/li...Reference.html
Luke Redpath is offline   0 Reply With Quote
Old Aug 22, 2008, 09:35 AM   #6
Small White Car
macrumors G4
 
Small White Car's Avatar
 
Join Date: Aug 2006
Location: Washington DC
Here are the fonts that are on the phone already:

http://daringfireball.net/2007/07/iphone_fonts

There's a link to a PDF chart in that article which may be helpful.
Small White Car is offline   0 Reply With Quote
Old Aug 22, 2008, 09:53 AM   #7
Greencardman
Thread Starter
macrumors 6502
 
Join Date: Apr 2003
Location: Milwaukee, 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.
Greencardman is offline   0 Reply With Quote
Old Aug 22, 2008, 09:59 AM   #8
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
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.
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Aug 22, 2008, 10:21 AM   #9
Greencardman
Thread Starter
macrumors 6502
 
Join Date: Apr 2003
Location: Milwaukee, 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.
Greencardman is offline   0 Reply With Quote
Old Aug 22, 2008, 12:36 PM   #10
Luke Redpath
macrumors 6502a
 
Join Date: Nov 2007
Quote:
Originally Posted by Greencardman View Post
Why would you recommend each question being an image?.
Sorry, I meant the former (It's Friday!). I wouldn't recommend it.

Last edited by Luke Redpath; Aug 22, 2008 at 12:45 PM.
Luke Redpath is offline   0 Reply With Quote
Old Aug 22, 2008, 12:41 PM   #11
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
I wouldn't recommend using images at all. Just use one of the built in fonts.
robbieduncan is offline   0 Reply With Quote
Old Aug 22, 2008, 01:01 PM   #12
Greencardman
Thread Starter
macrumors 6502
 
Join Date: Apr 2003
Location: Milwaukee, WI
 
Yeah, it is a Friday. Thanks for clarifying that.
Greencardman is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Silly question.... JohnGreenberg Mac mini 3 Jan 21, 2014 12:43 AM
Silly Question... 4G vs LTE nidserz iPhone 9 Nov 4, 2013 12:00 AM
REALLY silly question imac wannabe Digital Photography 5 Apr 14, 2013 11:12 AM
iPhone: silly question but, can you sync while being jb, dannyhex Jailbreaks and iOS Hacks 5 Mar 14, 2013 01:43 AM
Freeware Font App or Help with editing font characters? nobodyhome Mac Applications and Mac App Store 0 Aug 23, 2012 02:43 AM

Forum Jump

All times are GMT -5. The time now is 01:37 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC