Is it possible to change the fontsize of a Font-Resource during runtime?
I think about something like this in a function so i can change valueX with e.g. a slider:
MyResources::MyFont.Height = valueX; // valueX is the desired fontsize
// or something like this:
Editor.FontSize = valueX;
Can I do it like this or do I have to define several Font-Resources with the desired height and change between them?
Thank you in advance
you need several fonts with individual sizes and switch between the fonts dynamically. When generating code, Embedded Wizard converts all involved fonts in small bitmaps according to the specified font height. These bitmaps can't change at the runtime. This approach is optimized for Embedded Systems with managable amount of fonts, glyphs and sizes.
For sophisticated cases, if you have many fonts, many glyphs and many sizes, it can be reasonable to raster the fonts dynamically at the runtime. This expects your application to additionally include a TrueType font engine and all needed TrueType font files. This is usually an overkill for small Embedded Systems. Anyway, this approach is possible and we provide dedicated Platform Packages to allow our customers to integrate the extern TrueType font engine and raster the glyphs dynamically.
I hope it helps you further.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!