[squeak-dev] #isBreakableAt:in:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Thu Sep 26 20:23:51 UTC 2013


There are more cleanups required in this area

1) senders of setConditionArray: will always send with #paddedSpace or nil
  #paddedSpace will install PaddedSpaceCondition which does stop on Space
character and sends #paddedSpace to the scanner
 nil will install NilCondition which does not stop on Space

We thus have SpaceCondition wich is never used, and right now, it's
fortunate, because it would send #space stopCondition when encoutering
Space character, but only CompositionScanner would understand that !

2) setFont does override with stopConditions := DefaultStopConditions which
does not stop on Space
the (single) CompositionScanner performs an additional action, it set Space
stopCondition -> #space
Curiously, SegmentScanner forces Space stopCondition to nil (that's now
un-necessary, but I'm quite sure that it once was).

Since, setFont is always sent by setStopConditions (* see below), the
#paddedSpace is restored if alignment is Justified, or the NilCondition
overrides the DefaultCondition...
* computeDefaultLineHeight also calls setFont, but only before composition
takes place...

This is really a convoluted mess !

My opinion:
1) we should remove SpaceCondition, and NilCondition, and only have
DefaultCondition stopping on Space by sending #space
2) we should restore #space message to record Space position and count.
3) Only in JapaneseLanguageEnvironment there should be a special
JapaneseStopConditions



2013/9/26 tim Rowledge <tim at rowledge.org>

>
> On 26-09-2013, at 7:14 AM, Bob Arning <arning315 at comcast.net> wrote:
>
> > Well, something is a little wrong
>
> I rather thought so. I'll use your StringHolder to work out something.
> Actually I reckon a quick hack to add #space and simply use
> #registerBreakableIndex should be good start.
>
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> BASIC is to computer programming as QWERTY is to typing.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130926/0c4d5af5/attachment.htm


More information about the Squeak-dev mailing list