399 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

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!

Embedded Wizard Website | Privacy Policy | Imprint

...