Hi John, ----- Original Message ----- From: "John M McIntosh" johnmci@smalltalkconsulting.com To: "The general-purpose Squeak developers list" squeak-dev@lists.squeakfoundation.org Sent: Monday, April 30, 2007 9:54 PM Subject: Re: [ANN] FreeType Plus release
In all of this I'm not sure if people noticed another important change we made in Sophie.
That was changing emphasis from a magic number to an object.
Yes, I noticed that. And I remember you mentioning it to me in the past. It is a good idea. I have stuck with the existing magic number scheme mainly because the thought of identifying, and changing, all the existing places where these magic numbers are used seemed quite daunting.
Then you could ask
isBold ^self emphasis includesEmphasis: SophieFontEmphasisEncoder bold
The reason for this was to handle things like 'Light' ,Condensed, Medium, Demibold, or ExtraBold Also to get rid of magic numbers, which btw were not say in a 3.8 image actually correctly handled in *all* the places where code was looking for magic emphasis numbering.
This is good for font substitution and document portability. Currently, I simply treat these 'unusual' weights as being distinct font families, and don't do anything clever about matching missing fonts to the best available substitute.
(On a similar theme, there was a very interesting article mentioned on a FreeType newsgroup about how font names, families, and groupings are determined on Windows. I don't know if you have come across it before, but you might find it interesting... http://blogs.msdn.com/text/archive/2007/04/23/wpf-font-selection-model.aspx )
Cheers, Andy