Re: Using GLC with Pango



Hi Bertrand,

The way you typically use pango is by constructing a PangoLayout. The pango layout and its dependencies takes care of everything of the layout including RTL reorderding, font selection through the fontconfig interface, line breaking, and justification (in the latest svn version). Once you have a PangoLayout you have two options. Either you can request to have it rendered to a bitmap, e.g. through cairo, or you can access the individual freetype glyphs. For an environment like OpenGL, the latter path seems like the most logical to me. In such a case you would need to turn the font outlines into splines, which is done through a callback mechanism in the freetype library. (You may also consider giving the user access to the PangoMarkup, which gives a simple interface to different fonts, fontsizes, etc.)

You can get an example of how it is done in my program paps (.http://paps.sourceforge.net/ ). See the draw_bezier_outline() function in libpaps.c , which traverses the font outlines. You just need to redefine the callback functions so that they call the appropriate OpenGL functions instead.

Hope this helps.

Regards,
Dov


On 10/14/07, Bertrand Coconnier <bcoconni club-internet fr > wrote:
Hi all,

I am the developper of QuesoGLC, a free implementation of SGI's GLC library (an
OpenGL character renderer). See http://quesoglc.sourceforge.net

QuesoGLC's main purpose is to render characters (using OpenGL) but not to
provide text layout management. From GLC's point of view, layout services are
provided by libraries like Pango. My concern is how to interface smoothly
QuesoGLC with Pango ?

I parsed Pango's web site but I could not figure out where the layout management
ends and where the rendering task begins. I mean, should QuesoGLC support
right-to-left rendering or does Pango sort out the characters so that they can
be rendered left-to-right ? The same for vertical rendering ? Should QuesoGLC
support all Unicode features (including the BiDi algorithm and/or the various
normalizations) or does Pango take care of it ? Etc...

Genrally speaking, my question is what are the mimimal services that should be
provided by QuesoGLC in order to render correctly the layout performed by Pango ?

Regards,

Bertrand.
_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]