[Pkg] The Trunk: MultilingualTests-mt.38.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Feb 3 15:32:57 UTC 2022
Marcel Taeumel uploaded a new version of MultilingualTests to project The Trunk:
http://source.squeak.org/trunk/MultilingualTests-mt.38.mcz
==================== Summary ====================
Name: MultilingualTests-mt.38
Author: mt
Time: 3 February 2022, 4:32:56.405027 pm
UUID: 0cd9e92d-e797-3547-b7c4-bd46de0fd9ab
Ancestors: MultilingualTests-pre.37
Fixes paragraph test. The box needs to be bigger to account for a bigger default system font. Maybe we can further rewrite this test to not use "TextStyle default" in the first place.
=============== Diff against MultilingualTests-pre.37 ===============
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).
- 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 caretWidth.
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