[squeak-dev] The Trunk: Multilingual-nice.189.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Oct 9 23:33:55 UTC 2013
Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.189.mcz
==================== Summary ====================
Name: Multilingual-nice.189
Author: nice
Time: 10 October 2013, 1:33:16.023 am
UUID: 2f31cb35-a0d0-41b4-be3e-f5c0bdb88e72
Ancestors: Multilingual-nice.188
Put the charsetAt: send out of the scanJapaneseCharactersFrom:to:in:rightX: inner loop.
=============== Diff against Multilingual-nice.188 ===============
Item was changed:
----- Method: CharacterScanner>>scanJapaneseCharactersFrom:to:in:rightX: (in category '*Multilingual-Display') -----
scanJapaneseCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX
"this is a scanning method for
multibyte Japanese characters in a WideString - hence the isBreakable:in:in:
a font that does not do character-pair kerning "
+ | ascii encoding nextDestX startEncoding char charset |
- | ascii encoding nextDestX startEncoding char |
lastIndex := startIndex.
lastIndex > stopIndex ifTrue: [^self handleEndOfRunAt: stopIndex].
startEncoding := (sourceString at: startIndex) leadingChar.
+ charset := EncodedCharSet charsetAt: startEncoding.
[lastIndex <= stopIndex] whileTrue: [
char := sourceString at: lastIndex.
encoding := char leadingChar.
encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stopConditions endOfRun].
ascii := char charCode.
(encoding = 0 and: [ascii < 256 and:[(stopConditions at: ascii + 1) notNil]])
ifTrue: [^ stopConditions at: ascii + 1].
+ (self isBreakableAt: lastIndex in: sourceString in: charset) ifTrue: [
- (self isBreakableAt: lastIndex in: sourceString in: (EncodedCharSet charsetAt: encoding)) ifTrue: [
self registerBreakableIndex.
].
nextDestX := destX + (font widthOf: char).
nextDestX > rightX ifTrue: [^ stopConditions crossedX].
destX := nextDestX + kern.
lastIndex := lastIndex + 1.
].
^self handleEndOfRunAt: stopIndex!
More information about the Squeak-dev
mailing list
|