2021-11-12 08:33 AM
Problem
When running the simulation, the text resources are invisible.
Additional notes:
Q: Is the resource properly configured?
A: Yes. I think so. Here's an example of the PressureString:
Q: Is the simulator Locale configured to GB?
A: Yes. I think so.Q: Do the fonts exist?
A: Yes. I think so.
Q: Has the code been generated properly?
A: Difficult to tell, but I see the text initialisation
Versioning info:
TouchGFX Designer version: 4.16.0
Solved! Go to Solution.
2021-11-24 09:38 AM
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.
2021-11-22 10:33 AM
@Community member You seem to be quite good with touchGFX.
Have you ever encountered this problem?
2021-11-22 03:19 PM
I'm good with logic and reasoning, less so with the simulation.
This is more of an ST Staff question.
2021-11-23 06:47 AM
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.
2021-11-23 10:37 AM
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.
2021-11-23 12:02 PM
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.
2021-11-23 01:52 PM
A few more things to check:
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.
2021-11-23 02:18 PM
Currently, all text areas are not displayed.
Here's the generated txt list inside \TouchGFX\generated\fonts\
It seems to be similar to my GUI config
Inside the \TouchGFX\generated\fonts\src\
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
2021-11-23 05:49 PM
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).
2021-11-24 07:47 AM
Hi Michael,
Thanks for your help, I think we are onto something!
This is the entire Table_Roboto_Regular_18_4bpp.cpp.
This 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.
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
Maybe this has to do with the project's text configuration?
Not sure if that's helpful, but when playing with the Text configuration, I get the following error
What do you think?
Thanks again for your help, I feel like we are very close !
Regards,
Gabriel