<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Georgia">Well, something is a little wrong<br>
      <br>
      StringHolder new contents:  'word1 word2 word3 word4 word5 word6
      word7 word8 word9 word10 word11 word12 word13 word14 word15 word16
      word17 word18 word19 word20 word21 word22 word23 word24 word25
      word26 word27 word28 word29 word30 ' asWideString,(WideString
      with: 401 asCharacter with: $a with: 402 asCharacter with: $b);
      openLabel: 'foo'<br>
      <br>
      If you resize this window, you see lines breaking in the middle of
      words. Because breakAtSpace is always false, you simply<br>
      <br>
          (breakableIndex isNil or: [breakableIndex &lt; line first])
      ifTrue: [<br>
              "Any breakable point in this line.  Just wrap last
      character."<br>
              breakableIndex := lastIndex - 1.<br>
              lineHeightAtBreak := lineHeight.<br>
              baselineAtBreak := baseline.<br>
          ].<br>
      <br>
          "It wasn't a space, but anyway this is where we break the
      line."<br>
          line stop: breakableIndex.<br>
          lineHeight := lineHeightAtBreak.<br>
          baseline := baselineAtBreak.<br>
          ^ true.<br>
      <br>
      an break wherever the line crossed the right margin.<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 9/25/13 10:01 PM, tim Rowledge
      wrote:<br>
    </div>
    <blockquote
      cite="mid:9E204B19-C407-4E0D-8A3E-DA886703CE2A@rowledge.org"
      type="cite">
      <pre wrap="">
On 24-09-2013, at 2:21 PM, Nicolas Cellier <a class="moz-txt-link-rfc2396E" href="mailto:nicolas.cellier.aka.nice@gmail.com">&lt;nicolas.cellier.aka.nice@gmail.com&gt;</a> wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">
2013/9/21 tim Rowledge <a class="moz-txt-link-rfc2396E" href="mailto:tim@rowledge.org">&lt;tim@rowledge.org&gt;</a>

a) There are {language}environment classes and encoding classes. There is #isBreakableAt:in: implemented in both but seemingly unused in the encoding classes because it is just plain broken there. Should it be removed from the encoders? In the language environment classes it is implemented to return true for space and cr by default, but space, cr &amp; lf in Latin1 and Latin2. Is that as expected?

 
>From what I understand:
- no need to answer true for space, cr, lf since these are already handled in the CharacterScanner stopConditions, so default answer should be ^false (unless one of these is removed from stopConditions, I thought I saw that, but cannot remember...)
- whether it should be in EncodedCharSet or LanguageEnvironment, I don't know…
</pre>
      </blockquote>
      <pre wrap="">
I'm a bit puzzled by what's going on here, now that I'm looking into it. The Multi* classes actually *do* have stopConditions *without* space, and don't have methods to handle #space. And yet I can't find anything going wrong… this is odd.

With Nicolas' changes to the implementations of #isBreakableAt:in: it seems like we shouldn't be getting any use of registerBreakableIndex (and in fact I'm running code where it isn't even in the scan methods to be called!) and so MultiCompositionScanner&gt;crossedX ought to be getting a bit annoyed by now. The only bit of its code getting run is the last 4 lines and 'breakableIndex'/'lineHeightAtBreak'/'baselineAtBreak' are all nil. This surely ought to be breaking the TextLine 'line' but so far… nothing. Even changing the width of windows to force recomposing doesn't seem to upset things. Why isn't it breaking!

tim
--
tim Rowledge; <a class="moz-txt-link-abbreviated" href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a class="moz-txt-link-freetext" href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a>
Compatible: Gracefully accepts erroneous data from any source.




</pre>
    </blockquote>
    <br>
  </body>
</html>