cancel
Showing results for 
Search instead for 
Did you mean: 

I can not create the binnary fonts.

Fchen.1864
Associate II

I follow the website https://touchgfx.zendesk.com/hc/en-us/articles/360024979552-Using-Binary-Fonts-and-the-Font-Cache. But i can not create any binary fonts. The app.mk is like that :

# Relative location of the TouchGFX framework from root of application

touchgfx_path := ../../Middlewares/ST/TouchGFX/touchgfx

# Optional additional compiler flags

user_cflags := -DUSE_BPP=16

# Settings for image converter output format

alpha_dither := yes

# Dither algorithms: 0 (no dither), 1 (Floyd-Steinberg), 2 (Jarvis, Judice and Ninke), 3 (Stucki)

dither_algorithm := 2

opaque_image_format := RGB565

non_opaque_image_format := ARGB8888

# Settings for image converter screen orientation (empty string =

# default value, -rotate90 rotates the image 90 degrees)

screen_orientation :=

# Settings for Hardware accelerated text rendering on STM32F4 and F7

# devices. Must correspond to value of bitsPerPixel for font to have

# any effect. If A4 blitcap is enabled for target specific HAL the

# fontconverter must generate compliant data format, otherwise

# resulting in a DMA Controller Configuration Error.

text_data_format := A4

# Setting for the textconverter. Identical texts across all languages

# are mapped to the same memory region to save internal flash memory

remap_identical_texts := no

# Location of the TouchGFX Environment

touchgfx_env := G:/TouchGFX/4.12.3/env

text_converter_options := remap A4 binary_fonts

Who can tell me what went wrong.Or give me a specific example.

Thank you very much.

10 REPLIES 10
Martin KJELDSEN
Chief III

Hi,

What do you mean by "cannot create any binary fonts" - How do you know? Where did you check?

/Martin

Fchen.1864
Associate II

Hi ,

I check the generated/fonts folder. And can not find the bin folder.

Follow the document, it should generate a bin folder in the generated/fonts folder.

I want to generate a binary font and put it on my SD card.

How to create it, please help me.

Thank you very much.

Martin KJELDSEN
Chief III

Are you using version 4.12.3 of TouchGFX?

/Martin

Martin KJELDSEN
Chief III

I just did a quick test:

  • 4.12.3
  • Create new simulator application
  • Open config/gcc/app.mk
  • text_converter_options := remap A4 BPP16 binary_fonts
  • Press "Generate code"

I now have

generated\fonts\bin\Font_verdana_10_4bpp.bin
generated\fonts\bin\Font_verdana_20_4bpp.bin
generated\fonts\bin\Font_verdana_40_4bpp.bin

Fchen.1864
Associate II

Thank you very much!

I did it Successfully.

I found that it must be created in simulator application.

If I do it in the STM32F4 application, it can not be created.

Martin KJELDSEN
Chief III

By "STM32F4 application" do you mean through whatever target-compiler you're using? E.g. EWARM, MDK-ARM.

By running the simulator you're also running "make assets". This command will be run when you press "Generate Code". So if you simply modified your configuration and then compiled with IAR, then sure, nothing would be generated.

Maybe you're actually highlighting a usability issue here 🙂 Thanks

/Martin

Fchen.1864
Associate II

No.I do not compiled with IAR. What I means is I create a project of touchGFX on simulator target, it can be generated. But if I create a project with any ather target e.g. STM32F429I Discovery, when I Press "Generate code",it cannot be gererated.

Martin KJELDSEN
Chief III

Then i'd ask you to post the error log 🙂 Press "detailed log" in TouchGFX designer.

/Martin

Fchen.1864
Associate II

This is the log.

It is still create the .cpp files.

Generate Code

   Generate

       Done

   Generate Assets

       make -f simulator/gcc/Makefile assets -j10

       Converting images

       Generating generated/fonts/src/GeneratedFont.cpp

       Generating generated/fonts/include/fonts/GeneratedFont.hpp

       Generating generated/fonts/include/fonts/CachedFont.hpp

       Generating generated/fonts/src/CachedFont.cpp

       Generating generated/fonts/include/fonts/FontCache.hpp

       Generating generated/fonts/src/FontCache.cpp

       Generating generated/fonts/src/ApplicationFontProvider.cpp

       Generating generated/fonts/include/fonts/ApplicationFontProvider.hpp

       Generating generated/texts/include/texts/TextKeysAndLanguages.hpp

       Done

   Post Generate

       touchgfx update_project --project-file=../MDK-ARM/TouchGFX_test.uvprojx --gui-group-name=Application/User/TouchGFX/gui --generated-group-name=Application/User/TouchGFX/generated

       Done

   Done

Here is the app.mk.

# Location of the TouchGFX Environment

touchgfx_env := G:/TouchGFX/4.12.3/env

text_converter_options := remap A4 BPP24 binary_fonts

Here is my project. In this project , I can not create the binary_fonts with using the TouchGFX designer 4.12.3.

0690X00000AsAxaQAF.png