2024-05-17 2:14 AM
Hi!
Is there download link for the code in this demo. ?
More specifically, I am interested in the code that generates the FPS and MCU load.
Thanks in advance
Solved! Go to Solution.
2024-05-17 7:01 AM
Hello @Southbranch ,
At the moment the only way you can get the source code of this demo is by creating a project in TouchGFX Designer.
First, if it is not done yet, download TouchGFX.
Open TouchGFX Designer, click on Demos, then select "Demo 7".
Finally, "Select board setup" at the top and select a board with 800x480 resolution such as the STM32U5G9 and then you can create the project.
You can now click on "Generate code" a the bottom right, then open the file location and here you can find all the c++ and c files.
If this answers your question, I invite you to select this comment as "best answer".
Regards,
2024-05-17 7:01 AM
Hello @Southbranch ,
At the moment the only way you can get the source code of this demo is by creating a project in TouchGFX Designer.
First, if it is not done yet, download TouchGFX.
Open TouchGFX Designer, click on Demos, then select "Demo 7".
Finally, "Select board setup" at the top and select a board with 800x480 resolution such as the STM32U5G9 and then you can create the project.
You can now click on "Generate code" a the bottom right, then open the file location and here you can find all the c++ and c files.
If this answers your question, I invite you to select this comment as "best answer".
Regards,
2025-04-14 6:47 AM - edited 2025-04-14 8:36 AM
The YT video below shows Demo 7 with 'Font' example at 2m27s.
https://www.youtube.com/watch?v=MqBqnPLM-wM&t=147s
However the Font example is missing in Demo 7 in GfxDesigner 4.25.
Where can I find Font example please ?
Thank you
2025-04-14 9:08 AM
Hello @ferro ,
It is likely that we shared an alpha version for the video but ultimately decided to remove the text example from that demo, perhaps it wasn't displaying all the capabilities of the board.
There are a few text examples available on TouchGFX Designer 4.25.0 :
Regards,
2025-04-14 9:17 AM
"There are a few text examples available on TouchGFX Designer 4.25.0"
Thanks for pointing that out, I searched 'vector' word as I would like to see how that effect of scalable text size in Font example was achieved.
I thought there is possibility to change vector font size at run time but I cant find API to do that. How else would that font size change be achieved ?
Thanks.
2025-04-15 1:55 AM
Hello @ferro ,
Then you can look at the E-bike demo for flash saving.
There we have vector font to save flash and we have the ability to change the font size.
However, to change the font size, there is no functions to scale a vector font, instead we have to create multiple textArea with the various sizes we want.
So for instance creating 2 typographies that uses font X in vector, one in size 10 and the other in size 20 plus 2 textArea, one with the typography where the font is in size 10 and the other where the font is in size 20.
Then you set one visible while the others are invisible.
Regards,
2025-04-15 5:53 AM
Thank you.
However, in [Demo 7 : Font] example, some other technique must be clearly used. What is it ? If you could please watch it again.
https://www.youtube.com/watch?v=MqBqnPLM-wM&t=147s
I studied vector font and What I do not understand why is API not provided to scale the vector font scale at run time. When I change scaling factor in generated code it scales
\generated\fonts\src\Vector_Table_FontX.cpp
touchgfx::GeneratedVectorFont & getFont_vector_FontX ()
{
static touchgfx::GeneratedVectorFont vector_FontX ( 85, 0.085f, ... )
return vector_FontX;
}
I tried to change 0.085f and font scales. So why not to provide API to do that - the font is described by equations.
2025-04-15 6:50 AM
Hello @ferro ,
The implementation of the current textArea is a bit restrictive and we cannot simple enable font rescaling even if it is easy to set a size.
This has been discussed internally and this is not a priority right now but it is most likely coming if you are patient enough.
As for the demo, it can be scalable images, single character textArea inside a texture mapper for each letter or even a video.
Regards,
2025-04-15 6:59 AM
"This has been discussed internally"
Crystal clear. Thanks for explanation.
"it can be
1. scalable images
2. single character textArea inside a texture mapper for each letter
3. or a video."
Interesting. I need to explore texture mapper, no idea what it can do. Thanks again !
2025-04-16 1:24 AM
Hello @ferro ,
A texture-mapper basically allows you to modify the view of an element, it can be zoomed in or out, rotated and even have a virtual camera.
Note that it is very heavy to draw.
Regards,