Please report an issue on the issue tracker. 2009/4/19 Igor Stasenko <siguctua@gmail.com>:
This is an image-side change, which makes a primitiveDisplayString to not fail because StrikeFontSet returns nil for (font characterToGlyphMap).
Since the code, which using fast primitive looks like following:
    self primDisplayString: aString from: startIndex to: stopIndex             map: font characterToGlyphMap xTable: font xTable             kern: kernDelta
I thought, why one would return nil in ( font characterToGlyphMap ). Since #xTable in StrikeFontSet implemented as following:
xTable     "Answer an Array of the left x-coordinate of characters in glyphs."
    ^ (fontArray  at: 1) xTable.
i think it is safe to do similar in characterToGlyphMap , this allows the primitive to work w/o failure, because otherwise, if you look at implementation of
primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta
in fallback code it does same thing again (and ignoring glyphMap at all, btw).
To bench a difference, leave a couple of windows with text in world and then do:
[10 timesRepeat: [World fullDrawOn: World assuredCanvas] ] timeToRun
before change:
 645
after change:
 545
P.S. since i did this in a fresh pharo-10284-dev, where changesorter is completely broken(do you aware of it?), i filed out this method as .st file.
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Damien Cassou http://damiencassou.seasidehosting.st