Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members
OGLFT::Solid Class Reference
Render text as solid letters.
More...
#include <OGLFT.h>
Inheritance diagram for OGLFT::Solid::
List of all members.
Public Methods |
| Solid (const char *filename, float point_size=12, FT_UInt resolution=100) |
| Solid (FT_Face face, float point_size=12, FT_UInt resolution=100) |
| ~Solid (void) |
void | setDepth (double depth) |
double | depth (void) const |
Detailed Description
Render text as solid letters.
Each glyph is drawn as a closed solid. The contours are extracted from the font file through FreeType. FreeType is used to scale the contours to the given size. The contours are passed to the GLE tubing and extrusion library to create the sides of the solid. Then the GLU tessellation routines are used to tessellate the contours into polygons which are used to cap the sides.
Currently, the solids are drawn only in the foreground color. However, proper surface normals are computed so that the solids may be lighted. Eventually, you'll be able to supply a color/texture coordinate function to make glyphs more interesting. Note that you can use the per-glyph display list functionality to alter each glyph individually.
Another TODO item is to improve the interaction with GLE. Currently, you can only create block solids. Eventually, we'll have the capability add bevels and rounds to the edges of the solids and maybe even more general extrusions (like, for example, the swooshing letters in the title sequence of the Salkind's 1978 "Superman" movie).
The only complexity to this style is selecting the point size. Since the glyphs are drawn as a collection of polygons, they are subject to the viewing and modeling transformations. The point size is nominally chosen to be the same as a raster image generated at the given resolution. Some experimentation with point size and resolution may be necessary to achieve the desired results.
Constructor & Destructor Documentation
OGLFT::Solid::Solid (
|
const char * filename,
|
|
float point_size = 12,
|
|
FT_UInt resolution = 100 )
|
|
|
-
Parameters:
-
file
|
the filename which contains the font face. |
point_size
|
the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12. |
resolution
|
the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI. |
|
OGLFT::Solid::Solid (
|
FT_Face face,
|
|
float point_size = 12,
|
|
FT_UInt resolution = 100 )
|
|
|
-
Parameters:
-
face
|
open FreeType FT_Face. |
point_size
|
the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12. |
resolution
|
the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI. |
|
OGLFT::Solid::~Solid (
|
void )
|
|
|
The destructor doesn't do anything in particular. |
Member Function Documentation
double OGLFT::Solid::depth (
|
void ) const [inline]
|
|
|
-
Returns:
-
the solid extrusion depth.
|
void OGLFT::Solid::setDepth (
|
double depth )
|
|
|
Set the thickness of the solid -
Parameters:
-
depth
|
thickness of the solid in model units. |
|
The documentation for this class was generated from the following files:
Generated at Fri Jul 12 10:47:16 2002 for OGLFT by
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001