Android Question Canvas measure string width without designer's AutoScale

KZero

Active Member
Licensed User
Longtime User
B4X:
Label1.Width=cnv.MeasureStringWidth(Label1.Text,Label1.Typeface,Label1.TextSize)

if the layout set to "AutoScaleAll" the result is accurate but when I disable it, it doesn't measure the string right

am I missing something?
 

KZero

Active Member
Licensed User
Longtime User
AutoScaleAll slightly changes the font size. This is all that it does.
canvas.png


worked well on another device

does B4XCanvas use the same system API for measurement?
 
Upvote 0
Top