[squeak-dev] #isBreakableAt:in:

tim Rowledge tim at rowledge.org
Thu Sep 26 02:01:37 UTC 2013


On 24-09-2013, at 2:21 PM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:

> 
> 2013/9/21 tim Rowledge <tim at rowledge.org>
> 
> 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 & 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…

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>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; tim at rowledge.org; http://www.rowledge.org/tim
Compatible: Gracefully accepts erroneous data from any source.




More information about the Squeak-dev mailing list