Just awesome !!!!

Jeremy Moles wrote:
Hello all. Before I start hacking on osgWidget again full force (in
preparation for OSG-2.9 or OSG-3.0) I wanted to continue peddling my
wares here and generating interest in a different (BUT RELATED) project
of mine called osgPango.

Basically, I'm writing osgPango to achieve the following (in order):

        1. TOP quality 2D fonts in OSG on all supported platforms.
        2. A sophisticated layout/markup system for complicated text.
        3. An extensible rendering backend that lets users create
           callbacks for the actual "rendering" of the font character.
        4. Speed, speed, and more speed.
        5. Clean and intuitive API that exposes all elements of a body
           of text (the position of each character, etc.)

Goals 1, 2, and 3 are accomplished; 4 and 5 are debatable. Lets get
started with some obligatory screenshots:

        http://cubicool.plopbyte.net/osgPango-normal.png

Here is some undecorated text (no shadows or outlines) showing one of
Robert's posts from earlier this week. Notice how the text is justified
to a certain width, and that it is no problem for osgPango to change
font style or color midway through a sentence or word! Also notice the
font quality, where no character is missing a pixel on any side and
straight vertical lines are sharp and not "smudged" along two pixels.

        http://cubicool.plopbyte.net/osgPango-shadow.png

Same as the above screenshot, except that the paragraph width is
shortened and there are now +1, +1 drop shadows (their offset is
configurable).

        http://cubicool.plopbyte.net/osgPango-outline.png

Here we change our alignment to RIGHT and add 1px black outlines to the
fonts.

I'd like to get other people who need high-quality 2D fonts to start
keeping an eye on osgPango so I can start seeing how folks want to use
and extend it's feature set (where possible). I've tested it personally
on Linux and Vista 64, but I'd need someone else to try it on Mac.

(As an aside, it should use the ATSUI backend on Mac, giving some pretty
nice font quality! It uses FreeType on Linux and ClearType on Windows;
to get it compile on Windows I simply used the binaries from the GTK
project)

The main osgPango website is here:

        http://osgpango.googlecode.com

It won't be long before I consider it done (for me) and move back to
osgWidget and start helping more with osgAnimation, so let me know soon
if you're interested and need it to do something it doesn't. :)

With time I hope to be able to get osgPango in the core and replace
osgText, but we'll have to see. :) The advanced layout powers and
pluggable rendering backends are two things it would be VERY hard to add
to osgText.

As far as speed is concerned, osgPango is currently just as fast as
osgText for most normal usage, though obviously every time you change
font families or color or size you introduce a state change. :)
Placeholder code is also in place for someone to add a GLSL shader to do
the multitexturing instead of the complicated osg::TexEnvCombine()
object I currently use, and I'm sure we'd see some significant speed
increases there as well (when effects are used or desired).

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:morni...@plopbyte.net 
http://www.plopbyte.net


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to