[cairo] Cairo + Pango
Jost Boekemeier
jost2345 at yahoo.de
Sat Aug 7 10:17:42 PDT 2004
Hi,
I really have a hard time designing a retained
interface which works with the current cairo font
implementation as well as with pango.
My initial idea was to add a (*draw_glyph)() function
to the shape's drawing context which accepts a
surface, the x/y position and the glyph size. How the
client creates the glyphs and iterates over them is
the client's problem.
This will work, but is not very useful for the user.
At least I have to provide a "default" method which
emulates the current cairo behaviour.
The problem will be that we have essentially the same
code in three different places, in cairo, in the
retained mode implementation above and in pango.
Since cairo is now GPL, what about nuking the cairo
font implementation completely and integrate pango? --
The cairo implemetation is a toy anyway because you
cannot pass special render flags to it
An alternative would be to pull all the implementation
details (such as the glyph cache, advance to the next
position) out of cairo and expose only a single
function to let the user inject one glyph after the
other into cairo (cairo cannot calculate the next
glyph position itself because it doesn't have the
necessary information, for example special flags that
group glyphs closer together).
Jost
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
More information about the cairo
mailing list