FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: FT813 - Fonts bigger than 39 not working  (Read 11757 times)

toty04

  • Newbie
  • *
  • Posts: 4
    • View Profile
FT813 - Fonts bigger than 39 not working
« on: March 07, 2020, 05:56:14 PM »

Hi all,

I'm having a problem when trying to draw big fonts on a 5" display.
The display is Riverdi: RVT50UQFNWC01, which uses the FT813 chip as controller.
I have tried to create my own fonts and it works fine with sizes smaller than 39 (depending on the font type, it might be more or less than 39).
For the font conversion I've been using the Font_Converter_Tool_V0.4 with the following commands:
  • fnt_cvt.exe -i tt0010m_.ttf -s 40 -u myletters.txt -d 1000 -c setfont2
    fnt_cvt.exe -i tt0010m_.ttf -s 39 -u myletters.txt -d 1000 -c setfont2
From the generated files I pick up the ".rawh" file (L2 format) and convert it to a C header file.
After that I run the following code:
// Write Font to RAM
   Gpu_Hal_WrMem(phost, 1000, font_test, sizeof(font_test));

   // Init display buffer
   Gpu_CoCmd_Dlstart(phost);
   App_WrCoCmd_Buffer(phost, CLEAR_COLOR_RGB(0,0,0));
   App_WrCoCmd_Buffer(phost, CLEAR(1,1,1));
   App_WrCoCmd_Buffer(phost, COLOR_RGB(255,255,255));

   // Set Font
   Gpu_CoCmd_SetFont2(phost, 1, 1000, 1);

   // Write
   Gpu_CoCmd_Text(phost, 230, DispHeight/2, 1, OPT_CENTERX|OPT_CENTERY,
               (const char8_t*)"Bienvenido!");

   // Show buffer
   App_WrCoCmd_Buffer(phost, DISPLAY());
   Gpu_CoCmd_Swap(phost);
   App_Flush_Co_Buffer(phost);
   Gpu_Hal_WaitCmdfifo_empty(phost);


With the size 39 font, the letters are displayed perfectly, but with the size 40 it simply appears a white block, where the text should be.
Am I missing some commands? Is there any specific sequence I need to follow for bigger font size?
Any help would be useful.

Thanks in advance
Santiago
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: FT813 - Fonts bigger than 39 not working
« Reply #1 on: March 09, 2020, 11:50:34 AM »

Hello,

Section 6 of the following has an example of using customer fonts:
FT81X Simple PIC Library Examples

Can you show me the section of code where you assign the bitmap properties to your custom font?

Best Regards,
FTDI Community
« Last Edit: March 09, 2020, 11:52:17 AM by FTDI Community »
Logged

toty04

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: FT813 - Fonts bigger than 39 not working
« Reply #2 on: March 10, 2020, 09:14:38 PM »

Hi,
thanks for the answer. I've realized I was missing some code lines (although I've been doing this for both size and for the small one works fine). Now I've added the code to assign the bitmap properties to my custom font, but still not working.

Complete code:

   // Write Font to RAM
   Gpu_Hal_WrMem(phost, 1000, font_test, sizeof(font_test));

   // Init display buffer
   Gpu_CoCmd_Dlstart(phost);
   App_WrCoCmd_Buffer(phost, CLEAR_COLOR_RGB(0,0,0));
   App_WrCoCmd_Buffer(phost, CLEAR(1,1,1));

   App_WrCoCmd_Buffer(phost, BITMAP_HANDLE(1));
   App_WrCoCmd_Buffer(phost, BITMAP_SOURCE(1000 + 148));
   App_WrCoCmd_Buffer(phost, BITMAP_LAYOUT(L2,11,48));

   App_WrCoCmd_Buffer(phost, BITMAP_SIZE(NEAREST,BORDER,BORDER,42,48));

   App_WrCoCmd_Buffer(phost, COLOR_RGB(255,255,255));

   // Set Font
   Gpu_CoCmd_SetFont2(phost, 1, 1000, 1);

   // Write
   Gpu_CoCmd_Text(phost, 230, DispHeight/2, 1, OPT_CENTERX|OPT_CENTERY,
               (const char8_t*)"Bienvenido!");

   // Show buffer
   App_WrCoCmd_Buffer(phost, DISPLAY());
   Gpu_CoCmd_Swap(phost);
   App_Flush_Co_Buffer(phost);
   Gpu_Hal_WaitCmdfifo_empty(phost);


Best regards, Santiago
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: FT813 - Fonts bigger than 39 not working
« Reply #3 on: March 11, 2020, 04:09:37 PM »

Hello,

By any chance are you loading both fonts into RAM_G concurrently?
I cant see any glaring issues with your code, looks like you've set everything correctly for the 'not working' font data.

Best Regards,
FTDI Community
Logged

toty04

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: FT813 - Fonts bigger than 39 not working
« Reply #4 on: March 11, 2020, 09:38:33 PM »

Hi,

I also don't understand what am I doing wrong.
Only one file is load and has to be changed manually to get the other one.
Please find attached the complete project.
Sources, includes and EVE HAL layer.
The project is running on an STM32F407 MCU, so I have omitted all the MCU related files.

Any idea of what can I test?

Best regards,
Santiago
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: FT813 - Fonts bigger than 39 not working
« Reply #5 on: March 13, 2020, 04:30:54 PM »

Hello,

Thanks for providing these, I will have a look at recreating your issue with the font files your previously provided. This should help me pinpoint where the problem is.

Best Regards,
FTSI Community
Logged

toty04

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: FT813 - Fonts bigger than 39 not working
« Reply #6 on: March 30, 2020, 07:59:27 PM »

Hi,

could you reproduce the error? Any news regarding this issue?

Thanks,
Santiago
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: FT813 - Fonts bigger than 39 not working
« Reply #7 on: March 31, 2020, 12:51:29 PM »

Hello,

Unfortunately I did not have a chance to before the UK (where I am based) went into lockdown due to the COVID-19 pandemic.
As such I cannot get into the office to acquire the correct EVE board to try this on.

Can you try taking logic captures of the SPI lines? you can decode these and see if the correct data is getting sent to the EVE IC for the second larger font example.

Best Regards,
BRT Community

Hi,

could you reproduce the error? Any news regarding this issue?

Thanks,
Santiago
Logged