#include <fastgl/fastgl.h>
#include <fastgl/widgets.h>
extern "C" const unsigned int _12x24[];
unsigned char font08x16[4096];
static void routine(int fnt)
{
}
int main(int argc, char **argv)
{
fgl::FGApp myapp(3,argc,argv,0,fgl::APP_ALL);
fgl::FGWindow *root = fgl::FGApp::GetRootWindow();
FILE *fp = fopen("8x16.bin", "rb");
if (fp)
{
fread(font08x16, 4096, 1, fp);
fclose(fp);
}
int fnt1 = fgl::FGFontManager::register_font_fix(
(unsigned char*)_12x24,
12,
24,
256,
0,
"fixed-12x24");
int fnt2 = fgl::FGFontManager::register_font_fix(
font08x16,
8,
16,
256,
0,
"fix-08x16");
int fnt4 = fgl::FGFontManager::register_font_ttf("../ttf/helr____.ttf", 23);
root->set_font(fnt1);
root->printf(80, 50, "This is a new static linked font!");
root->set_font(fnt2);
root->printf(80, 80, "This is a new dynamic loaded font!");
root->SetInk(fgl::CYELLOW);
root->set_font(fgl::FONT0406);
root->printf(80, 130, "Font 0 - 01234 !@#$%qwertQWERTY }{");
root->set_font(fgl::FONT0808);
root->printf(80, 150, "Font 1 - 01234 !@#$%qwertQWERTY }{");
root->set_font(fgl::FONT0816);
root->printf(80, 180, "Font 2 - 01234 !@#$%qwertQWERTY }{");
root->set_font(3);
root->printf(80, 210, "Font 3 - 01234 !@#$%qwertQWERTY }{");
root->set_font(4);
root->printf(80, 240, "Font 4 - 01234 !@#$%qwertQWERTY }{");
root->set_font(5);
root->printf(80, 270, "Font 5 - 01234 !@#$%qwertQWERTY }{");
root->set_font(fgl::FONTSYS);
root->printf(80, 310, "Font 6 - 01234 !@#$%qwertQWERTY }{");
root->set_font(fgl::FONTSYSLIGHT);
root->printf(80, 330, "Font 7 - 01234 !@#$%qwertQWERTY }{");
root->set_font(fnt4);
root->printf(80, 360, "Font 8 - 01234 !@#$%qwertQWERTY }{");
root->set_font(fgl::FONT0808);
root->printf(280, 560, "press <ALT+X> to return");
fgl::FGFontDialog * cd = new fgl::FGFontDialog(routine);
myapp.Run();
return 0;
}