Product Manager 3D
Email : gtomlinson @ overwatch.textron.com
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651
"Self defence is not a function of learning tricks
but is a function of how quickly and intensely one
can arouse one's instinct for survival"
- Master Tambo Tetsura
[mailto:] On Behalf Of Jeremy
Sent: Wednesday, February 04, 2009 3:15 PM
Subject: osgPango (Stop Worrying & Love The Bomb)
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:
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.
Same as the above screenshot, except that the paragraph width is
shortened and there are now +1, +1 drop shadows (their offset is
Here we change our alignment to RIGHT and add 1px black outlines to the
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
The main osgPango website is here:
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
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).
Post generated by Mail2Forum