B4J Question Calculate string width

MarcRB

Active Member
Licensed User
Longtime User
Hello,

I know it isn't wanted to re-ask the same question, but I do... Please for give me.

Can someone put me in the right direction by calculating StringWidth.
I mean the lenght in pixels, units or some value from any string in a specified font.
Maybe I can draw a string on a blanc picture and search for last pixel from left to right. But I think there will be much smarter ways.

See also:
https://www.b4x.com/android/forum/threads/how-to-calculate-string-width-for-pdfbox.135632/

Thanks in advance.
 
Top