tim Rowledge uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-tpr.228.mcz==================== Summary ====================
Name: Graphics-tpr.228
Author: tpr
Time: 23 September 2013, 4:30:49.968 pm
UUID: 1117cefe-2f8a-4636-a727-aa29bba8c934
Ancestors: Graphics-nice.227
Restore the modified version of AbstractFont>>widthAndKernedWidthOfLeft:right:into:
=============== Diff against Graphics-nice.227 ===============
Item was changed:
----- Method: AbstractFont>>widthAndKernedWidthOfLeft:right:into: (in category 'kerning') -----
widthAndKernedWidthOfLeft: leftCharacter right: rightCharacterOrNil into: aTwoElementArray
"Set the first element of aTwoElementArray to the width of leftCharacter and
the second element to the width of left character when kerned with
rightCharacterOrNil. Answer aTwoElementArray"
+ "Actually, nearly all users of this actually want just the widthOf the leftCharacter, so we will default to that for speed. See other implementations for more complex cases"
+
+ | w |
- | w k |
w := self widthOf: leftCharacter.
+ aTwoElementArray at: 1 put: w.
+ aTwoElementArray at: 2 put: w
+
+ " The old code, and what fonts which have pair-kerning would use -
+ w := self widthOf: leftCharacter.
rightCharacterOrNil isNil
ifTrue:[
aTwoElementArray
at: 1 put: w;
at: 2 put: w]
ifFalse:[
k := self kerningLeft: leftCharacter right: rightCharacterOrNil.
aTwoElementArray
at: 1 put: w;
at: 2 put: w+k].
^aTwoElementArray
+ " !
- !