<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'm sure that after a good sleep, this will evaporate, if only I don'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"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></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>>testMultistringFallbackFont (in category 'testing') -----<br>
testMultistringFallbackFont<br>
"self debug: #testMultistringFallbackFont"<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>
"See CompositionScanner>>setActualFont: &<br>
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"<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>
"Display getCanvas<br>
paragraph: p<br>
bounds: (10 @ 10 extent: 100 @ 100)<br>
color: Color black"!<br>
<br>
Item was changed:<br>
----- Method: FontTest>>testMultistringFont (in category 'testing') -----<br>
testMultistringFont<br>
"self debug: #testMultistringFont"<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>
"See CompositionScanner>>setActualFont: &<br>
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"<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>
"Display getCanvas<br>
paragraph: p<br>
bounds: (10 @ 10 extent: 100 @ 100)<br>
color: Color black"!<br>
<br>
Item was changed:<br>
----- Method: FontTest>>testParagraph (in category 'testing') -----<br>
testParagraph<br>
"self debug: #testParagraph"<br>
| text p style height width |<br>
text := 'test' 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>
"See CompositionScanner>>setActualFont: &<br>
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"<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>>testParagraphFallback (in category 'testing') -----<br>
testParagraphFallback<br>
"self debug: #testParagraphFallback"<br>
| text p style height width e expect |<br>
e := (Character value: 257) asString.<br>
text := ('test' , e , e , e , e , 'test') asText.<br>
expect := 'test????test'.<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>
"See CompositionScanner>>setActualFont: &<br>
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"<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>
"Display getCanvas<br>
paragraph: p<br>
bounds: (10 @ 10 extent: 100 @ 100)<br>
color: Color black"!<br>
<br>
<br>
</blockquote></div><br></div>