CharWidth
char theChar ; character to measure
returns the width of theChar, if displayed right now
CharWidth obtains the width of a specified character; i.e., the amount it would horizontally advance the pen if it were displayed in the current font and
size. If the current style is plain or underline, CharWidth returns the correct width for writing the character in the current style. If the current
style is italic or bold, CharWidth returns the correct width for writing the character in plain style.
theChar is any 1-byte character (actually passes as the low byte of a short).
Returns: the integer width of theChar, expressed in pixels.
Notes: To measure a series of characters it is much faster and more accurate to
stylistic variation (TextFace) affect the display width of a character. If you use scaled or fractional-width fonts while measuring a string,
calling CharWidth repeatedly may compute a length different from the length that StringWidth computes and different from the length of the always draws a string of the same length that calling CharWidth repeatedly computes. The differences are due to rounding errors, since
QuickDraw uses fixed-point math. For example, say the current size is 11
and the System file doesn't contain an 11-point version for the current
font. The System will scale the 12-point version down, and will probably
en counter rounding errors.