Comment #1 on issue 4828 by
[hidden email]: Failing tests:
#testCharacterBlockAfterReplacingAll
http://code.google.com/p/pharo/issues/detail?id=4828broken because of the systematic use of MultiCompositionScanner.
Previously, simple CompositionScanner was used in case of simple string.
The difference reside in #crossedX. See below the breakAtSpace using in
MultiCompositionScanner.
It is set to false by the #setFont invocation. By setting it to true, the
tests are green again but I don't know if it is correct at all to set it to
true here.
crossedX
pendingKernX := 0.
(breakAtSpace) ifTrue: [
spaceCount >= 1 ifTrue:
crossedX
pendingKernX := 0.
spaceCount >= 1 ifTrue:
["The common case. First back off to the space at which we wrap."
line stop: spaceIndex.
The other solution is to come back to an alternative: use simple
CompositionScanner if the text is made of simple characters.
In
Paragraph>>recomposeFrom: start to: stop delta: delta
...
text string isOctetString ifTrue: [
^ self composeLinesFrom: (lines at: startLine) first to: stop delta: delta
into: newLines priorLines: lines
atY: (lines at: startLine) top.
].
self multiComposeLinesFrom: (lines at: startLine) first to: stop delta:
delta
into: newLines priorLines: lines
atY: (lines at: startLine) top.
btw: there are a lot of code duplications between XXXX and MultiXXXX
classes.
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker