Skip to main content
Wrend.1
Associate III
November 27, 2020
Question

How to apply Multiple BinaryFont ?

  • November 27, 2020
  • 0 replies
  • 529 views

I see the office usage as follows

//read the binary font from a file
FILE* font = fopen("generated/fonts/bin/Font_verdana_20_4bpp.bin", "rb");
if (font)
{
 //read data from the file
 fread(fontdata, 1, 10000, font);
 fclose(font);
 //initialize BinaryFont object in bf using placement new
 new (&bf) BinaryFont((const struct touchgfx::BinaryFontData*)fontdata);
 //replace application font 'DEFAULT' with the binary font
 TypedTextDatabase::setFont(DEFAULT, &bf); //verdana_20_4bpp
}

What is the DEFAULT mean?

I have multiple BinaryFont, so how add multiple bin file to project?

This topic has been closed for replies.