[BUG][FIX] Missing TTCFont::maxWidth makes trouble for Connectors

Ned Konz ned at squeakland.org
Thu Jan 8 16:38:38 UTC 2004


On Thursday 08 January 2004 5:06 am, Thomas A Petersen wrote:
> There is a standing issue with Connectors when you have a TTCFont instance
> set as the default font.  When you attempt to use a labeled arrow you get a
> DNU because TTCFont does not understand maxWidth.

[snip]

> 6.  [FIX] My solution has been to add a maxWidth method to the instance
> side of TTCFont that reads:
> 
> MaxWidth
>     ^self pointSize + 1.

Actually, though this gets rid of the walkback, it's not as good an idea as 
(for instance) getting rid of the call and replacing the TextMorph in the 
label altogether with something that knows how to figure out its width.

maxWidth is a real problem with TrueType fonts, as they're cached, and having 
to scan through thousands of glyphs is a pain.

In the current (read: unreleased) version of Connectors I have gotten rid of 
this problem.

And though I've been saying this for a while, I will be releasing a new 
version of Connectors soon.

Meanwhile, I just posted a fix for this particular problem.



More information about the Squeak-dev mailing list