Location of the fonts on the iPhone?

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2010-03-31T22:18:52Z Indexed on 2010/03/31 22:23 UTC
Read the original article Hit count: 345

Filed under:
|
|
|

I'm using the FreeType2 library in an iPhone project, and I'm trying to simply load a TTF file from the system, if possible.

FT_Library  library;
FT_Face face;
int error;


error = FT_Init_FreeType( &library );

if ( error == 0 )
     printf("Initialized FreeType2\r\n");   /* Prints */

error = FT_New_Face(library, "/System/Library/Fonts/Helvetica.ttf", 0, &face);

if ( error ==  FT_Err_Cannot_Open_Resource )
    printf("Font not found\r\n");         /* Prints */

That error seems to be for file not found. Is /System/Library/Fonts not the location of the fonts? Or, do iPhone apps simply not have any read access at all to that directory.

Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about fonts