MantisBT - VTK
View Issue Details
0009637VTK(No Category)public2009-10-01 23:142012-01-02 05:57
suzuki toshiya 
Sean McBride 
normalminorhave not tried
closedfixed 
 
 
0009637: Use older FreeType2 installed in the system
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;
         }
No tags attached.
diff VTK-CVS_MacOSX3-freetype.diff (1,955) 2009-10-01 23:14
https://www.vtk.org/Bug/file/7507/VTK-CVS_MacOSX3-freetype.diff
Issue History
2009-10-01 23:14suzuki toshiyaNew Issue
2009-10-01 23:14suzuki toshiyaFile Added: VTK-CVS_MacOSX3-freetype.diff
2009-10-18 22:11Sean McBrideStatusbacklog => tabled
2009-10-18 22:11Sean McBrideAssigned To => Sean McBride
2009-10-29 16:37Sean McBrideNote Added: 0018288
2009-10-29 16:37Sean McBrideStatustabled => @80@
2009-10-29 16:37Sean McBrideResolutionopen => fixed
2011-01-13 17:00Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2012-01-02 05:57guestStatuscustomer review => closed

Notes
(0018288)
Sean McBride   
2009-10-29 16:37   
/cvsroot/VTK/VTK/Rendering/vtkFreeTypeUtilities.cxx,v <-- vtkFreeTypeUtilities.cxx
new revision: 1.31; previous revision: 1.30