[squeak-dev] Re: Text truncation in trunk

Andreas Raab andreas.raab at gmx.de
Tue Sep 22 05:06:02 UTC 2009


Hi Javier -

[cc: Juan for questions regarding AA fonts below]

Thanks for pointing this out. This appears to be a problem caused by the 
new fonts; for some reason the code computes an incorrect base kern, i.e.,

   (StrikeFont familyName: 'Atlanta' pointSize: 22) baseKern

This results in -2 (should be zero I think). Juan, I'm wondering why we 
don't just store the base kern in the font and do something along the 
lines of:

baseKern
   ^baseKern ifNil:[0]

to leave the previous fonts alone. Alternatively, we can leave the 
computation in and just set the base kern for the fonts we care about.

There is a remaining question which is why the text isn't resizing 
itself to the proper width (with or without wrong kerning) but I think 
that's a separate question to consider.

Cheers,
   - Andreas

Javier Diaz-Reinoso wrote:
> Testing some code I wrote in Squeak-3.10.2-Closures (and works ok), in 
> the trunk I find some text truncation.
> Example code is:
> 
>     font1 := (TextFontReference toFont: (StrikeFont familyName: 
> 'Atlanta' size: 24)).
>     msg := (3.83 asString, ' RPS (', 3 asString, ' pts), Vavg=', 2.35 
> asString)
>         asText addAttribute: font1.
>     nota:=TextMorph new.
>     nota contents: msg.
>     nota openInWorld
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 




More information about the Squeak-dev mailing list