[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-width error?
- To: Peter Stone <firstname.lastname@example.org>
- Subject: Re: string-width error?
- From: Ernest T Rees <email@example.com>
- Date: Wed, 8 Feb 1995 12:03:17 -0500 (EST)
- Cc: firstname.lastname@example.org
- In-reply-to: <199502081156.AA05284@xs1.xs4all.nl>
- Sender: email@example.com
On Wed, 8 Feb 1995, Peter Stone wrote:
> Thanks for advice for everybody. The width problem was endeed caused
> by string exceeding the build-in Mac OS limit, which was undocumented
> in the MCL manual.
> Natural-size works fine when the text to be sized contains newlines at
> the end of each row. But the string I'm sizing is "a very long string
> without newlines". Its width must be calculated in chunks. Here is the
> unlimited length version of string-width.
All string-width really does is multiply the length of the string by
the char width. You can do this yourself rather than using string-width
repeatedly. (If you are using a variable-width font, either approach will
give increasingly erroneous results and the length of the string increases.)