[Interest] Text.fontSizeMode: effectivePixelSize?

Jason H jhihn at gmx.com
Fri Dec 4 18:59:13 CET 2015


When I layout text for a screen, and am using Text.fontSizeMode, I'd like to be able to determine the current size of the font so that I can size other Text* accordingly.

"The font size of fitted text has a minimum bound specified by the minimumPointSize or minimumPixelSize property and maximum bound specified by either the font.pointSize or font.pixelSize properties." - fontSizeMode documentation

There does not seem to be a way to get the current font size because [point|pixel]Size is the maximum bound. 

It'd be nice to have an effective[Pixel|Point]Size so that I can just get whatever it is currently at. I know there are [Font|Text]Metrics, but this property would be a nice shortcut.



More information about the Interest mailing list