[squeak-dev] I18n and Cairo/pango rendering

tim Rowledge tim at rowledge.org
Mon Aug 11 19:06:49 UTC 2014

On 23-07-2014, at 12:59 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> But I'd say you should put squeakToUtf8 sends in the primitive call code and if the repeated conversion is actually slowing things down then replace the strings by some encoded thing which would return self in response to that message.

After a lot of wondering and wandering around code I ended up just doing the conversion each time the prim(s) is called. Interestingly, on a Pi and with the fairly high degree of caching of resultant bitmaps used in Scratch there isn’t any noticeable impact on typing performance. 

As a way to decide when Pango rendering is used I settled upon a new font class and made sure it all went via the font; so I can have Scratch using Pango fonts and the dev tools using ‘normal’ fonts without the confusion in old Scratch images. There’s good arguments for also bringing wide/byte stringiness into it so that any latin-1 compatible string uses our normal code but right now it all looks ok.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: VMB: Verify, then Make Bad

More information about the Squeak-dev mailing list