com.partnersoft.gui
Class GLVectorFontLib

java.lang.Object
  extended by com.partnersoft.gui.GLVectorFontLib

public class GLVectorFontLib
extends java.lang.Object

The basic idea is that we would like to render vector fonts as meshes in OpenGL, mainly because font bitmaps are too cumbersome to keep track of. (Are they?) The complexity in font rendering comes from the very specific problem of rendering text, which has to look right to our eyes, and rendering it on very low-resolution monitors. Faced with a tiny amount of pixels to express subtle serifs and holes and proportions and what have you, font designers have resorted to making point- and pixel-specific rendering commands for each font. This means that a well-designed font like Times New Roman will have rendering hints for rendering at 8 points, 10 points, and so on. To take advantage of a font's rendering hints, you have to tell the font what point size you're rendering the font at and what letters you're drawing. You get back a mesh fitted for drawing a font as well as it can be drawn for your specific point size.

Author:
Russell Cagle Copyright 2005 Partner Software, Inc.

Constructor Summary
GLVectorFontLib()
           
 
Method Summary
static Mesh tessellateText(java.awt.Font font, javax.media.opengl.glu.GLU glu, char[] chars)
          Returns a Mesh for drawing the text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLVectorFontLib

public GLVectorFontLib()
Method Detail

tessellateText

public static Mesh tessellateText(java.awt.Font font,
                                  javax.media.opengl.glu.GLU glu,
                                  char[] chars)
Returns a Mesh for drawing the text.