[squeak-dev] The Trunk: Graphics-jmv.77.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Sep 22 21:43:49 UTC 2009


Juan Vuletich uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-jmv.77.mcz

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

Name: Graphics-jmv.77
Author: jmv
Time: 22 September 2009, 6:42:48 am
UUID: decb62a3-d543-40fe-a036-82b2664b5b78
Ancestors: Graphics-ar.76

Made #baseKern answer zero on most cases. This avoids what seems to be a bug in CharacterScanner and friends that might compute incorrect pixel width for strings.

=============== Diff against Graphics-ar.76 ===============

Item was changed:
  ----- Method: StrikeFont>>baseKern (in category 'accessing') -----
  baseKern
  	"Return the base kern value to be used for all characters."
  	
+ 	| italic |
- 	| italic baseKern |
  	italic := emphasis allMask: 2.
  	
+ 	(self isSynthetic not and: [ glyphs depth > 1 ]) ifTrue: [
+ 		^(italic or: [ pointSize < 9 ])
- 	self isSynthetic ifFalse: [
- 		baseKern := (italic or: [ pointSize < 9 ])
  			ifTrue: [ 1 ]
+ 			ifFalse: [ 0] ].
- 			ifFalse: [ 0 ].
- 		(italic not and: [pointSize = 12]) ifTrue: [
- 			baseKern := baseKern -1 ].
- 		pointSize >= 13 ifTrue: [
- 			baseKern := baseKern -1 ].
- 		pointSize >= 20 ifTrue: [
- 			baseKern := baseKern -1 ].
- 		^baseKern
- 		].
  		
  	italic ifFalse: [^ 0].
  	^ ((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
  		+ (((self ascent-5+4)//4 max: 0))!




More information about the Squeak-dev mailing list