A good short to mid term goal would be get the flow or responsibility to allow kerning to work; then somebody with interest might have pity on us and fill in the details. As things are now, the division between Canvas and Form is not correct, so anyone trying to add kerning would have to fight both battles.
BTW, I don't really care about kerning itself; I care that the system design does not anticipate it and in fact fights it. Bill -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Henrik Sperre Johansen Sent: Monday, April 19, 2010 2:52 PM To: [email protected] Subject: Re: [Pharo-project] Fonts for dummies On 19.04.2010 21:16, Schwab,Wilhelm K wrote: > I'm not sure how to read "it's not the kerning you are looking for." Read it as "if you meant kerning in the sense that the width of a string ~= width of each individual character" i.e., the ascent/descentKerns in StrikeFonts are not used for this. > What I am trying to discover is how to get the exact pixel size of '0xFFFF' > and of 'suffix AV' - the latter will potentially involve more kerning than > the former. When rendered by StrikeFonts, no, they will not, since it does not do kerning. For FreeTypeFonts, #widthOfString:from:to: does exactly what you ask. It wouldn't be impossible to add kerning to StrikeFonts, but it's a fairly major task as you'd need to: - Update the StrikeFont class to include kerningInfo, and implement kerningLeft:right: method - Define font construction methods etc. - Actually define useful kerning values for fonts in use. - Update the displayString: primitive to take into account kerning info Basically, the support is just not there at all at the moment for StrikeFont kerning. Cheers, Henry _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
