April 19, 2010
7:52 p.m.
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