(It took me 7 years to get this one right.) XUI v1.60 includes a new method named B4XCanvas.MeasureText. This method accurately measures single line strings. It returns a B4XRect object with the width and height of the measured string. The Top field returns the highest point relative to...
I get strange values like 3.1999998 for the width or height. I thought that on Java pixels were used as units. Am I wrong?
Also, for pixel precise measurement on fonts with symbols, the anti aliasing seems to be taken into account with the measurement. Hence my other question if it's possible to disable the anti aliasing to get a pixel perfect measurement.