1. private with Alfont; 
  2.  
  3. private package Font_API.Alfont_Fonts is 
  4.  
  5.     -- Raises an exception on error. 
  6.     procedure Initialize; 
  7.  
  8.     procedure Finalize; 
  9.  
  10.     -- Returns null on error. 
  11.     function Load_Font( filename : String; size : Positive ) return Font_Type; 
  12.     pragma Precondition( filename'Length > 0 ); 
  13.  
  14. private 
  15.  
  16.     use Alfont; 
  17.  
  18.     type Alfont_Font is new Abstract_Font with 
  19.         record 
  20.             ptr : A_Alfont_Font := null; 
  21.         end record; 
  22.  
  23.     -- Raises an exception on error. 
  24.     procedure Construct( this     : access Alfont_Font; 
  25.                          filename : String; 
  26.                          size     : Positive ); 
  27.  
  28.     procedure Delete( this : in out Alfont_Font ); 
  29.  
  30.     function Text_Height( this : access Alfont_Font ) return Positive; 
  31.  
  32.     function Text_Length( this : access Alfont_Font; 
  33.                           str  : String ) return Natural; 
  34.  
  35.     procedure Textout( this   : access Alfont_Font; 
  36.                        bmp    : A_Bitmap; 
  37.                        str    : String; 
  38.                        x, y   : Integer; 
  39.                        color  : Color_Type; 
  40.                        smooth : Boolean ); 
  41.  
  42. end Font_API.Alfont_Fonts;