From f3f4bbc7217c94f80c176ebcdcbe4e3e321faf2d Mon Sep 17 00:00:00 2001 From: cyreve Date: Sun, 21 May 2006 20:32:44 +0000 Subject: [PATCH] remove unnecessary casts which didn't compile on old versions of FreeType --- src/libnrtype/FontInstance.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp index 504cab76a..8a0c9cb49 100644 --- a/src/libnrtype/FontInstance.cpp +++ b/src/libnrtype/FontInstance.cpp @@ -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)); -- 2.30.2