On rendering and reworking the AW backend


Subject: On rendering and reworking the AW backend
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Fri Jan 05 2001 - 05:01:47 CST


> > Rendering text that uses formating is not all
> >straight forward, and certainly it is not possible to simply replace
> >normal text drawing routines with one's that use a rendering
> >engine.
> Sure it is - at least if you can pass enough info (or get
> enough info back) from your rendering engine.
>
I obviously did not express myself clearly here. By 'replace' I meant
you cannot simply expect to be able to render by merely linking to
a new version of your GUI libraries that are capable of rendering,
because the API will have to be different and more complex than
the existing API we are using at present

> OK, that information is encoded in the information you pass
> to the rendering engine, just as it is in the information that you
> pass to the OS. You have a "code point" and potentially a "context"
> - those get converted from your internal storage format to the one
> used by the rendering engine and then the engine renders.

Precisely; when your existing application was designed without
redenrring in mind, implementing the 'conversion' is not going to be
an entirely trivial task.

> >user decides to make c bold. Thus in AW 'abcd' would become 3
> >runs, each calling the GUI toolkit to draw itself, and this is where
> >we get into trouble.
> Why? In the rendering engine, you would do the same things -
> create three "runs" and then ask the engine to render.

No, it is not the same thing. The fundamental difference is that in
the latter case all the information the engine needs is readily
available to it, because the engine handles the 'raw' text, so that
you really only need to ask it to draw. On the other hand, if the
engine is external to the code that handles the raw text, you
cannot just ask it, you have to provide it with additional information
before it can draw. The point I am trying to make is that such an
information is not readily available in AW at present, and it will
require substantial work, whether you decide to replace our exising
block handling mechanism with Pango itself, or to patch a
rendering engine into it in some other way.

All I am concerned with is that the amount of work that integrating
a rendering engine into AW will take would not be underestimated.
These issues should have been really thought through before the
AW backend was designed and I am inclined to think that if we are
serious about this, we should start dealing with it before any major
rewrite of the AW back end.

Tomas

*********************************************
tomas@frydrych.net / www.frydrych.net
PGP keys: http://www.frydrych.net/contact.html



This archive was generated by hypermail 2b25 : Fri Jan 05 2001 - 05:06:43 CST