Hi,
Here is a small example where we copy two fonts to RAM_G and then display them.
The pointer to the graphic data will have been set in the xfont block when you convert the font or when creating the bin for the flash but you can overwrite this after copying the xfont to RAM_G as shown below.
Hope it helps, BRT Community
void eve_display(void)
{
Flash_Full_Speed();
//unified.blob : 0 : 4096
//EDF Block : 4096 : 128
//HPSimplified_Rg_14_ASTC.xfont : 4224 : 192
//HPSimplified_Rg_14_ASTC.glyph : 4416 : 8192
//HPSimplified_Rg_20_ASTC.xfont : 12608 : 192
//HPSimplified_Rg_20_ASTC.glyph : 12800 : 24576
// define where we will put in RAM_G
#define Font1_xfont 0
#define Font1_glyph 0+192
#define Font2_xfont 0+192+8192
#define Font2_glyph 0+192+8192+192
// ---------------------------------------------------------------------------
// copy xfont to RAM_G (font 1 is size 14)
EVE_LIB_BeginCoProList();
EVE_CMD_FLASHREAD(Font1_xfont, 4224, 192);
EVE_LIB_EndCoProList();
EVE_LIB_AwaitCoProEmpty();
// copy glyph to RAM_G
EVE_LIB_BeginCoProList();
EVE_CMD_FLASHREAD(Font1_glyph, 4416, 8192);
EVE_LIB_EndCoProList();
EVE_LIB_AwaitCoProEmpty();
// copy xfont to RAM_G (font 2 is size 20)
EVE_LIB_BeginCoProList();
EVE_CMD_FLASHREAD(Font2_xfont, 12608, 192);
EVE_LIB_EndCoProList();
EVE_LIB_AwaitCoProEmpty();
// copy glyph to RAM_G
EVE_LIB_BeginCoProList();
EVE_CMD_FLASHREAD(Font2_glyph, 12800, 24576);
EVE_LIB_EndCoProList();
EVE_LIB_AwaitCoProEmpty();
// ---------------------------------------------------------------------------
// Update the RAM_G location holding start of graphic data which is 8th 32-bit value in the xfont block
// See BT81x programmers guide 5.4.3
HAL_MemWrite32((Font1_xfont+32), Font1_glyph); // update address xfont + (4*8 bytes)
HAL_MemWrite32((Font2_xfont+32), Font2_glyph); // update address xfont + (4*8 bytes)
// ---------------------------------------------------------------------------
EVE_LIB_BeginCoProList();
EVE_CMD_DLSTART();
EVE_CLEAR_COLOR_RGB(0, 0, 0);
EVE_CLEAR(1,1,1);
EVE_COLOR_RGB(255,255,255);
EVE_CMD_SETFONT2(2, Font1_xfont, 0);
EVE_CMD_SETFONT2(3, Font2_xfont, 0);
EVE_CMD_TEXT(100, 50, 2, 0, "Custom Font 14");
EVE_CMD_TEXT(100, 100, 3, 0, "Custom Font 20");
EVE_DISPLAY();
EVE_CMD_SWAP();
EVE_LIB_EndCoProList();
EVE_LIB_AwaitCoProEmpty();
// ---------------------------------------------------------------------------
while(1)
{
}
}