<div dir="ltr"><div><div><div>When I read this code, unresolved questions come to my mind:<br>Will (NewParagraph new) instantiate a NewNewParagraph?<br></div>Should we introduce a new (?) instance creation method (MultiNewParagraph old) just in case?<br>
</div>If so, should it instantiate a NewMultiOldParagraph, or an OldMultiNewOne.<br></div>I&#39;m sure that after a good sleep, this will evaporate, if only I don&#39;t dream of a single of these old new multi things.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/24  <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 MultilingualTests to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/MultilingualTests-tpr.16.mcz" target="_blank">http://source.squeak.org/trunk/MultilingualTests-tpr.16.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: MultilingualTests-tpr.16<br>
Author: tpr<br>
Time: 23 September 2013, 5:54:06.027 pm<br>
UUID: 9063751c-7262-4b5f-964b-e41f579bd078<br>
Ancestors: MultilingualTests-ul.15<br>
<br>
Remove references to MultiNewParagraph and replace with plain old NewParagraph<br>
<br>
=============== Diff against MultilingualTests-ul.15 ===============<br>
<br>
Item was changed:<br>
  ----- Method: FontTest&gt;&gt;testMultistringFallbackFont (in category &#39;testing&#39;) -----<br>
  testMultistringFallbackFont<br>
        &quot;self debug: #testMultistringFallbackFont&quot;<br>
        | text p style height width |<br>
        [(TextStyle default fontArray at: JapaneseEnvironment leadingChar)<br>
                ifNil: [^ self]]<br>
                ifError: [:err :rcvr | ^ self].<br>
        text := ((#(20983874 20983876 20983878 )<br>
                                collect: [:e | e asCharacter])<br>
                                as: String) asText.<br>
+       p := NewParagraph new.<br>
-       p := MultiNewParagraph new.<br>
        style := TextStyle new leading: 0; newFontArray: {Preferences standardFlapFont}.<br>
        p<br>
                compose: text<br>
                style: style<br>
                from: 1<br>
                in: (0 @ 0 corner: 100 @ 100).<br>
        &quot;See CompositionScanner&gt;&gt;setActualFont: &amp;<br>
        CompositionScanner&gt;&gt;composeFrom:inRectangle:firstLine:leftSide:rightSide:&quot;<br>
        height := style defaultFont height + style leading.<br>
        width := text<br>
                                inject: 0<br>
                                into: [:tally :next | tally<br>
                                                + (style defaultFont widthOf: next)].<br>
        p adjustRightX.<br>
        self assert: p extent = (width @ height).<br>
        &quot;Display getCanvas<br>
                paragraph: p<br>
                bounds: (10 @ 10 extent: 100 @ 100)<br>
                color: Color black&quot;!<br>
<br>
Item was changed:<br>
  ----- Method: FontTest&gt;&gt;testMultistringFont (in category &#39;testing&#39;) -----<br>
  testMultistringFont<br>
        &quot;self debug: #testMultistringFont&quot;<br>
        | text p style height width |<br>
        [(TextStyle default fontArray at: JapaneseEnvironment leadingChar)<br>
                ifNil: [^ self]]<br>
                ifError: [:err :rcvr | ^ self].<br>
        text := ((#(20983874 20983876 20983878 )<br>
                                collect: [:e | e asCharacter])<br>
                                as: String) asText.<br>
+       p := NewParagraph new.<br>
-       p := MultiNewParagraph new.<br>
        style := TextStyle default.<br>
        p<br>
                compose: text<br>
                style: style<br>
                from: 1<br>
                in: (0 @ 0 corner: 100 @ 100).<br>
        &quot;See CompositionScanner&gt;&gt;setActualFont: &amp;<br>
        CompositionScanner&gt;&gt;composeFrom:inRectangle:firstLine:leftSide:rightSide:&quot;<br>
        height := style defaultFont height + style leading.<br>
        width := text<br>
                                inject: 0<br>
                                into: [:tally :next | tally<br>
                                                + (style defaultFont widthOf: next)].<br>
        p adjustRightX.<br>
        self assert: p extent = (width @ height).<br>
        &quot;Display getCanvas<br>
                paragraph: p<br>
                bounds: (10 @ 10 extent: 100 @ 100)<br>
                color: Color black&quot;!<br>
<br>
Item was changed:<br>
  ----- Method: FontTest&gt;&gt;testParagraph (in category &#39;testing&#39;) -----<br>
  testParagraph<br>
        &quot;self debug: #testParagraph&quot;<br>
        | text p style height width |<br>
        text := &#39;test&#39; asText.<br>
+       p := NewParagraph new.<br>
-       p := MultiNewParagraph new.<br>
        style := TextStyle default.<br>
        p<br>
                compose: text<br>
                style: style<br>
                from: 1<br>
                in: (0 @ 0 corner: 100 @ 100).<br>
        &quot;See CompositionScanner&gt;&gt;setActualFont: &amp;<br>
        CompositionScanner&gt;&gt;composeFrom:inRectangle:firstLine:leftSide:rightSide:&quot;<br>
        height := style defaultFont height + style leading.<br>
        width := text<br>
                                inject: 0<br>
                                into: [:tally :next | tally<br>
                                                + (style defaultFont widthOf: next)].<br>
        p adjustRightX.<br>
        self assert: p extent = (width @ height)!<br>
<br>
Item was changed:<br>
  ----- Method: FontTest&gt;&gt;testParagraphFallback (in category &#39;testing&#39;) -----<br>
  testParagraphFallback<br>
        &quot;self debug: #testParagraphFallback&quot;<br>
        | text p style height width e expect |<br>
        e := (Character value: 257) asString.<br>
        text := (&#39;test&#39; , e , e , e , e , &#39;test&#39;) asText.<br>
        expect := &#39;test????test&#39;.<br>
+       p := NewParagraph new.<br>
-       p := MultiNewParagraph new.<br>
        style := TextStyle default.<br>
        p<br>
                compose: text<br>
                style: style<br>
                from: 1<br>
                in: (0 @ 0 corner: 100 @ 100).<br>
        &quot;See CompositionScanner&gt;&gt;setActualFont: &amp;<br>
        CompositionScanner&gt;&gt;composeFrom:inRectangle:firstLine:leftSide:rightSide:&quot;<br>
        height := style defaultFont height + style leading.<br>
        width := expect<br>
                                inject: 0<br>
                                into: [:tally :next | tally<br>
                                                + (style defaultFont widthOf: next)].<br>
        p adjustRightX.<br>
        self assert: p extent = (width @ height).<br>
        &quot;Display getCanvas<br>
                paragraph: p<br>
                bounds: (10 @ 10 extent: 100 @ 100)<br>
                color: Color black&quot;!<br>
<br>
<br>
</blockquote></div><br></div>