Code

remove unnecessary casts which didn't compile on old versions of FreeType
authorcyreve <cyreve@users.sourceforge.net>
Sun, 21 May 2006 20:32:44 +0000 (20:32 +0000)
committercyreve <cyreve@users.sourceforge.net>
Sun, 21 May 2006 20:32:44 +0000 (20:32 +0000)
src/libnrtype/FontInstance.cpp

index 504cab76aa1a08c4c26137e6f53a091f6739b8e2..8a0c9cb49048d03cb0921d55c3b06b9ae7788be3 100644 (file)
@@ -516,10 +516,10 @@ void font_instance::LoadGlyph(int glyph_id)
                        }
                        if ( theFace->glyph->format == ft_glyph_format_outline ) {
                                FT_Outline_Funcs ft2_outline_funcs = {
-                                       (FT_Outline_MoveToFunc)  ft2_move_to,
-                                       (FT_Outline_LineToFunc)  ft2_line_to,
-                                       (FT_Outline_ConicToFunc) ft2_conic_to,
-                                       (FT_Outline_CubicToFunc) ft2_cubic_to,
+                                       ft2_move_to,
+                                       ft2_line_to,
+                                       ft2_conic_to,
+                                       ft2_cubic_to,
                                        0, 0
                                };
                                n_g.outline=new Path;
@@ -559,7 +559,7 @@ bool font_instance::FontMetrics(double &ascent,double &descent,double &leading)
     descent=fabs(otm.otmDescent*scale);
     leading=fabs(otm.otmLineGap*scale);
 #else
-       if ( !FT_IS_SCALABLE(theFace) ) return false; // bitmap font
+       if ( theFace->units_per_EM == 0 ) return false; // bitmap font
        ascent=fabs(((double)theFace->ascender)/((double)theFace->units_per_EM));
        descent=fabs(((double)theFace->descender)/((double)theFace->units_per_EM));
        leading=fabs(((double)theFace->height)/((double)theFace->units_per_EM));