<div dir="ltr"><div><div><div>I don&#39;t understand all you did...<br></div>#scanSelector is still in use sent by #scanSelectorAt:.<br>This is because #charsetAt: can answer either a LanguageEnvironment or an EncodedCharSet, so why remove it now?<br>
<br></div>Why remove #isBreakable:in:in:? it is still in use by the scanJapanese...<br></div><div>same for breakAtSpace (for Japanese only).<br></div><div><br></div>Why remove composeFrom: startIndex inRectangle: snip... ?<br>
I&#39;m suspect that this is a slip due to moving methods between packages<br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/27  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tim Rowledge uploaded a new version of Multilingual to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Multilingual-tpr.177.mcz" target="_blank">http://source.squeak.org/trunk/Multilingual-tpr.177.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Multilingual-tpr.177<br>
Author: tpr<br>
Time: 26 September 2013, 5:02:39.835 pm<br>
UUID: 1a4fc492-87e5-4fa5-a7b4-2d79bd774000<br>
Ancestors: Multilingual-nice.176<br>
<br>
Get rid of<br>
EncodedCharSet class&gt;&gt;scanSelector<br>
MultiCompositionScanner&gt;&gt;isBreakableAt:in:in: &amp; setFont<br>
minor changes to some stopcondition methods<br>
<br>
=============== Diff against Multilingual-nice.176 ===============<br>
<br>
Item was removed:<br>
- ----- Method: EncodedCharSet class&gt;&gt;scanSelector (in category &#39;accessing - displaying&#39;) -----<br>
- scanSelector<br>
- &quot;This appears to be redundant - possibly once used as a default and now usurped by LanguageEnvironmet class&gt;scanSelector ?&quot;<br>
-       ^ #scanMultiCharactersFrom:to:in:rightX:stopConditions:kern:!<br>
<br>
Item was changed:<br>
  ----- Method: MultiCharacterScanner&gt;&gt;isBreakableAt:in:in: (in category &#39;scanner methods&#39;) -----<br>
  isBreakableAt: index in: sourceString in: encodingClass<br>
+ &quot;check with the encoding whether the character at index is a breakable character- only the JISX0208 &amp; JapaneseEnvironment will ever return true, so only the scanJapaneseCharacters... method calls this&quot;<br>

-<br>
        ^ encodingClass isBreakableAt: index in: sourceString.<br>
  !<br>
<br>
Item was changed:<br>
  ----- Method: MultiCharacterScanner&gt;&gt;scanMultiCharactersFrom:to:in:rightX:stopConditions:kern: (in category &#39;scanning&#39;) -----<br>
  scanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta<br>
<br>
        | ascii encoding f nextDestX startEncoding floatDestX widthAndKernedWidth nextChar atEndOfRun |<br>
        lastIndex := startIndex.<br>
        lastIndex &gt; stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun].<br>
        startEncoding := (sourceString at: startIndex) leadingChar.<br>
        font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1].<br>
        ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [<br>
                f := [font fontArray at: startEncoding + 1] ifError: [nil].<br>
                f ifNil: [ f := font fontArray at: 1].<br>
                spaceWidth := f widthOf: Space.<br>
        ].<br>
        floatDestX := destX.<br>
        widthAndKernedWidth := Array new: 2.<br>
        atEndOfRun := false.<br>
        [lastIndex &lt;= stopIndex] whileTrue: [<br>
                encoding := (sourceString at: lastIndex) leadingChar.<br>
                encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun].<br>
                ascii := (sourceString at: lastIndex) charCode.<br>
                (ascii &lt; 256 and: [(stops at: ascii + 1) ~~ nil]) ifTrue: [^ stops at: ascii + 1].<br>
                nextChar := (lastIndex + 1 &lt;= stopIndex)<br>
                        ifTrue:[sourceString at: lastIndex + 1]<br>
                        ifFalse:[<br>
                                atEndOfRun := true.<br>
                                &quot;if there is a next char in sourceString, then get the kern<br>
                                and store it in pendingKernX&quot;<br>
                                lastIndex + 1 &lt;= sourceString size<br>
                                        ifTrue:[sourceString at: lastIndex + 1]<br>
                                        ifFalse:[       nil]].<br>
                font<br>
                        widthAndKernedWidthOfLeft: (sourceString at: lastIndex)<br>
                        right: nextChar<br>
                        into: widthAndKernedWidth.<br>
                nextDestX := floatDestX + (widthAndKernedWidth at: 1).<br>
                nextDestX &gt; rightX ifTrue: [destX ~= firstDestX ifTrue: [^stops crossedX]].<br>
                floatDestX := floatDestX + kernDelta + (widthAndKernedWidth at: 2).<br>
                atEndOfRun<br>
                        ifTrue:[<br>
                                pendingKernX := (widthAndKernedWidth at: 2) - (widthAndKernedWidth at: 1).<br>
                                floatDestX := floatDestX - pendingKernX].<br>
                destX := floatDestX .<br>
                lastIndex := lastIndex + 1.<br>
        ].<br>
        lastIndex := stopIndex.<br>
        ^ stops endOfRun!<br>
<br>
Item was removed:<br>
- ----- Method: MultiCompositionScanner&gt;&gt;composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category &#39;scanning&#39;) -----<br>
- composeFrom: startIndex inRectangle: lineRectangle<br>
-       firstLine: firstLine leftSide: leftSide rightSide: rightSide<br>
-       &quot;Answer an instance of TextLineInterval that represents the next line in the paragraph.&quot;<br>
-       | runLength stopCondition |<br>
-       &quot;Set up margins&quot;<br>
-       leftMargin := lineRectangle left.<br>
-       leftSide ifTrue: [leftMargin := leftMargin +<br>
-                                               (firstLine ifTrue: [textStyle firstIndent]<br>
-                                                               ifFalse: [textStyle restIndent])].<br>
-       destX := spaceX := leftMargin.<br>
-       firstDestX := destX.<br>
-       rightMargin := lineRectangle right.<br>
-       rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent].<br>
-       lastIndex := startIndex.        &quot;scanning sets last index&quot;<br>
-       destY := lineRectangle top.<br>
-       lineHeight := baseline := 0.  &quot;Will be increased by setFont&quot;<br>
-       self setStopConditions. &quot;also sets font&quot;<br>
-       runLength := text runLengthFor: startIndex.<br>
-       runStopIndex := (lastIndex := startIndex) + (runLength - 1).<br>
-       line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)<br>
-                               rectangle: lineRectangle.<br>
-       spaceCount := 0.<br>
-       self handleIndentation.<br>
-       leftMargin := destX.<br>
-       line leftMargin: leftMargin.<br>
-<br>
-       [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex<br>
-               in: text string rightX: rightMargin stopConditions: stopConditions<br>
-               kern: kern.<br>
-       &quot;See setStopConditions for stopping conditions for composing.&quot;<br>
-       self perform: stopCondition] whileFalse.<br>
-<br>
-       ^ line<br>
-               lineHeight: lineHeight + textStyle leading<br>
-               baseline: baseline + textStyle leading!<br>
<br>
Item was changed:<br>
  ----- Method: MultiCompositionScanner&gt;&gt;composeLine:fromCharacterIndex:inParagraph: (in category &#39;scanning&#39;) -----<br>
  composeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph<br>
        &quot;Answer an instance of TextLineInterval that represents the next line in the paragraph.&quot;<br>
        | runLength stopCondition |<br>
        destX := spaceX := leftMargin := aParagraph leftMarginForCompositionForLine: lineIndex.<br>
        destY := 0.<br>
        rightMargin := aParagraph rightMarginForComposition.<br>
        leftMargin &gt;= rightMargin ifTrue: [self error: &#39;No room between margins to compose&#39;].<br>
        lastIndex := startIndex.        &quot;scanning sets last index&quot;<br>
        lineHeight := textStyle lineGrid.  &quot;may be increased by setFont:...&quot;<br>
        baseline := textStyle baseline.<br>
-       baselineY := destY + baseline.<br>
        self setStopConditions. &quot;also sets font&quot;<br>
        self handleIndentation.<br>
        runLength := text runLengthFor: startIndex.<br>
        runStopIndex := (lastIndex := startIndex) + (runLength - 1).<br>
        line := TextLineInterval<br>
                start: lastIndex<br>
                stop: 0<br>
                internalSpaces: 0<br>
                paddingWidth: 0.<br>
        spaceCount := 0.<br>
<br>
        [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex<br>
                in: text string rightX: rightMargin stopConditions: stopConditions<br>
                kern: kern.<br>
        &quot;See setStopConditions for stopping conditions for composing.&quot;<br>
        self perform: stopCondition] whileFalse.<br>
<br>
        ^line<br>
                lineHeight: lineHeight + textStyle leading<br>
                baseline: baseline + textStyle leading!<br>
<br>
Item was changed:<br>
  ----- Method: MultiCompositionScanner&gt;&gt;cr (in category &#39;stop conditions&#39;) -----<br>
  cr<br>
        &quot;Answer true. Set up values for the text line interval currently being<br>
        composed.&quot;<br>
<br>
        pendingKernX := 0.<br>
+       (lastIndex &lt; text size and: [(text at: lastIndex) = Character cr and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1].<br>
-       (lastIndex &lt; text size and: [(text at: lastIndex) = CR and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1].<br>
        line stop: lastIndex.<br>
        spaceX := destX.<br>
        line paddingWidth: rightMargin - spaceX.<br>
        ^true!<br>
<br>
Item was changed:<br>
  ----- Method: MultiCompositionScanner&gt;&gt;endOfRun (in category &#39;stop conditions&#39;) -----<br>
  endOfRun<br>
        &quot;Answer true if scanning has reached the end of the paragraph.<br>
        Otherwise step conditions (mostly install potential new font) and answer<br>
        false.&quot;<br>
<br>
        | runLength |<br>
        lastIndex = text size<br>
        ifTrue: [line stop: lastIndex.<br>
                        spaceX := destX.<br>
                        line paddingWidth: rightMargin - destX.<br>
                        ^true]<br>
        ifFalse:        [<br>
-                       &quot;(text at: lastIndex) charCode = 32 ifTrue: [destX := destX + spaceWidth].&quot;<br>
                        runLength := (text runLengthFor: (lastIndex := lastIndex + 1)).<br>
                        runStopIndex := lastIndex + (runLength - 1).<br>
                        self setStopConditions.<br>
                        ^false]<br>
  !<br>
<br>
Item was removed:<br>
- ----- Method: MultiCompositionScanner&gt;&gt;isBreakableAt:in:in: (in category &#39;multilingual scanning&#39;) -----<br>
- isBreakableAt: index in: sourceString in: encodingClass<br>
-<br>
-       ^ encodingClass isBreakableAt: index in: sourceString.<br>
- !<br>
<br>
Item was removed:<br>
- ----- Method: MultiCompositionScanner&gt;&gt;setFont (in category &#39;stop conditions&#39;) -----<br>
- setFont<br>
-       super setFont.<br>
-       breakAtSpace := false.!<br>
<br>
<br>
</blockquote></div><br></div>