[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-width error?
- To: info-mcl@digitool.com
- Subject: Re: string-width error?
- From: bobschaaf@aol.com (Bobschaaf)
- Date: 8 Feb 1995 20:45:37 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- References: <Pine.3.89.9502081229.A14639-0100000@unixs3.cis.pitt.edu>
- Reply-to: bobschaaf@aol.com (Bobschaaf)
- Sender: owner-info-mcl@digitool.com
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