BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: BT815: Problem with displaying custom fonts  (Read 11122 times)

nico

  • Newbie
  • *
  • Posts: 6
    • View Profile
BT815: Problem with displaying custom fonts
« on: February 05, 2019, 04:34:10 PM »

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:

Code: [Select]
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);

« Last Edit: February 06, 2019, 09:22:23 AM by nico »
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: BT815: Problem with displaying custom fonts
« Reply #1 on: February 06, 2019, 09:37:15 AM »

Hello,

Would it be possible for you to email in to our support address: support.emea@brtchip.com
Please include any applicable code and the converted font files from EAB.

Best Regards,
BRT Community
Logged