Hello,
I am trying to use custom fonts which I store in the flash.
I generated the fonts and the flash with the EVE-Asset-Builder v0.4.2 and selected an ASTC block footprints of 10x5.
After generating the font sizes 28-32 I create the flash which includes only the glyph files.
After that I use the addresses of the .map files and generate the fonts again to update the offsets in the xfont files.
The last thing I do is regenerating the flash with the new generated glyph files.
My program structure:
1. Transfering the generated .bin file to the flash including a CRC check
2. Switching flash to full speed mode
3. Transfering the .xfont data to GRAM
4. Set font and display the text
The problem:
As soon as I change the padding of the first line (from 0 to 50) the display begins to flicker and does not display the text line correctly.
The same happens if I display specific characters of the font.
For example:
If I show abcde the font is not displayed correctly. But if I show aaaaa or bbbbb or ccccc or ddddd or eeeee, everything seems to be fine.
Does the EVE-Asset-Builder v0.4.2 have known issues with fonts?
I tried roboto, arial and the mssong font which is included in the asset builder.
I also tried to change the ASTC block footprints (10x5, 4x4 and 8x8).
I would appreciate if you can support me with the problem.
Best Regards,
Nico
My code for displaying the text:
uint8_t font = 28;
const char *testText = "abcdefghijklmnopqrstuvwxyz0123456789";
Gpu_CoCmd_Dlstart(phost);
Gpu_Hal_WrCmd32(phost, CLEAR_COLOR_RGB(0, 0, 0));
Gpu_Hal_WrCmd32(phost, CLEAR(1, 1, 1));
for (uint8_t i = 0; i < 5; i++) { // display font 28-32
// i is the font id, fontMap is a map which includes the addresses of each xfont data in GRAM
uint32_t fontAddr = fontMap[font + i];
Gpu_CoCmd_SetFont2(phost, i, fontAddr, 0);
Gpu_CoCmd_Text(phost, 50, 10 + i * 80, i, 0, testText); // paint textline with padding left
Gpu_CoCmd_Text(phost, 0, 10 + i * 80 + 40, i, 0, testText);
}
Gpu_Hal_WrCmd32(phost, DISPLAY());
Gpu_Hal_DLSwap(phost, DLSWAP_FRAME);
Gpu_Hal_WaitCmdfifo_empty(phost);