[Etoys] pangoRenderer

K. K. Subramaniam subbukk at gmail.com
Sun Oct 19 21:33:57 EDT 2008

On Saturday 18 Oct 2008 11:51:35 am Yoshiki Ohshima wrote:
> > Locale is a poor determinant of rendering method. I would expect the
> > method to be text style tag rather than spread all over the place like
> > this. The current approach seems to add complexity to an already complex
> > issue of multilingual text.
>   What is text style tag?
I meant an attribute associated with a piece of text (e.g. strong, emphasis, 
language, script, glyph variant) rather than the global environment. Notice 
how Project>>displayProgressWithJump has to turn usePango to false to display 
jumping guy.

>   and what do you mean by spread all over the 
> place?
I meant the low-level rendering mechanism has leaked into higher level 
methods. Pango is just one of the many rendering methods in Linux and needs 
to be encapsulated within a rendering facade. The global usePango check is 
called from methods in LanguageEnvironment, Locale. If methods like 
StringMorph>>measureContents has to compute width by checking for every 
possible rendering method, then the complexity will soon get out of hand.

> > Did I miss something? .. Subbu
>   But, at the same time, the current implementation was done too
> quickly for the 8.2 release, and not great.  We should surely fix it.
I understand the pressures and the issue gets quite complicated once you move 
beyond Latin-1 text. My concern was about lack of encapsulation and the 
proliferation of usePango and checks. Given XO's global deployment scenario, 
the code should be ready to take on different renderers. Can't we build upon 
TeX's approach of separating laying out text and rendering glyphs?


More information about the Etoys mailing list