Hi Csaba,

On 7/1/07, Csaba Halász <[EMAIL PROTECTED]> wrote:
While working on the flightgear project I have noticed that truetype
fonts sometimes look better if they are rendered in monochrome by the
freetype library.

I'm curious which fonts, and at what on screen sizes does bitmap look
better than greyscale?


Attached patch contains my preliminary
implementation.

Could you post complete files in future, they are better for review at my end.

Obviously a flag should be added to select render
method, but I have no idea where it fits into the osg framework.
Please help me with this.

The way to pass extra controls into a plugin is via the
ReaderWriter::Options object that is passed into all calls to
ReaderWriter::read*() methods.  The OpenFlight plugin is a good
example of this use of Options.

Any other comments are welcome as well (a better way to unpack the 1
bpp bitmap returned by freetype, for example).

We could possible store the image data directly as a bitmap.  Note the
call in FreeTypeFont.cpp:

   glyph->setImage(width,height,1,
                   GL_ALPHA,
                   GL_ALPHA,GL_UNSIGNED_BYTE,
                   data,
                   osg::Image::USE_NEW_DELETE,
                   1);

This could possible be tweaked to allocated a bitmap.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to