The Trunk: Graphics-nice.227.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Graphics-nice.227.mcz

commits-2
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.227.mcz

==================== Summary ====================

Name: Graphics-nice.227
Author: nice
Time: 24 September 2013, 1:18:08.471 am
UUID: 57e4b1c3-812c-47fa-a845-ed5dabeb8757
Ancestors: Graphics-tpr.226

Restore widthAndKernedWidthOfLeft:right:into: which was probably stolen by FreeType package hijacker.

=============== Diff against Graphics-tpr.226 ===============

Item was added:
+ ----- 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"
+ | w k |
+ 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
+ !