$NetBSD: patch-ab,v 1.3 2006/05/31 18:01:49 drochner Exp $

--- src/libnrtype/FontInstance.cpp.orig	2005-09-26 07:22:49.000000000 +0200
+++ src/libnrtype/FontInstance.cpp
@@ -24,11 +24,11 @@
 #include "RasterFont.h"
 
 /* Freetype 2 */
-# include <freetype/ftoutln.h>
-# include <freetype/ftbbox.h>
-# include <freetype/internal/tttypes.h>
-# include <freetype/internal/ftstream.h>
-# include <freetype/tttags.h>
+# include <ft2build.h>
+# include FT_OUTLINE_H
+# include FT_BBOX_H
+# include FT_TRUETYPE_TAGS_H
+# include FT_TRUETYPE_TABLES_H
 # include <pango/pangoft2.h>
 
 
@@ -423,10 +423,10 @@ void font_instance::LoadGlyph(int glyph_
 			}
 			if ( theFace->glyph->format == ft_glyph_format_outline ) {
 				FT_Outline_Funcs ft2_outline_funcs = {
-					ft2_move_to,
-					ft2_line_to,
-					ft2_conic_to,
-					ft2_cubic_to,
+					(FT_Outline_MoveToFunc)  ft2_move_to,
+					(FT_Outline_LineToFunc)  ft2_line_to,
+					(FT_Outline_ConicToFunc) ft2_conic_to,
+					(FT_Outline_CubicToFunc) ft2_cubic_to,
 					0, 0
 				};
 				n_g.outline=new Path;
@@ -474,12 +474,12 @@ bool font_instance::FontSlope(double &ru
 
     theFace=pango_ft2_font_get_face(pFont);
 
-	if ( theFace->units_per_EM == 0 ) return false; // bitmap font
-	
 	if ( pFont == NULL ) return false;
 	
 	if ( theFace == NULL ) return false;
 
+    if ( !FT_IS_SCALABLE(theFace) ) return false;  // bitmap font
+
     TT_HoriHeader *hhea = (TT_HoriHeader*)FT_Get_Sfnt_Table(theFace, ft_sfnt_hhea);
     if (hhea == NULL) return false;
     run = hhea->caret_Slope_Run;
