Font Related Functions

set_font_addr( unsigned int vram );

Set the font address in video memory. Use this function to change the current font; to use several font on the same screen, or when you load yourself a font and need to tell the library where it is.


set_font_pal( unsigned char palette );

Set the font palette index (0-15) to use.


load_font( char __far *font, unsigned char count );
load_font( char __far *font, unsigned char count, unsigned int vram );

Load a custom font in video memory.

Used together with the #incchr directive it will allow you to load a font from a PCX file.

Note: Custom fonts are "colored" fonts, so they won't be affected by any previous call to set_font_color(). The number of characters to load ranges from 0 to 224, ASCII characters 0 to 31 are never used, and can't be defined so you must start your font at the space character which is ASCII code 32.


set_font_color( unsigned char foreground, unsigned char background );

Set the default font foreground and background colors (colors range from 0 to 15).


load_default_font( void ); char num, int vaddr)

Loads a default font in video memory. Without parameters the first default font is loaded just above the BAT in video memory; usualy it's address 0x800. Otherwise you can select the font number, and eventualy the address in video memory.

In its current implementation the library supports only one default font, but in the future more fonts could be made available.

Last updated