ClanSoft logo
ClanSoft logo

    CL_Font_Description

Font provider interface.

Description

The font description class is used by the font class to load the font.

Currently ClanLib support two types of fonts:

The old method.

You may find some 256 color indexed fonts with some of ClanLib's example applications. They use the three last colors in the palette to seperate the letters, break the line, and to determine the size of the font. The method is deprecated.

The new method.

The font description class constructs the font letters from an image with alpha values. Each letter is seperated with transparent lines and the font description class uses this information to determine where it so seperate the letters.

CL_Font_Description allows you to adjust how much transparent a line must be before it consideres it as a letter seperator line. The trans_limit parameter handles this.

If your font is italic you can use the subtract_width parameter to move the printed letters "closer to each other". This is, with a fine word, called the kerning of the font.

Class members

std::vector<CL_SurfaceProvider*> letter_providers
int space_len
int subtract_width
std::string letters
CL_Font_Description(CL_InputSource *input)
CL_Font_Description( CL_SurfaceProvider *p, int x, int y, int *tcols, int num_tcols, int spacelen, int subtract_width, const char *letters)
CL_Font_Description( CL_SurfaceProvider *source, float trans_limit, int space_len, int subtract_width, const char *letters)

See Also

None


Back to index



This page was built using the Perceps documentation system.