2

I would like to find the length of a text string in pixels (or inches) so that I can draw a box that fits around it.

I have found that par('cra') and par('cin') supposedly give you the character size in pixels or inches, but I don't understand this as different characters have different widths, and when I multiply the values output by the number of characters in my string it does not give the correct length.

0 Answers0