
                                  gltt 1.0

                      Copyright (C) 1998 Stephane Rehel

Last modified: January 20 1998

----------------------------------------------------------------------------
Official Site
----------------------------------------------------------------------------

  http://home.worldnet.fr/~rehel/gltt/gltt.html

----------------------------------------------------------------------------
Author
----------------------------------------------------------------------------

  Stephane Rehel, rehel@worldnet.fr

----------------------------------------------------------------------------
What it does
----------------------------------------------------------------------------

  gltt is a library that allows you to read and draw TrueType fonts in
  any OpenGL application.
  It supports bitmap'ed font drawing as well as vectorized and polygonized
  drawing.

----------------------------------------------------------------------------
What you need
----------------------------------------------------------------------------

  You need the OpenGL library.
  For more information about OpenGL, check out http://www.opengl.org
  This library has been developed under Linux with Mesa.
    (Mesa site: http://www.ssec.wisc.edu/~brianp/Mesa.html)

  You also need the FreeType library. The official site of FreeType
  is: http://www.physiol.med.tu-muenchen.de/~robert/freetype.html

----------------------------------------------------------------------------
How to install it
----------------------------------------------------------------------------

  Untar the distribution file:

    tar xfvz gltt-1.0.tar.gz

  This will create the gltt-1.0/ directory.
  Untar the freetype distribution and compile it.
  Make a link from the gltt-1.0 directory to the freetype/lib directory:

    ln -s freetype/lib/ gltt-1.0/freetype

  Change to directory gltt-1.0 and run make

    cd gltt-1.0
    make

  This will build libgltt.a and the demos applications.
  The demos applications needs gltk and one TrueType sample font.

----------------------------------------------------------------------------
How to use it
----------------------------------------------------------------------------

  To create a bitmap'ed font:

       FTFace face;
       if( ! face.open("arial.ttf") )
         fatal("unable to open ttf file");
       GLTTBitmapFont font(&face);
       int point_size= 20;
       if( ! font.create(point_size) )
         fatal("unable to create bitmap'ed font");
       // ... OpenGL initialization commands...
       glColor3f(1,1,1);
       font.print( x, y, "hello bitmaped world" );

  To create an outline font (vectorized contours only):

       FTFace face;
       if( ! face.open("arial.ttf") )
         fatal("unable to open ttf file");
       GLTTOutlineFont font(&face);
       int point_size= 20;
       if( ! font.create(point_size) )
         fatal("unable to create outline font");
       // ... OpenGL initialization commands...
       glColor3f(1,1,1);
       font.print( x, y, "hello outlined world" );

  To create an plain font (plain polygonized font):

       FTFace face;
       if( ! face.open("arial.ttf") )
         fatal("unable to open ttf file");
       GLTTFont font(&face);
       int point_size= 20;
       if( ! font.create(point_size) )
         fatal("unable to create outline font");
       // ... OpenGL initialization commands...
       glColor3f(1,1,1);
       font.print( x, y, "hello plain world" );

----------------------------------------------------------------------------
How it works
----------------------------------------------------------------------------

  Read the FreeType documentation files for more information about
  the vocabulary used. (as glyph, contours, etc.)

  gltt is written in C++.
  The FT* classes don't depend on OpenGL but simply on FreeType.
  The GLTT* classes do depend on OpenGL.

  The GLTTBitmapFont, GLTTOutlineFont and GLTTFont classes act as
  font servers: they internally render only requested glyphs and
  cache them.
  BTW, the requested glyphs are put into a GL display list by
  GLTTOutlineFont and GLTTFont classes.

  You have access to the outline contour vectorization, as well as
  its tesselation. You have access to the trangles set generated
  by the glyph tesselation. (see the source code and the demo)

  No extrusion ability is provided since this feature could be
  restrictive: it is not the goal of this library. The author lets
  the user have imagination for nice extrusions!

----------------------------------------------------------------------------
Bugs.
----------------------------------------------------------------------------

  This piece of code has been written in less than one week. Only tested
  under Linux/Mesa!
  This library is distributed under the terms of the GNU Library
  General Public License, see the LICENSE file for details.

  Enjoy!
  /kepler

----------------------------------------------------------------------------
