[stEmwin] - Issue creating TTF font function GUI_TTF_CreateFont

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [stEmwin] - Issue creating TTF font function GUI_TTF_CreateFont

      Hello Admin,

      I am trying to make one dynamic font from vector data by STemWin by steps below.

      1. Creating the vector data from *.ttf file by the program Bin2C.exe converter
      • Sample font is _acAauxProBlack (converted file was attached below)


      2. In the main program, implementing the converted file above then trying to create new font:



      Source Code: test.c

      1. // Set parameters for accessing the font file
      2. //
      3. Data.pData = _acAauxProBlack; // Address
      4. Data.NumBytes = sizeof(_acAauxProBlack); // Size
      5. //
      6. // Set creation parameters of first font
      7. //
      8. Cs0.pTTF = &Data; // Use address of GUI_TTF_DATA
      9. Cs0.PixelHeight = 10; // Pixel height
      10. Cs0.FaceIndex = 0; // Initialize to 0
      11. //
      12. // Create font
      13. //
      14. GUI_TTF_CreateFont(&Font0, &Cs0);
      15. //
      16. // Draw something using the fonts
      17. //
      18. GUI_SetTextMode(GUI_TM_NORMAL);
      19. GUI_SetFont(&Font0);
      20. GUI_DispString("Hello world\n");
      Display All


      3. When debugging it was hang in function GUI_TTF_CreateFont(&Font0, &Cs0) and did not return 1 in function FTC_Manager_LookupFace then no font generated further.




      Questions:

      • The GUI_TTF_CreateFont could be able to generate font _acAauxProBlack with height 10 to internal RAM ? I tried with 24 like example in document STemWin532.pdf (part 11.7.3 ) but it did not work either.
      • In case this function working with internal RAM probably, how can store it to external RAM instead ?
      Environment:
      - STM32L496G-DISC board
      - IAr V8.20

      Reference:
      GUI_TTF_CreateFontAA() does not work!

      Attachment:
      - Converted font file AauxProBlack.7z
      - Debug window when unit freezing














      Regards,
      DT