Merge "Take text alignment into account to compue text bounds Bug #10258621" into klp-dev