Problem centering lines in a canvas

Right. As it happens in TextEdit and word processors.

OK.

My gut feeling is that this will never work 100% because you will need inside knowledge of how the operating system calculates line spacing when drawing blocks of text. The algorithm used by the operating system may not be the same across operating system versions and may also change depending on what APIs the Xojo framework is using.

I think the safest solution will be if you draw the left aligned text line by line like you do for centre aligned text as you will always be in control of the line spacing.

I agree. That’d be the reasonable solution if no other input comes up.
Thank you.