Subject: Re: On rendering (Re: Pango will be a problem)
From: Leonard Rosenthol (leonardr@lazerware.com)
Date: Thu Jan 04 2001 - 16:21:34 CST
At 8:39 PM +0000 1/4/01, Tomas Frydrych wrote:
>I suspect that this is actually not going to be at all easy even if
>they are willing.
If enough changes can be made to Pango, it should work fine.
> 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.
>Just to illustrate this with a trivial example, say that 'abcd'
>is a word in a language X, which also stipulates that b and d at the
>end of a word have to be rendered as B and D.
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. No
different than calling OS routines.
>Now say that the
>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.
Think of Pango (and similar things) as a "mini AbiWord" that
only knows about Paragraphs. It has all the smarts necessary to
render multilingual (Unicode-based) multi-styled text, including text
wrap (and word breaking), etc. So you just create a "paragraph"
(which includes all the text and style runs) and then tell Pango
(etc.) to render.
Leonard
-- ---------------------------------------------------------------------------- You've got a SmartFriend in Pennsylvania ---------------------------------------------------------------------------- Leonard Rosenthol Internet: leonardr@lazerware.com America Online: MACgician Web Site: <http://www.lazerware.com/> FTP Site: <ftp://ftp.lazerware.com/> PGP Fingerprint: C76E 0497 C459 182D 0C6B AB6B CA10 B4DF 8067 5E65
This archive was generated by hypermail 2b25 : Thu Jan 04 2001 - 16:28:10 CST