diff -Naur ft2demos-2.1.3/src~/ftcommon.i ft2demos-2.1.3/src/ftcommon.i --- ft2demos-2.1.3/src~/ftcommon.i 2002-09-19 14:23:36.000000000 +0800 +++ ft2demos-2.1.3/src/ftcommon.i 2003-02-13 02:35:47.000000000 +0800 @@ -181,7 +181,7 @@ int num_indices; /* number of glyphs or characters */ int ptsize; /* current point size */ - FT_Encoding encoding = ft_encoding_none; + FT_Encoding encoding = FT_ENCODING_NONE; int hinted = 1; /* is glyph hinting active? */ int antialias = 1; /* is anti-aliasing active? */ @@ -221,6 +221,7 @@ { ".ttf", ".ttc", + ".otf", ".pfa", ".pfb", 0 @@ -317,7 +318,7 @@ continue; } - if ( encoding != ft_encoding_none ) + if ( encoding != FT_ENCODING_NONE ) { error = FT_Select_Charmap( face, encoding ); if ( error ) @@ -330,7 +331,7 @@ font = (PFont)malloc( sizeof ( *font ) ); font->filepathname = (char*)malloc( strlen( filename ) + 1 ); font->face_index = i; - font->num_indices = encoding != ft_encoding_none ? 0x10000L + font->num_indices = encoding != FT_ENCODING_NONE ? 0x110000L : face->num_glyphs; strcpy( (char*)font->filepathname, filename ); @@ -378,7 +379,7 @@ font->filepathname, font->face_index, aface ); - if ( encoding == ft_encoding_none || error ) + if ( encoding == FT_ENCODING_NONE || error ) return error; return FT_Select_Charmap( *aface, encoding ); @@ -486,8 +487,8 @@ desc.face_id = current_font.font.face_id; desc.type = FTC_CMAP_BY_ENCODING; - desc.u.encoding = encoding != ft_encoding_none ? encoding - : ft_encoding_unicode; + desc.u.encoding = encoding != FT_ENCODING_NONE ? encoding + : FT_ENCODING_UNICODE; return FTC_CMapCache_Lookup( cmap_cache, &desc, charcode ); } @@ -504,7 +505,7 @@ { *aglyf = NULL; - if ( encoding != ft_encoding_none ) + if ( encoding != FT_ENCODING_NONE ) Index = get_glyph_index( Index ); /* use the SBits cache to store small glyph bitmaps; this is a lot */ diff -Naur ft2demos-2.1.3/src~/ftmulti.c ft2demos-2.1.3/src/ftmulti.c --- ft2demos-2.1.3/src~/ftmulti.c 2002-09-19 14:23:36.000000000 +0800 +++ ft2demos-2.1.3/src/ftmulti.c 2003-02-04 00:15:03.000000000 +0800 @@ -48,7 +48,7 @@ FT_Size size; /* the font size */ FT_GlyphSlot glyph; /* the glyph slot */ - FT_Encoding encoding = ft_encoding_none; + FT_Encoding encoding = FT_ENCODING_NONE; FT_Error error; /* error returned by FreeType? */ @@ -180,8 +180,8 @@ /* first, render the glyph image into a bitmap */ if (glyph->format != ft_glyph_format_bitmap) { - error = FT_Render_Glyph( glyph, antialias ? ft_render_mode_normal - : ft_render_mode_mono ); + error = FT_Render_Glyph( glyph, antialias ? FT_RENDER_MODE_NORMAL + : FT_RENDER_MODE_MONO ); if (error) return error; } @@ -676,7 +676,7 @@ if ( error ) goto Display_Font; - if ( encoding != ft_encoding_none ) + if ( encoding != FT_ENCODING_NONE ) { error = FT_Select_Charmap( face, encoding ); if ( error ) diff -Naur ft2demos-2.1.3/src~/ftstring.c ft2demos-2.1.3/src/ftstring.c --- ft2demos-2.1.3/src~/ftstring.c 2003-02-03 03:48:24.000000000 +0800 +++ ft2demos-2.1.3/src/ftstring.c 2003-02-04 00:17:10.000000000 +0800 @@ -306,7 +306,7 @@ FT_Get_Kerning( face, prev_index, glyph->glyph_index, - hinted ? ft_kerning_default : ft_kerning_unfitted, + hinted ? FT_KERNING_DEFAULT : FT_KERNING_UNFITTED, &kern ); origin_x += kern.x; @@ -405,8 +405,8 @@ { /* convert to a bitmap - destroy native image */ error = FT_Glyph_To_Bitmap( &image, - antialias ? ft_render_mode_normal - : ft_render_mode_mono, + antialias ? FT_RENDER_MODE_NORMAL + : FT_RENDER_MODE_MONO, 0, 1 ); if ( !error ) { diff -Naur ft2demos-2.1.3/src~/fttimer.c ft2demos-2.1.3/src/fttimer.c --- ft2demos-2.1.3/src~/fttimer.c 2002-02-14 15:16:29.000000000 +0800 +++ ft2demos-2.1.3/src/fttimer.c 2003-02-04 00:16:38.000000000 +0800 @@ -128,8 +128,8 @@ else { error = FT_Glyph_To_Bitmap( &bitmap, - antialias ? ft_render_mode_normal - : ft_render_mode_mono, + antialias ? FT_RENDER_MODE_NORMAL + : FT_RENDER_MODE_MONO, 0, 0 ); if ( !error ) diff -Naur ft2demos-2.1.3/src~/ftview.c ft2demos-2.1.3/src/ftview.c --- ft2demos-2.1.3/src~/ftview.c 2002-09-19 14:23:36.000000000 +0800 +++ ft2demos-2.1.3/src/ftview.c 2003-02-04 00:10:38.000000000 +0800 @@ -135,7 +135,7 @@ gindex = *(unsigned char*)p; - if ( encoding == ft_encoding_none ) + if ( encoding == FT_ENCODING_NONE ) gindex = get_glyph_index( gindex ); /* if a cmap is active, `get_glyph_bitmap' will convert the */ @@ -229,7 +229,7 @@ gindex = *(unsigned char*)p; - if ( encoding == ft_encoding_none ) + if ( encoding == FT_ENCODING_NONE ) gindex = get_glyph_index( gindex ); /* if a cmap is active, `get_glyph_bitmap' will convert the */ @@ -549,7 +549,7 @@ argc -= optind; argv += optind; - Header_format = encoding != ft_encoding_none + Header_format = encoding != FT_ENCODING_NONE ? "at %d points, first char code = 0x%x" : "at %d points, first glyph index = %d"; diff -Naur ft2demos-2.1.3/src~/testnames.c ft2demos-2.1.3/src/testnames.c --- ft2demos-2.1.3/src~/testnames.c 2002-03-30 21:17:06.000000000 +0800 +++ ft2demos-2.1.3/src/testnames.c 2003-02-04 00:15:59.000000000 +0800 @@ -38,7 +38,7 @@ exit( 1 ); cur_glyph = font_face->glyph; if ( cur_glyph->format != ft_glyph_format_bitmap ) - if ( FT_Render_Glyph( font_face->glyph, ft_render_mode_mono ) ) + if ( FT_Render_Glyph( font_face->glyph, FT_RENDER_MODE_MONO ) ) exit( 1 ); if ( FT_Get_Glyph_Name( font_face, glyph_ind, char_name, 16 ) ) exit( 1 );