On 31.08.2010 01:32, Eliot Miranda wrote:
Hi Henrik,
twice you write a slip that the compiler should not allow:
(map := characterToGlyphMap)
ifNotNil: [:map | code := map at: code + 1].
code := (map := characterToGlyphMap)
ifNil: [aCharacter charCode]
ifNotNil: [:map | map at: aCharacter charCode + 1]
these should read
characterToGlyphMap ifNotNil: [:map | code := map at: code + 1].
code := characterToGlyphMap
ifNil: [aCharacter charCode]
ifNotNil: [:map | map at: aCharacter charCode + 1]
HTH,
Eliot
Hum, unless I posted a previous version, the code in the changeset was:
characterToGlyphMap ifNotNil: [:map | code := map at: code +1].
and
code := characterToGlyphMap
ifNotNil: [:map | map at: aCharacter charCode +1]
ifNil: [aCharacter charCode].
Seem to me they got decompiled somehow?
also in BitBlt>>#primDisplayString:from:to:map:xTable:kern: you write
ascii := glyphMap at: (aString at: charIndex) asciiValue + 1.
whereas the current Squeak code reads
ascii := (aString at: charIndex) asciiValue.
glyphMap ifNotNil:[ascii := glyphMap at: ascii+1].
Should Squeak keep its original code (which seems equivalent) or is
there a specific reason to eliminate the ifNotNil: test?
TIA
Eliot
Yes, it should keep it.
Getting late, I made that change in that method first to have Pharo
display correctly, and didn't yet think of that glyphMap may be nil :)
For Squeak, the two methods in StrikeFont should be sufficient.
Cheers,
Henry
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project