cancel
Showing results for 
Search instead for 
Did you mean: 

Text resources are invisible while in the simulation?

GBert.2
Senior

Problem

When running the simulation, the text resources are invisible.

0693W00000GXQ28QAH.png 

Additional notes:

Q: Is the resource properly configured?

A: Yes. I think so. Here's an example of the PressureString:

0693W00000GXQ6oQAH.png0693W00000GXQ4TQAX.pngQ: Is the simulator Locale configured to GB?

A: Yes. I think so.0693W00000GXQ7IQAX.pngQ: Do the fonts exist?

A: Yes. I think so.

0693W00000GXQ8kQAH.png0693W00000GXQ86QAH.pngQ: Has the code been generated properly?

A: Difficult to tell, but I see the text initialisation

0693W00000GXQAgQAP.png 

Versioning info:

TouchGFX Designer version: 4.16.0

1 ACCEPTED SOLUTION

Accepted Solutions

Uncheck Binary font files. I'm pretty sure that's the problem. I was able to reproduce the the failed assertion with your Text Configuration settings. The only change I needed to make to properly run it and have the text visible was unchecking Binary Font Files

I checked my Text Configuration and the options I have checked are Remap Texts, A4, and Mapped Storage Format. Perhaps use this default configuration unless you really need to use binary files.

See the support library for binary files: looks like they have to be linked in to your program, and also require an additional configuration step that you need to manually implement in your code.

https://support.touchgfx.com/4.16/docs/development/ui-development/touchgfx-engine-features/using-binary-fonts/

https://support.touchgfx.com/4.16/docs/development/ui-development/touchgfx-engine-features/using-binary-translations/

Embedded UI/UX Consulting: cadenza.design

View solution in original post

11 REPLIES 11
GBert.2
Senior

@Community member​ You seem to be quite good with touchGFX.

Have you ever encountered this problem?

I'm good with logic and reasoning, less so with the simulation.

This is more of an ST Staff question.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
GBert.2
Senior

Thanks for your answer.

To be honest I'm a bit confused about what to do next.

Simulation is also not my cup of tea.

Have a great day.

Michael K
Senior III

Sorry, can't reproduce on 4.16.1, building for simulator. Is this from a blank project?

I swear I've seen this problem on the forum before, but I can't remember when or what the resolution was. I'll update if I find the post.

Embedded UI/UX Consulting: cadenza.design

Hi Michael !

I'm thankful for your efforts. Just the fact that you have seen this before gives me hope!

I think the project was started from scratch. I just asked my client (original creator) about it.

I'll let you know soon.

A few more things to check:

  • Navigate to project\TouchGFX\generated\fonts and check the txt lists. This shows the ascii characters that the project is generating. Make sure it has the characters you're using.
  • Likewise check the src folder and look for a generated font for Roboto 18. Make sure each character has a byte array corresponding to it

Maybe you could swap all the typographies to a built-in font? I see the clock is also missing, so maybe there's something weird going on with the font files.

Embedded UI/UX Consulting: cadenza.design

Currently, all text areas are not displayed.

Here's the generated txt list inside \TouchGFX\generated\fonts\

0693W00000GYe5NQAT.png 

It seems to be similar to my GUI config

0693W00000GYe5SQAT.png 

Inside the \TouchGFX\generated\fonts\src\

0693W00000GYe5cQAD.png 

Honestly, I'm not sure what to look for.

Here's Table_Roboto_Bold_16_4bpp.cpp

// Autogenerated, do not edit
 
#include <fonts/GeneratedFont.hpp>
 
FONT_TABLE_LOCATION_FLASH_PRAGMA
KEEP extern const touchgfx::GlyphNode glyphs_Roboto_Regular_12_4bpp[] FONT_TABLE_LOCATION_FLASH_ATTRIBUTE =
{
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
 
// Roboto_Regular_12_4bpp
extern const touchgfx::GlyphNode glyphs_Roboto_Regular_12_4bpp[];
extern const uint8_t* const unicodes_Roboto_Regular_12_4bpp[] =
{
    0
};
extern const touchgfx::KerningNode kerning_Roboto_Regular_12_4bpp[];
 
touchgfx::GeneratedFont& getFont_Roboto_Regular_12_4bpp();
 
touchgfx::GeneratedFont& getFont_Roboto_Regular_12_4bpp()
{
    static touchgfx::GeneratedFont Roboto_Regular_12_4bpp(glyphs_Roboto_Regular_12_4bpp, 0, 12, 0, 4, 1, 0, 0, unicodes_Roboto_Regular_12_4bpp, kerning_Roboto_Regular_12_4bpp, 63, 0, 0);
    return Roboto_Regular_12_4bpp;
}

> Maybe you could swap all the typographies to a built-in font? 

I will try that tomorrow.

Thanks again for your help.

Gabriel

Check the Roboto Regular 18 cpp - that's the one used in your Pressure resource. If it's generated the glyphs you'll see a huge array of hexadecimal bytes, with comments separating them into the different letters. Just looking at the Roboto Regular 12 I'm not seeing the glyph for '?', which is the fallback character and should be generated for each typography regardless of usage (I think, not at my workstation right now).

Embedded UI/UX Consulting: cadenza.design

Hi Michael,

Thanks for your help, I think we are onto something!

This is the entire Table_Roboto_Regular_18_4bpp.cpp.

0693W00000GYkBCQA1.pngThis doesn't look right to me.

Here is a similar "table" file in a test project I just created.

As you can see the file is clearly different.

0693W00000GYkP9QAL.png 

I tried to create a new typography with Arial instead, but without success (same problem as before).

I also checked if the TTF file existed

0693W00000GYkL7QAL.png 

Maybe this has to do with the project's text configuration?

0693W00000GYkELQA1.png 

Not sure if that's helpful, but when playing with the Text configuration, I get the following error

0693W00000GYkMKQA1.png 

What do you think?

Thanks again for your help, I feel like we are very close !

Regards,

Gabriel