C Language Development Kit/Tools/Bmp2Font

From OptiWiki

Jump to: navigation, search

Contents

Description
File:Bmp2Font.png
 Convert a bitmaps to a font file with the requested font size.
Terminals
The terminals that support font files are the ones that support the setfont() function. The convert file has the extension FNT. If you look in the file it is really a normal header file, but for easy use it is called a FNT file.
Options
Description of the available options:
File Description
Open Open a bmp file you would like to convert to a fnt file format.
Save As Converts the loaded bmp file to the fnt file. The font name is the same name as the saved file.
Exit Quit the bmp2font application.

Options Description
Set FontSize Set the width and the height of a character in the font.
Conversion
The bitmap image before conversion.
 File:Batt0.bmp
 The font file after the bitmap batt0.bmp is converted.
// _batt0 is the font name that can be used in your application
// The font consists off 8 block(s), Wide 2 block(s), Heigh 4 block(s)
 
const char _batt0[] =
{
 0x08, 0x08,
 0x00, 0xD0, 0x28, 0x28, 0x44, 0x40, 0x4E, 0x46,
 0x46, 0x4E, 0x40, 0x44, 0x28, 0x28, 0xD0, 0x00,
 
 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
 
 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
 
 0x00, 0x3F, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3F, 0x00,
 
 };
Views
Personal tools