Index

Package: Fonts

Description

package Allegro.Fonts is
Allegro 5.0.9 - Fonts addon

Types

Allegro_Font

type Allegro_Font is limited private;

A_Allegro_Font

type A_Allegro_Font is access all Allegro_Font;

Font_Loading_Flags

subtype Font_Loading_Flags is Unsigned_32;

A_Loader_Proc

type A_Loader_Proc is access
        function( filename : C.char_array;
                  size     : Integer;
                  flags    : Font_Loading_Flags ) return A_Allegro_Font;

Font_Draw_Flags

subtype Font_Draw_Flags is Unsigned_32;

Unicode_Range

type Unicode_Range is
        record
            first : Integer;
            last  : Integer;
        end record;

Unicode_Range_Array

type Unicode_Range_Array is array (Integer range <>) of Unicode_Range;

Constants & Global variables

ALLEGRO_ALIGN_LEFT (Font_Draw_Flags)

ALLEGRO_ALIGN_LEFT    : constant Font_Draw_Flags := 0;

ALLEGRO_ALIGN_CENTRE (Font_Draw_Flags)

ALLEGRO_ALIGN_CENTRE  : constant Font_Draw_Flags := 1;

ALLEGRO_ALIGN_CENTER (Font_Draw_Flags)

ALLEGRO_ALIGN_CENTER  : constant Font_Draw_Flags := 1;

ALLEGRO_ALIGN_RIGHT (Font_Draw_Flags)

ALLEGRO_ALIGN_RIGHT   : constant Font_Draw_Flags := 2;

ALLEGRO_ALIGN_INTEGER (Font_Draw_Flags)

ALLEGRO_ALIGN_INTEGER : constant Font_Draw_Flags := 4;

Subprograms & Entries

Al_Init_Font_Addon

procedure Al_Init_Font_Addon;

Al_Shutdown_Font_Addon

procedure Al_Shutdown_Font_Addon;

Al_Get_Allegro_Font_Version

function Al_Get_Allegro_Font_Version return Unsigned_32;

Al_Load_Font

function Al_Load_Font
( filename: String;
size: Integer;
flags: Font_Loading_Flags ) return A_Allegro_Font;

Al_Destroy_Font

procedure Al_Destroy_Font
( f: in out A_Allegro_Font );

Al_Register_Font_Loader

function Al_Register_Font_Loader
( ext: String;
load: A_Loader_Proc ) return Boolean;

Al_Get_Font_Line_Height

function Al_Get_Font_Line_Height
( f: A_Allegro_Font ) return Integer;

Al_Get_Font_Ascent

function Al_Get_Font_Ascent
( f: A_Allegro_Font ) return Integer;

Al_Get_Font_Descent

function Al_Get_Font_Descent
( f: A_Allegro_Font ) return Integer;

Al_Get_Text_Width

function Al_Get_Text_Width
( f: A_Allegro_Font;
str: String ) return Integer;

Al_Get_Ustr_Width

function Al_Get_Ustr_Width
( f: A_Allegro_Font;
ustr: A_Allegro_Ustr ) return Integer;

Al_Draw_Text

procedure Al_Draw_Text
( font: A_Allegro_Font;
color: Allegro_Color;
x, y: Float;
flags: Font_Draw_Flags;
text: String );

Al_Draw_Ustr

procedure Al_Draw_Ustr
( font: A_Allegro_Font;
color: Allegro_Color;
x, y: Float;
flags: Font_Draw_Flags;
ustr: A_Allegro_Ustr );

Al_Draw_Justified_Text

procedure Al_Draw_Justified_Text
( font: A_Allegro_Font;
color: Allegro_Color;
x1, x2: Float;
y: Float;
diff: Float;
flags: Font_Draw_Flags;
text: String );

Al_Draw_Justified_Ustr

procedure Al_Draw_Justified_Ustr
( font: A_Allegro_Font;
color: Allegro_Color;
x1, x2: Float;
y: Float;
diff: Float;
flags: Font_Draw_Flags;
text: A_Allegro_Ustr );

Al_Get_Text_Dimensions

procedure Al_Get_Text_Dimensions
( f: A_Allegro_Font;
text: String;
bbx: out Integer;
bby: out Integer;
bbw: out Integer;
bbh: out Integer );

Al_Get_Ustr_Dimensions

procedure Al_Get_Ustr_Dimensions
( f: A_Allegro_Font;
text: A_Allegro_Ustr;
bbx: out Integer;
bby: out Integer;
bbw: out Integer;
bbh: out Integer );

Al_Grab_Font_From_Bitmap

function Al_Grab_Font_From_Bitmap
( bmp: A_Allegro_Bitmap;
ranges: Unicode_Range_Array ) return A_Allegro_Font;

Al_Create_Builtin_Font

function Al_Create_Builtin_Font return A_Allegro_Font;

Al_Load_Bitmap_Font

function Al_Load_Bitmap_Font
( filename: String ) return A_Allegro_Font;