cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply Multiple BinaryFont ?

Wrend.1
Senior

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?

0 REPLIES 0