Marcel Taeumel uploaded a new version of MultilingualTests to project The Trunk: http://source.squeak.org/trunk/MultilingualTests-mt.40.mcz
==================== Summary ====================
Name: MultilingualTests-mt.40 Author: mt Time: 21 February 2022, 4:01:37.114099 pm UUID: d66e3af4-9e71-c344-a67a-6f3eb06189f4 Ancestors: MultilingualTests-mt.39
Complements Graphics-mt.483
=============== Diff against MultilingualTests-mt.39 ===============
Item was changed: ----- Method: FontTest>>testMultistringFallbackFont (in category 'tests') ----- 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. + style := TextStyle new newFontArray: {Preferences standardFlapFont}. - 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 lineGrid. - height := style defaultFont height + style leading. width := p caretWidth + (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 'tests') ----- 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. 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 lineGrid. - height := style defaultFont height + style leading. width := p caretWidth + (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 'tests') ----- testParagraph "self debug: #testParagraph" | text p style height width | text := 'test' asText. p := NewParagraph new. style := TextStyle default. p compose: text style: style from: 1 in: (0 @ 0 corner: 1000000 @ 1000000). "See CompositionScanner>>setActualFont: & CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:" + height := style defaultFont lineGrid. - height := style defaultFont height + style leading. width := (text inject: 0 into: [:tally :next | tally + (style defaultFont widthOf: next)]) + p caretWidth. "because it is added by the paragraph formatting" p adjustRightX. self assert: p extent = (width @ height)!
Item was changed: ----- Method: FontTest>>testParagraphFallback (in category 'tests') ----- 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. style := TextStyle default. p compose: text style: style from: 1 in: (0 @ 0 corner: 1000000 @ 1000000). "See CompositionScanner>>setActualFont: & CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:" + height := style defaultFont lineGrid. - height := style defaultFont height + style leading. width := (expect inject: 0 into: [:tally :next | tally + (style defaultFont widthOf: next)]) + p caretWidth. p adjustRightX. self assert: p extent = (width @ height). "Display getCanvas paragraph: p bounds: (10 @ 10 extent: 100 @ 100) color: Color black"!
packages@lists.squeakfoundation.org