A bug with pointSize?

Boris Gaertner Boris.Gaertner at gmx.net
Fri Aug 25 04:54:53 UTC 2006


 "Javier Diaz-Reinoso" <javier_diaz_r at mac.com> wrote:

> Is this a bug?:
Yes, I think it is a bug.

> f0:=TextStyle defaultFont.
> p0:=f0 pointSize.
> 
> f1:=(StrikeFont familyName: (f0 name) size: (f0 pointSize)).
> p1:=f1 pointSize.
> 
> f0 asString, ' p0=', p0 asString, ' ', f1 asString, ' p1=', p1 asString
> 
> 
 
To better the situation, you can add this method to
the class  protocol of StrikeFont:

familyName: aName pointSize: aSize
 "Answer a font (or the default font if the name is unknown) 
  in the specified point size."

 ^ ((TextStyle named: aName asSymbol) 
            ifNil: [TextStyle default]) fontOfPointSize: aSize



More information about the Squeak-dev mailing list