[Pkg] The Trunk: MultilingualTests-tpr.16.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Sep 24 00:54:17 UTC 2013
tim Rowledge uploaded a new version of MultilingualTests to project The Trunk:
http://source.squeak.org/trunk/MultilingualTests-tpr.16.mcz
==================== Summary ====================
Name: MultilingualTests-tpr.16
Author: tpr
Time: 23 September 2013, 5:54:06.027 pm
UUID: 9063751c-7262-4b5f-964b-e41f579bd078
Ancestors: MultilingualTests-ul.15
Remove references to MultiNewParagraph and replace with plain old NewParagraph
=============== Diff against MultilingualTests-ul.15 ===============
Item was changed:
----- Method: FontTest>>testMultistringFallbackFont (in category 'testing') -----
testMultistringFallbackFont
"self debug: #testMultistringFallbackFont"
| text p style height width |
[(TextStyle default fontArray at: JapaneseEnvironment leadingChar)
ifNil: [^ self]]
ifError: [:err :rcvr | ^ self].
text := ((#(20983874 20983876 20983878 )
collect: [:e | e asCharacter])
as: String) asText.
+ p := NewParagraph new.
- p := MultiNewParagraph new.
style := TextStyle new leading: 0; newFontArray: {Preferences standardFlapFont}.
p
compose: text
style: style
from: 1
in: (0 @ 0 corner: 100 @ 100).
"See CompositionScanner>>setActualFont: &
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"
height := style defaultFont height + style leading.
width := text
inject: 0
into: [:tally :next | tally
+ (style defaultFont widthOf: next)].
p adjustRightX.
self assert: p extent = (width @ height).
"Display getCanvas
paragraph: p
bounds: (10 @ 10 extent: 100 @ 100)
color: Color black"!
Item was changed:
----- Method: FontTest>>testMultistringFont (in category 'testing') -----
testMultistringFont
"self debug: #testMultistringFont"
| text p style height width |
[(TextStyle default fontArray at: JapaneseEnvironment leadingChar)
ifNil: [^ self]]
ifError: [:err :rcvr | ^ self].
text := ((#(20983874 20983876 20983878 )
collect: [:e | e asCharacter])
as: String) asText.
+ p := NewParagraph new.
- p := MultiNewParagraph new.
style := TextStyle default.
p
compose: text
style: style
from: 1
in: (0 @ 0 corner: 100 @ 100).
"See CompositionScanner>>setActualFont: &
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"
height := style defaultFont height + style leading.
width := text
inject: 0
into: [:tally :next | tally
+ (style defaultFont widthOf: next)].
p adjustRightX.
self assert: p extent = (width @ height).
"Display getCanvas
paragraph: p
bounds: (10 @ 10 extent: 100 @ 100)
color: Color black"!
Item was changed:
----- Method: FontTest>>testParagraph (in category 'testing') -----
testParagraph
"self debug: #testParagraph"
| text p style height width |
text := 'test' asText.
+ p := NewParagraph new.
- p := MultiNewParagraph new.
style := TextStyle default.
p
compose: text
style: style
from: 1
in: (0 @ 0 corner: 100 @ 100).
"See CompositionScanner>>setActualFont: &
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"
height := style defaultFont height + style leading.
width := text
inject: 0
into: [:tally :next | tally
+ (style defaultFont widthOf: next)].
p adjustRightX.
self assert: p extent = (width @ height)!
Item was changed:
----- Method: FontTest>>testParagraphFallback (in category 'testing') -----
testParagraphFallback
"self debug: #testParagraphFallback"
| text p style height width e expect |
e := (Character value: 257) asString.
text := ('test' , e , e , e , e , 'test') asText.
expect := 'test????test'.
+ p := NewParagraph new.
- p := MultiNewParagraph new.
style := TextStyle default.
p
compose: text
style: style
from: 1
in: (0 @ 0 corner: 100 @ 100).
"See CompositionScanner>>setActualFont: &
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"
height := style defaultFont height + style leading.
width := expect
inject: 0
into: [:tally :next | tally
+ (style defaultFont widthOf: next)].
p adjustRightX.
self assert: p extent = (width @ height).
"Display getCanvas
paragraph: p
bounds: (10 @ 10 extent: 100 @ 100)
color: Color black"!
More information about the Packages
mailing list