[Pkg] The Trunk: Multilingual-nice.83.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 17 20:46:01 UTC 2010


Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.83.mcz

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

Name: Multilingual-nice.83
Author: nice
Time: 17 January 2010, 9:45:39.182 pm
UUID: 6ee1f32c-e9fe-45c6-bcbe-2b5fae3185ae
Ancestors: Multilingual-ul.82

Use selectorsAndMethodsDo: 

=============== Diff against Multilingual-ul.82 ===============

Item was changed:
+ ----- Method: MultiCharacterBlockScanner>>scanMultiCharactersCombiningFrom:to:in:rightX:stopConditions:kern: (in category 'scanning') -----
- ----- Method: MultiCharacterBlockScanner>>scanMultiCharactersCombiningFrom:to:in:rightX:stopConditions:kern: (in category 'stop conditions') -----
  scanMultiCharactersCombiningFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta
  
  	| encoding f nextDestX maxAscii startEncoding char charValue floatDestX widthAndKernedWidth nextChar |
  	lastIndex := startIndex.
  	lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops at: EndOfRun].
  	startEncoding := (sourceString at: startIndex) leadingChar.
  	font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1].
  	((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [
  		f := [font fontArray at: startEncoding + 1]
  			on: Exception do: [:ex | nil].
  		f ifNil: [ f := font fontArray at: 1].
  		maxAscii := f maxAscii.
  		spaceWidth := f widthOf: Space.
  	] ifFalse: [
  		maxAscii := font maxAscii.
  	].
  	floatDestX := destX.
  	widthAndKernedWidth := Array new: 2.
  	[lastIndex <= stopIndex] whileTrue: [
  		encoding := (sourceString at: lastIndex) leadingChar.
  		encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops at: EndOfRun].
  		char := (sourceString at: lastIndex).
  		charValue := char charCode.
  		charValue > maxAscii ifTrue: [charValue := maxAscii].
  		(encoding = 0 and: [(stops at: charValue + 1) ~~ nil]) ifTrue: [
  			^ stops at: charValue + 1
  		].
  		nextChar := (lastIndex + 1 <= stopIndex) 
  			ifTrue:[sourceString at: lastIndex + 1]
  			ifFalse:[nil].
  		font 
  			widthAndKernedWidthOfLeft: ((char isMemberOf: CombinedChar) ifTrue:[char base] ifFalse:[char]) 
  			right: nextChar
  			into: widthAndKernedWidth.
  		nextDestX := floatDestX + (widthAndKernedWidth at: 1).	
  		nextDestX > rightX ifTrue: [^ stops at: CrossedX].
  		floatDestX := floatDestX + kernDelta + (widthAndKernedWidth at: 2).
  		destX := floatDestX.
  		lastIndex := lastIndex + 1.
  	].
  	lastIndex := stopIndex.
  	^ stops at: EndOfRun!

Item was changed:
  ----- Method: JISX0208 class>>charAtKuten: (in category 'class methods') -----
  charAtKuten: anInteger
  
  	| a b |
  	a := anInteger \\ 100.
  	b := anInteger // 100.
+ 	(a > 94 or: [b > 94]) ifTrue: [
- 	(a > 94) | (b > 94) ifTrue: [
  		self error: 'character code is not valid'.
  	].
  	^ Character leadingChar: self leadingChar code: ((b - 1) * 94) + a - 1.
  !

Item was changed:
+ ----- Method: StrikeFontSet>>copy (in category 'copying') -----
- ----- Method: StrikeFontSet>>copy (in category 'as yet unclassified') -----
  copy
  
  	| s a |
  	s := self class new.
  	s name: self name.
  	s emphasis: self emphasis.
  	s reset.
  	a := Array new: fontArray size.
  	1 to: a size do: [:i |
  		a at: i put: (fontArray at: i) copy.
  	].
  	s fontArray: a.
  	^ s.
  !

Item was changed:
  ----- Method: SystemNavigation>>allSelect: (in category '*Multilingual-Editor') -----
  allSelect: aBlock 
  	"Answer a SortedCollection of each method that, when used as 
  	the block  
  	argument to aBlock, gives a true result."
  	| aCollection |
  	aCollection := SortedCollection new.
  	Cursor execute
  		showWhile: [self
  				allBehaviorsDo: [:class | class
+ 						selectorsAndMethodsDo: [:sel :m | (aBlock value: m)
- 						selectorsDo: [:sel | (aBlock
- 									value: (class compiledMethodAt: sel))
  								ifTrue: [aCollection add: class name , ' ' , sel]]]].
  	^ aCollection!



More information about the Packages mailing list