[Pkg] The Trunk: Graphics-tpr.228.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 23 23:31:34 UTC 2013

tim Rowledge uploaded a new version of Graphics to project The Trunk:

==================== 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
  				at: 1 put: w; 
  				at: 2 put: w]
  			k := self kerningLeft: leftCharacter right: rightCharacterOrNil.
  				at: 1 put: w; 
  				at: 2 put: w+k].
+ "	!
- 	!

More information about the Packages mailing list