Using non-standard fonts

Discussion in 'iOS Programming' started by RossOliver, Aug 16, 2008.

  1. RossOliver macrumors regular

    Joined:
    Nov 6, 2006
    #1
    Hey,

    Is it possible to use a non-standard OS X font with UIFont? I downloaded a font called 'crystal' which gives nice digital numbers and now I am trying to set the font of my label to use it:

    Code:
    UIFont *font - [UIFont fontWithName:@"Crystal" size:12.0];
    [myLabel setFont:font];
    
    This doesn't appear to work though. It may well be that I'm not referencing it by its full name - can I find that out somehow?

    Cheers,

    -Ross
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    You would need to install the font with you application. I've not seen any reference to this being possible, but it might be possible if you include it in your resources.

    But you would not legally be allowed to do this unless you have redistribution rights to the font...
     
  3. RossOliver thread starter macrumors regular

    Joined:
    Nov 6, 2006
    #3
    Ah, well I'm sure I could find a similar font with a suitable license... but like you say, I haven't seen any documentation as to how to include fonts like this...

    -Ross

    Just came across this: http://discussions.apple.com/message.jspa?messageID=7249805

    It would appear to be more trouble than it's worth...
     

Share This Page