The simple attached PyRoot script and png file demonstrate the problem.
When the canvas is viewed interactively, or a png image is saved, the text in the two boxes is correctly aligned (right side of image). However, when a PDF is saved, the text is no longer correctly aligned (left side of image, from a screenshot of the PDF).
This problem occurs in multiple ROOT versions (6.06, 6.12, 6.22), in both Python and C++. In addition to PDF, it also occurs for the EPS format.
testText.py (1.3 KB)