[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string-width error?



rees+@pitt.edu (Ernest T Rees) writes:

> All string-width really does is multiply the length of the string by
> the char width.

Not so, it sums successive call to CharWidth.

The best way to get the width of an arbitrary length string is to embed a
call to TextWidth in a unwind-protect that sets the font to font-spec and
cleans up by restoring the original font.

At least that's my 2 cents worth.

from Wall Street,
Bob Schaaf