[Interest] QmlText: fontSizeMode: Text.Fit with rich text.

André Somers andre at familiesomers.nl
Wed Jul 15 16:09:06 CEST 2015

Could you get away with using the Unicode symbols for the ^2 and the likes?


> Op 15 jul. 2015 om 09:47 heeft "Wehmer, Matthias" <Matthias.Wehmer at draeger.com> het volgende geschreven:
> Hi everybody,
> Currently we are working in the area of displaying texts and there formats.
> Here we encountered the following strange behavior:
> - We have a text that we would like to auto scale via "fontSizeMode:
> Text.Fit"
> - Further this text shall be able to display rich texts, such as we can have
> something like a^2. Thus we have set "textFormat: Text.RichText"
> - The latter one is necessary as "textFormat: Text.AutoText" does not
> recognize "a<sub>2</sub>" as rich text.
> - Problem: When setting "textFormat: Text.RichText", the text is not scaled
> automatically.
> - It recognizes "<u>foo</u>" with Text.AutoText and it then the text fits
> correctly. When setting Text.RichText though, the scaling does not work
> anymore. So this is probably due to <u></u>  being part of the StyledText
> feature set. Unfortunately, super- and subscripts are not.
> Have you observed similar behavior and have a hint, why "fontSizeMode:
> Text.Fit" does not work with "textFormat: Text.RichText"? Are there
> additional steps to get it working?
> Thanks a lot and greetings from Germany
> Matthias
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list