[squeak-dev] Making 4.1 test green - exercize #1

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Mar 17 21:02:55 UTC 2010

This evening: why (FontTest new testParagraphFallback) does fail ?

Well, a collateral effect of Unicode leadingChar = 0...

Since Unicode change, (EncodedCharSet scanSelectorAt: startEncoding) =
And this method behaves differently than previous

In effect, let's take a look at
scanMultiCharactersCombiningFrom: startIndex to: stopIndex in:
sourceString rightX: rightX stopConditions: stops kern: kernDelta
...snip... lot of code
	lastIndex := stopIndex.
	combining ifNotNil: [
		combined := combining combined.
		self addCharToPresentation: combined.
		"assuming that there is always enough space for at least one character".
		destX := destX + (self widthOf: combined inFont: font).
	^ stops endOfRun

You see it ? It reserves the space for last character twice !
self addCharToPresentation: combined. Once !
destX := destX + (self widthOf: combined inFont: font). Twice !

Well, I've got no idea why and I don't know if I can safely remove it...
Any light ?


There's probably more dust, because Henrik Johanssen told me that the
change of encoding is no more detected as a stop condition in
Consequently, the fallback font is used for any ASCII character
following a wide-character. Tricky!

More information about the Squeak-dev mailing list