Browse Source

+ Fixed compiler errors

michael 22 years ago
parent
commit
1be7a98ba7
1 changed files with 4 additions and 8 deletions
  1. 4 8
      fcl/image/freetype.pp

+ 4 - 8
fcl/image/freetype.pp

@@ -180,7 +180,7 @@ begin
   raise FreeTypeException.CreateFmt (sErrFreeType, [Err,Event]);
   raise FreeTypeException.CreateFmt (sErrFreeType, [Err,Event]);
 end;
 end;
 
 
-Function CheckFT (Res: Integer; Msg:string) : Integer;
+Function FTCheck (Res: Integer; Msg:string) : Integer;
 
 
 begin
 begin
   Result:=Res;
   Result:=Res;
@@ -199,7 +199,7 @@ begin
   FSizes := TList.create;
   FSizes := TList.create;
   LastSize := nil;
   LastSize := nil;
   Try 
   Try 
-    CheckFt(FT_New_Face (aMgr.FTLib, pchar(afilename), anindex, font),format (sErrLoadFont,[anindex,afilename]));
+    FTCheck(FT_New_Face (aMgr.FTLib, pchar(afilename), anindex, font),format (sErrLoadFont,[anindex,afilename]));
   except
   except
     Font:=Nil;
     Font:=Nil;
     Raise;
     Raise;
@@ -651,12 +651,8 @@ begin
       pos.x := pos.x + kern.x;
       pos.x := pos.x + kern.x;
       end;
       end;
     // render the glyph
     // render the glyph
-    e := FT_Glyph_Copy (g^.glyph, gl);
-    if e <> 0 then
-      FTError (sErrMakingString, e);
-    e := FT_Glyph_To_Bitmap (gl, CurRenderMode, @pos, true);
-    if e <> 0 then
-      FTError (sErrMakingString, e);
+    FTCheck(FT_Glyph_Copy (g^.glyph, gl),sErrMakingString1);
+    FTCheck(FT_Glyph_To_Bitmap (gl, CurRenderMode, @pos, true),sErrMakingString2);
     // Copy what is needed to record
     // Copy what is needed to record
     bm := PFT_BitmapGlyph(gl);
     bm := PFT_BitmapGlyph(gl);
     with result.Bitmaps[r]^ do
     with result.Bitmaps[r]^ do