Prevent auto resizing of canvas view size with the display scaling

Viewed 42

I want to fix the size canvas/view/text size. Canvas/view size is increasing when we increase the 'display scaling' from settings. I have handled for increase in font size with the below code but i couldn't prevent enlarging with scaling. Thanks

fontSize = with(LocalDensity.current) { (16 / fontScale).sp

[Display Scaling Image]1

0 Answers
Related