<div dir="ltr">I really like the effort you put into cleaning up the mess. <div><br></div><div>I have briefly looked at this code in the past and it is quite convoluted and hard to understand what and where settings get set. <div>
I tried to hunt down a issue in the Etoys image that a bug can cause certain characters to change color when the image get in a shaky state. (which happens quite often when I test ideas)</div><div><br></div><div>Karl<br><div>
 </div></div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 21, 2013 at 5:08 AM, tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, after a couple of weeks rewriting how Scratch draws tiles I&#39;m back to looking at dear old scanners and fonts.<br>

<br>
After side-by-side comparing the old scanners  with the new &#39;Multi&#39; scanners, my conclusion is that there is *very* little difference and we really ought to be able to go back to a single set of classes. Which, I claim, would be nice, since we&#39;ve already visibly suffered from the obvious side-effect of having two trees as bug fixes get added to only one part.<br>

<br>
So far as I could tell the only substantive difference relates to the use of the presentation/presentationLine ivars which seems to be not very important (ref Yoshiki&#39;s message 8 sept) and even seems to be mostly inactive (ref nice&#39;s message regarding  Multilingual-nice.116 same date). It would be really nice to get a solid decision on whether it is still wanted, or should be removed, or if it needs some fixes that can be provided.<br>

<br>
I&#39;m puzzled by quite a few things I&#39;ve discovered.<br>
<br>
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?<br>

<br>
b) MultiCharacterScanner&gt;setConditionArray: cuts out the handling of #space - any ideas why?<br>
<br>
c) as previously mentioned MultiCharacterScanner&gt;addCharToPresentation: is currently unused, apparently because of issues with Unicode &amp; #scanMultiCharactersCombiningFrom:to:in:rightX:stopConditions:kern:  - do we have any decent hope of a fix?<br>

<br>
d) MultiCanvasCharacterScanner&gt;setFont uses baselineY differently to its CanvasCharacterScanner equivalent; why?<br>
<br>
e) TextComposer&gt;composeLinesFrom:to:delta:into:…. differs minimally from MultiTextComposer&gt;multiComposeLinesFrom:to:delta:into:…. and is the only sender of #canComputeDefaultLineHeight. What is the intent? Is this just a bug fix added in one place and not the other?<br>

<br>
f) one of the oddest - DisplayScanner&gt;displayLine:offset:leftInRun: passes the displayString:.. to the font (which I see as good) but MultiDisplayScanner uses the bitlblt instead which seems quite wrong.<br>
<br>
That&#39;ll do for now. I hope we can get some information together to allow this to be improved since it should really simplify an important area of code that gets a lot of exercise and needs to be as fast as possible. I know most of you are running 128 core 75GHz machines with  42Tb of ram and so on, so it hardly matters, but there are over a million Pi&#39;s trying to run Scratch that need help. And there will almost certainly be *many* millions more trying to use Scratch and Squeak over the next year or so, scattered across parts of the world where a Pi is more computer than anyone could have imagined a year ago - Pi is probably going to be *the* platform in sub-Saharn Africa and much of Asia. Let&#39;s at least try to make it good, eh? This is what Smalltalk has always claimed to be about.<br>

<div class="im"><br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" target="_blank">http://www.rowledge.org/tim</a><br>
</div>Strange OpCodes: AGO: Allow Games Only<br>
<br>
<br>
<br>
</blockquote></div><br></div>