[FIX] TTCFontPixelSizeFix-nk

Ned Konz ned at bike-nomad.com
Thu Jul 10 22:45:29 UTC 2003


On Thursday 10 July 2003 03:26 pm, Yoshiki.Ohshima at acm.org wrote:

>   An alternative fix would be to call #asIntegerPoint at the
> beginning of TTCFont>>displayString:on:from:to:at:kern:.

It's not just the displayString. The pixelSize (height) is used in 
other places, as well (like to set the bounds of the string). If 
we've added asIntegerPoint everywhere before we get to the BitBlt, 
then it's fine to attack it there, but I'm not sure we've done this.

For instance, if you set a RectangleMorph's y extent to something 
containing a Fraction (by directly setting bounds and fullBounds) and 
try to redraw it, you'll get the same walkback.

>   I guess nothing is wrong with a fraction number until it is used
> with BitBlt.  If so, converting it to an integer point right before
> it is used with BB would be good.
>
>   I anticipate that we ended up with fractional advance... In this
> case, having fractional pixel size may benefit.

It would. However, the legacy clients all expect an integer height. 
Perhaps if we define #height as "pixelSize rounded" and still return 
a float or fractional from #pixelSize (I'd prefer a float, since it's 
at least compatible with BalloonCanvas)?

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list