806 views
in GUI Development by
Hi There,

It appears to me that the font size is bound to the Font instance instead of being bound to the Views::Text instance (like it would be in windows)

I would like to have 2 Views::Text instances each associated with the same font instance, and be able to change to font size of only one of the Views::Text instances.

Can this be done?

I'm using EW 8.30

1 Answer

0 votes
by

Hello,

since fonts are rasterized already during the code generation, it is not possible to change the size of the font at the runtime. This would require a TrueType font engine running in the target system and the complete TTF font files stored in the target. Please see also Font resource.

As far as I understand your application case, you would need to have two Font resource members in your project. One font is configured with size X. The other font is configured with size Y. At the runtime you can assign the right Font member to the Text view. You can even switch between the fonts dynamically. Changing the contents of the font itself, however, is not possible.

Does it help you?

Best regards

Paul Banach

by
Hi Paul,

Thanks, it confirms what I thought. It's no problem to workaround it.

Kind Regards,

Rob

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...