Hello,
Also, as Rudolph mentioned, the BT81x can use font .glyph flies directly from FLASH. But the .xfont file should be copied to RAM_G. This can either be stored on the MCU or can be stored on flash and then copied by your code to RAM_G.
void SAMAPP_ExtendedFormat_Font()
{
SAMAPP_API_Screen("Unicode Font");
#define UNICODE_HANDLE 30
Gpu_FontsExt_t font;
uint32_t fontAddr = RAM_G;
//Load glyph file into BT815's flash
//Load xfont file into graphics RAM
/* Switch Flash to FULL Mode */
Gpu_CoCmd_FlashHelper_SwitchFullMode(g_phost);
Gpu_Hal_LoadImageToMemory(g_phost, TEST_DIR "\\mssong_20.xfont", fontAddr, LOAD);
Gpu_Hal_WaitCmdfifo_empty(g_phost);
Gpu_CoCmd_Dlstart(g_phost);
App_WrCoCmd_Buffer(g_phost, CLEAR(1, 1, 1));
App_WrCoCmd_Buffer(g_phost, COLOR_RGB(255, 255, 255));
Gpu_CoCmd_SetFont2(g_phost, UNICODE_HANDLE, fontAddr, 0);
Gpu_CoCmd_Text(g_phost, 0, 0, UNICODE_HANDLE, 0, u8"BRT的EVE技术是一个革命性的概念,");
Gpu_CoCmd_Text(g_phost, 0, 30, UNICODE_HANDLE, 0, u8"利用面向对象的方法创建高质量的人机界面(HMI) 同时支持显示,");
Gpu_CoCmd_Text(g_phost, 0, 60, UNICODE_HANDLE, 0, u8"音频和触摸功能。");
App_WrCoCmd_Buffer(g_phost, DISPLAY());
Gpu_CoCmd_Swap(g_phost);
App_Flush_Co_Buffer(g_phost);
Gpu_Hal_WaitCmdfifo_empty(g_phost);
Gpu_Hal_Sleep(4000);
}
Best Regards,
BRT Community