[BUG][FIX] Missing TTCFont::maxWidth makes trouble for Connectors
Thomas A Petersen
tpeterse at csc.com
Thu Jan 8 13:06:23 UTC 2004
Ned, Yoshiki, et. al,
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.
You can produce this bug in a stock 3.6 or latest 3.7a image by:
1. Use SqueakMap to install Connectors.
2. Import a font that ends up as a TTCFont instance. I normally use
Courrier or Arial. The Bitstream fonts from Squeakmap work too.
3. Make some point size of your imported font the default font. I do it
with World | appearance | system fonts | default font and choose a 12 or
15 point size of an imported font.
4. Now open the FSM flap and drag out a couple of states.
5. [BUG] Next click on the directed state arrow (labeled line) and you
will get the DNU.
6. [FIX] My solution has been to add a maxWidth method to the instance
side of TTCFont that reads:
^self pointSize + 1.
7. Abandon the DNU received in step 5 and try clicking the directed state
arrow again. You can now connect your states with a TTCFont based label.
I think there may have been some traffic on this a few months ago, but no
one seemed to do anything about it. So here is an offering to the
community in a effort to improve the environment.
P.S. I remember being able to produce this bug in 3.4 and 3.5 as well. So
this is a fairly old one.
More information about the Squeak-dev