Use older FreeType2 installed in the system
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The system FreeType2 of Mac OS X 10.3 is freetype-2.1.0 (2002-04). Some cpp macro constant defined by ftimage.h are slightly different from recent FreeType2. For example, FT_GLYPH_FORMAT_BITMAP was not defined at that time, and ft_glyph_format_bitmap was used. Such uncapitalized macros are defined in recent FreeType2 too, for backward compatibilities. Therefore, it is possible to support both of older & recent FreeType2 by using uncapitilized macros. Although it would not be realistic to use such old system (and old freetype2), I wish VTK maintainers can consider the patch like this:
Index: Rendering/vtkFreeTypeUtilities.cxx
RCS file: /cvsroot/VTK/VTK/Rendering/vtkFreeTypeUtilities.cxx,v retrieving revision 1.30 diff -u -r1.30 vtkFreeTypeUtilities.cxx --- Rendering/vtkFreeTypeUtilities.cxx 13 Nov 2008 23:34:29 -0000 1.30 +++ Rendering/vtkFreeTypeUtilities.cxx 2 Oct 2009 02:30:04 -0000 @@ -942,7 +942,7 @@ gindex, &glyph, vtkFreeTypeUtilities::GLYPH_REQUEST_BITMAP) ||
-
glyph->format != FT_GLYPH_FORMAT_BITMAP)
-
glyph->format != ft_glyph_format_bitmap) { continue; }
@@ -976,7 +976,7 @@ if (face_has_kerning && previous_gindex && gindex) { FT_Get_Kerning(
-
face, previous_gindex, gindex, FT_KERNING_DEFAULT, &kerning_delta);
-
face, previous_gindex, gindex, ft_kerning_default, &kerning_delta); pen_x += kerning_delta.x >> 6; pen_y += kerning_delta.y >> 6; }
@@ -1182,7 +1182,7 @@ gindex, &glyph, vtkFreeTypeUtilities::GLYPH_REQUEST_BITMAP) ||
-
glyph->format != FT_GLYPH_FORMAT_BITMAP)
-
glyph->format != ft_glyph_format_bitmap) { continue; }
@@ -1192,7 +1192,7 @@ bitmap_glyph = reinterpret_cast<FT_BitmapGlyph>(glyph); bitmap = &bitmap_glyph->bitmap;
- if (bitmap->pixel_mode != FT_PIXEL_MODE_GRAY)
- if (bitmap->pixel_mode != ft_pixel_mode_grays) { continue; } @@ -1225,7 +1225,7 @@ if (face_has_kerning && previous_gindex && gindex) { FT_Get_Kerning(
-
face, previous_gindex, gindex, FT_KERNING_DEFAULT, &kerning_delta);
-
face, previous_gindex, gindex, ft_kerning_default, &kerning_delta); pen_x += kerning_delta.x >> 6; pen_y += kerning_delta.y >> 6; }