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