- int error;
- FT_Library library;
- FT_Face ft_face;
- FT_Bool use_kerning;
- FT_UInt left_index, right_index;
- FT_Vector kerning;
-
- error = FT_Init_FreeType( &library );
- if ( error ) {
- fprintf (stderr, "Fatal error initializing freetype.\n");
- exit (1);
- }
-
- error = FT_New_Face( library, font_filename,
- 0,
- &ft_face );
- if ( error == FT_Err_Unknown_File_Format ) {
- fprintf (stderr, "Unsupported font format: %s\n", font_filename);
- exit (1);
- } else if ( error ) {
- fprintf (stderr, "Failed to open file: %s\n", font_filename);
- exit (1);
- }