[Etoys] pangoRenderer
Yoshiki Ohshima
yoshiki at vpri.org
Mon Oct 20 09:41:25 EDT 2008
At Mon, 20 Oct 2008 07:03:57 +0530,
K. K. Subramaniam wrote:
>
> 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.
Well, yeah they do have the flag. But there should be a way to
switch them globally.
> > 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.
That is a valid concern. A library/platform neutral interface to
these renderer would be a good idea.
> > 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.
Yes.
> Can't we build upon
> TeX's approach of separating laying out text and rendering glyphs?
That is yet another part of the topic, but it would be good.
-- Yoshiki
More information about the Etoys
mailing list