Many updates from John Fay.
authorDon Heyse <dheyse@hotmail.com>
Thu, 28 Nov 2002 23:26:17 +0000 (23:26 +0000)
committerDon Heyse <dheyse@hotmail.com>
Thu, 28 Nov 2002 23:26:17 +0000 (23:26 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@31 7f0cb862-5218-0410-a997-914c9d46530a

14 files changed:
freeglut-1.3/freeglut_callbacks.c
freeglut-1.3/freeglut_cursor.c
freeglut-1.3/freeglut_font.c
freeglut-1.3/freeglut_font_data.c
freeglut-1.3/freeglut_gamemode.c
freeglut-1.3/freeglut_init.c
freeglut-1.3/freeglut_main.c
freeglut-1.3/freeglut_menu.c
freeglut-1.3/freeglut_misc.c
freeglut-1.3/freeglut_state.c
freeglut-1.3/freeglut_stroke_mono_roman.c
freeglut-1.3/freeglut_stroke_roman.c
freeglut-1.3/freeglut_structure.c
freeglut-1.3/freeglut_window.c

index 743077a..129a4cd 100644 (file)
@@ -182,8 +182,8 @@ void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int
     fgStructure.Window->State.JoystickLastPoll =
         fgElapsedTime() - fgStructure.Window->State.JoystickPollRate;
 
-    if( fgStructure.Window->State.JoystickLastPoll < 0.0 )
-        fgStructure.Window->State.JoystickLastPoll = 0.0;
+    if( fgStructure.Window->State.JoystickLastPoll < 0 )
+        fgStructure.Window->State.JoystickLastPoll = 0;
 }
 
 /*
@@ -219,6 +219,19 @@ void FGAPIENTRY glutEntryFunc( void (* callback)( int ) )
 }
 
 /*
+ * Window destruction callbacks
+ */
+void FGAPIENTRY glutCloseFunc( void (* callback)( void ) )
+{
+    SET_CALLBACK( Destroy );
+}
+
+void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) )
+{
+    glutCloseFunc( callback );
+}
+
+/*
  * Deprecated version of glutMenuStatusFunc callback setting method
  */
 void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) )
index 900e1c9..53ce750 100644 (file)
@@ -43,7 +43,6 @@
  *
  *  fgDisplayCursor()   -- this waits for better times
  *  glutSetCursor()     -- both X and Win32 mappings are incomplete
- *  glutWarpPointer()   -- check the Win32 version
  *
  * It would be good to use custom mouse cursor shapes, and introduce
  * an option to display them using glBitmap() and/or texture mapping,
@@ -112,7 +111,14 @@ void FGAPIENTRY glutSetCursor( int cursorID )
        /*
         * This is a temporary solution only...
         */
-#      define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); break;
+       // Set the cursor AND change it for this window class. 
+#      define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); \
+        SetClassLong(fgStructure.Window->Window.Handle,GCL_HCURSOR,(LONG)LoadCursor(NULL,b)); \
+        break;
+       // Nuke the cursor AND change it for this window class. 
+#      define ZAP_CURSOR(a,b) case a: SetCursor( NULL ); \
+        SetClassLong(fgStructure.Window->Window.Handle,GCL_HCURSOR,(LONG)NULL); \
+        break;
 
        switch( cursorID )
        {
@@ -126,10 +132,11 @@ void FGAPIENTRY glutSetCursor( int cursorID )
                MAP_CURSOR( GLUT_CURSOR_WAIT,            IDC_WAIT      );
                MAP_CURSOR( GLUT_CURSOR_TEXT,        IDC_UPARROW   );
                MAP_CURSOR( GLUT_CURSOR_CROSSHAIR,   IDC_CROSS     );
-               MAP_CURSOR( GLUT_CURSOR_NONE,        IDC_NO                );
+               //MAP_CURSOR( GLUT_CURSOR_NONE,        IDC_NO              );
+               ZAP_CURSOR( GLUT_CURSOR_NONE,        NULL          );
 
                default:
-               MAP_CURSOR( GLUT_CURSOR_UP_DOWN,         IDC_UPARROW   );
+               MAP_CURSOR( GLUT_CURSOR_UP_DOWN,     IDC_ARROW     );
        }
 
 #endif
index 59d70eb..20bbed4 100644 (file)
@@ -37,8 +37,7 @@
 /*
  * TODO BEFORE THE STABLE RELEASE:
  *
- *  glutStrokeCharacter()       -- stroke fonts not implemented, uses a bitmap font instead
- *  glutStrokeWidth()           -- stroke fonts not implemented, uses a bitmap font instead
+ *  Test things out ...
  */
 
 /* -- IMPORT DECLARATIONS -------------------------------------------------- */
@@ -60,15 +59,15 @@ extern SFG_StrokeFont fgStrokeMonoRoman;
  * This is for GLUT binary compatibility, as suggested by Steve Baker
  */
 #if TARGET_HOST_UNIX_X11
-    void* glutStrokeRoman;
-    void* glutStrokeMonoRoman;
-    void* glutBitmap9By15;
-    void* glutBitmap8By13;
-    void* glutBitmapTimesRoman10;
-    void* glutBitmapTimesRoman24;
-    void* glutBitmapHelvetica10;
-    void* glutBitmapHelvetica12;
-    void* glutBitmapHelvetica18;
+  void* glutStrokeRoman;
+  void* glutStrokeMonoRoman;
+  void* glutBitmap9By15;
+  void* glutBitmap8By13;
+  void* glutBitmapTimesRoman10;
+  void* glutBitmapTimesRoman24;
+  void* glutBitmapHelvetica10;
+  void* glutBitmapHelvetica12;
+  void* glutBitmapHelvetica18;
 #endif
 
 
@@ -80,23 +79,23 @@ extern SFG_StrokeFont fgStrokeMonoRoman;
  */
 static SFG_Font* fghFontByID( void* font )
 {
-    /*
-     * Try matching the font ID and the font data structure
-     */
-    if( font == GLUT_BITMAP_8_BY_13        ) return( &fgFontFixed8x13    );
-    if( font == GLUT_BITMAP_9_BY_15        ) return( &fgFontFixed9x15    );
-    if( font == GLUT_BITMAP_HELVETICA_10   ) return( &fgFontHelvetica10  );
-    if( font == GLUT_BITMAP_HELVETICA_12   ) return( &fgFontHelvetica12  );
-    if( font == GLUT_BITMAP_HELVETICA_18   ) return( &fgFontHelvetica18  );
-    if( font == GLUT_BITMAP_TIMES_ROMAN_10 ) return( &fgFontTimesRoman10 );
-    if( font == GLUT_BITMAP_TIMES_ROMAN_24 ) return( &fgFontTimesRoman24 );
-
-    /*
-     * This probably is the library user's fault
-     */
-    fgError( "font 0x%08x not found", font );
-
-    return 0;
+  /*
+   * Try matching the font ID and the font data structure
+   */
+  if( font == GLUT_BITMAP_8_BY_13        ) return( &fgFontFixed8x13    );
+  if( font == GLUT_BITMAP_9_BY_15        ) return( &fgFontFixed9x15    );
+  if( font == GLUT_BITMAP_HELVETICA_10   ) return( &fgFontHelvetica10  );
+  if( font == GLUT_BITMAP_HELVETICA_12   ) return( &fgFontHelvetica12  );
+  if( font == GLUT_BITMAP_HELVETICA_18   ) return( &fgFontHelvetica18  );
+  if( font == GLUT_BITMAP_TIMES_ROMAN_10 ) return( &fgFontTimesRoman10 );
+  if( font == GLUT_BITMAP_TIMES_ROMAN_24 ) return( &fgFontTimesRoman24 );
+
+  /*
+   * This probably is the library user's fault
+   */
+  fgError( "font 0x%08x not found", font );
+
+  return 0;
 }
 
 /*
@@ -105,18 +104,18 @@ static SFG_Font* fghFontByID( void* font )
  */
 static SFG_StrokeFont* fghStrokeByID( void* font )
 {
-    /*
-     * Try matching the font ID and the font data structure
-     */
-    if( font == GLUT_STROKE_ROMAN ) return( &fgStrokeRoman );
-    if( font == GLUT_STROKE_MONO_ROMAN ) return( &fgStrokeMonoRoman );
-
-    /*
-     * This probably is the library user's fault
-     */
-    fgError( "stroke font 0x%08x not found", font );
-
-    return 0;
+  /*
+   * Try matching the font ID and the font data structure
+   */
+  if( font == GLUT_STROKE_ROMAN      ) return( &fgStrokeRoman     );
+  if( font == GLUT_STROKE_MONO_ROMAN ) return( &fgStrokeMonoRoman );
+
+  /*
+   * This probably is the library user's fault
+   */
+  fgError( "stroke font 0x%08x not found", font );
+
+  return 0;
 }
 
 
@@ -127,60 +126,117 @@ static SFG_StrokeFont* fghStrokeByID( void* font )
  */
 void FGAPIENTRY glutBitmapCharacter( void* fontID, int character )
 {
-    const GLubyte* face;
-
-    /*
-     * First of all we'll need a font to use
-     */
-    SFG_Font* font = fghFontByID( fontID );
-
-    /*
-     * Make sure the character we want to output is valid
-     */
-    freeglut_return_if_fail( character >= 0 && character < 256 );
-
-    /*
-     * Then find the character we want to draw
-     */
-    face = font->Characters[ character - 1 ];
-
-    /*
-     * Save the old pixel store settings
-     */
-    glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
-
-    /*
-     * Set up the pixel unpacking ways
-     */
-    glPixelStorei( GL_UNPACK_SWAP_BYTES,  GL_FALSE );
-    glPixelStorei( GL_UNPACK_LSB_FIRST,   GL_FALSE );
-    glPixelStorei( GL_UNPACK_ROW_LENGTH,  0        );
-    glPixelStorei( GL_UNPACK_SKIP_ROWS,   0        );
-    glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0        );
-    glPixelStorei( GL_UNPACK_ALIGNMENT,   1        );
-
-    /*
-     * We'll use a glBitmap call to draw the font.
-     */
-    glBitmap(
-        face[ 0 ], font->Height,    /* The bitmap's width and height */
-        0, 0,                       /* The origin -- what the hell?  */
-        face[ 0 ] + 1, 0,           /* The raster advance -- inc. x  */
-        (face + 1)                  /* The packed bitmap data...     */
-    );
-
-    /*
-     * Restore the old pixel store settings
-     */
-    glPopClientAttrib();
+  const GLubyte* face;
+
+  /*
+   * First of all we'll need a font to use
+   */
+  SFG_Font* font = fghFontByID( fontID );
+
+  /*
+   * Make sure the character we want to output is valid
+   */
+  freeglut_return_if_fail( character >= 0 && character < 256 );
+
+  /*
+   * Then find the character we want to draw
+   */
+  face = font->Characters[ character - 1 ];
+
+  /*
+   * Save the old pixel store settings
+   */
+  glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
+
+  /*
+   * Set up the pixel unpacking ways
+   */
+  glPixelStorei( GL_UNPACK_SWAP_BYTES,  GL_FALSE );
+  glPixelStorei( GL_UNPACK_LSB_FIRST,   GL_FALSE );
+  glPixelStorei( GL_UNPACK_ROW_LENGTH,  0        );
+  glPixelStorei( GL_UNPACK_SKIP_ROWS,   0        );
+  glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0        );
+  glPixelStorei( GL_UNPACK_ALIGNMENT,   1        );
+
+  /*
+   * We'll use a glBitmap call to draw the font.
+   */
+  glBitmap(
+      face[ 0 ], font->Height,      /* The bitmap's width and height */
+      font->xorig, font->yorig,     /* The origin -- what on earth?  */
+      (float)(face[ 0 ] + 1), 0.0,  /* The raster advance -- inc. x  */
+      (face + 1)                    /* The packed bitmap data...     */
+  );
+
+  /*
+   * Restore the old pixel store settings
+   */
+  glPopClientAttrib();
 }
 
 void FGAPIENTRY glutBitmapString( void* fontID, const char *string )
 {
-    int i;
+  int c;
+  int numchar = strlen ( string ) ;
+
+  /*
+   * First of all we'll need a font to use
+   */
+  SFG_Font* font = fghFontByID( fontID );
+
+  float raster_position[4] ;
+  glGetFloatv ( GL_CURRENT_RASTER_POSITION, raster_position ) ;
+
+  /*
+   * Save the old pixel store settings
+   */
+  glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
+
+  /*
+   * Set up the pixel unpacking ways
+   */
+  glPixelStorei( GL_UNPACK_SWAP_BYTES,  GL_FALSE );
+  glPixelStorei( GL_UNPACK_LSB_FIRST,   GL_FALSE );
+  glPixelStorei( GL_UNPACK_ROW_LENGTH,  0        );
+  glPixelStorei( GL_UNPACK_SKIP_ROWS,   0        );
+  glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0        );
+  glPixelStorei( GL_UNPACK_ALIGNMENT,   1        );
+
+  /*
+   * Step through the string, drawing each character.
+   * A carriage return will simply translate the next character's insertion point back to the
+   * start of the line and down one line.
+   */
+  for( c = 0; c < numchar; c++ )
+  {
+    if ( ( string[ c ] >= 0 ) && ( string[ c ] < 256 ) )
+    {
+      if ( string[c] == '\n' )
+      {
+        raster_position[1] -= (float)font->Height ;
+        glRasterPos4fv ( raster_position ) ;
+      }
+      else  /* Not a carriage return, draw the bitmap character */
+      {
+        const GLubyte* face = font->Characters[ string[ c ] - 1 ] ;
+
+        /*
+         * We'll use a glBitmap call to draw the font.
+         */
+        glBitmap(
+            face[ 0 ], font->Height,      /* The bitmap's width and height */
+            font->xorig, font->yorig,     /* The origin -- what on earth?  */
+            (float)(face[ 0 ] + 1), 0.0,  /* The raster advance -- inc. x  */
+            (face + 1)                    /* The packed bitmap data...     */
+        ) ;
+      }
+    }
+  }
 
-    for( i=0; i<strlen( string ); i++ )
-        glutBitmapCharacter( fontID, string[ i ] );
+  /*
+   * Restore the old pixel store settings
+   */
+  glPopClientAttrib();
 }
 
 /*
@@ -188,20 +244,74 @@ void FGAPIENTRY glutBitmapString( void* fontID, const char *string )
  */
 int FGAPIENTRY glutBitmapWidth( void* fontID, int character )
 {
-    /*
-     * First of all, grab the font we need
-     */
-    SFG_Font* font = fghFontByID( fontID );
+  /*
+   * First of all, grab the font we need
+   */
+  SFG_Font* font = fghFontByID( fontID );
+
+  /*
+   * Make sure the character we want to output is valid
+   */
+  freeglut_return_val_if_fail( character > 0 && character < 256, 0 );
+
+  /*
+       * Scan the font looking for the specified character
+   */
+  return( *(font->Characters[ character - 1 ]) + 1 );
+}
 
-    /*
-     * Make sure the character we want to output is valid
-     */
-    freeglut_return_val_if_fail( character > 0 && character < 256, 0 );
+/*
+ * Return the width of a string drawn using a bitmap font
+ */
+int FGAPIENTRY glutBitmapLength( void* fontID, const char* string )
+{
+  int c, length = 0, this_line_length = 0;
+
+  /*
+   * First of all, grab the font we need
+   */
+  SFG_Font* font = fghFontByID( fontID );
+
+  /*
+   * Step through the characters in the string, adding up the width of each one
+   */
+  int numchar = strlen ( string ) ;
+  for( c = 0; c < numchar; c++ )
+  {
+    if ( ( string[ c ] >= 0 ) && ( string[ c ] < 256 ) )
+    {
+      if ( string[ c ] == '\n' )  /* Carriage return, reset the length of this line */
+      {
+        if ( length < this_line_length ) length = this_line_length ;
+        this_line_length = 0 ;
+      }
+      else  /* Not a carriage return, increment the length of this line */
+        this_line_length += *(font->Characters[ string[ c ] - 1 ]) + 1 ;
+    }
+  }
 
-    /*
-         * Scan the font looking for the specified character
-     */
-    return( *(font->Characters[ character - 1 ]) + 1 );
+  if ( length < this_line_length ) length = this_line_length ;
+
+  /*
+   * Return the result now
+   */
+  return( length );
+}
+
+/*
+ * Returns the height of a bitmap font
+ */
+int FGAPIENTRY glutBitmapHeight( void* fontID )
+{
+  /*
+   * See which font are we queried about
+   */
+  SFG_Font* font = fghFontByID( fontID );
+
+  /*
+   * Return the character set's height
+   */
+  return( font->Height );
 }
 
 /*
@@ -209,78 +319,108 @@ int FGAPIENTRY glutBitmapWidth( void* fontID, int character )
  */
 void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
 {
-    const SFG_StrokeChar *schar;
-    const SFG_StrokeStrip *strip;
-    int i, j;
+  const SFG_StrokeChar *schar;
+  const SFG_StrokeStrip *strip;
+  int i, j;
 
-    /*
-     * First of all we'll need a font to use
-     */
-    SFG_StrokeFont* font = fghStrokeByID( fontID );
+  /*
+   * First of all we'll need a font to use
+   */
+  SFG_StrokeFont* font = fghStrokeByID( fontID );
 
-    /*
-     * Make sure the character we want to output is valid
-     */
-    freeglut_return_if_fail( character >= 0 && character < font->Quantity );
+  /*
+   * Make sure the character we want to output is valid
+   */
+  freeglut_return_if_fail( character >= 0 && character < font->Quantity );
 
-    schar = font->Characters[character];
+  schar = font->Characters[character];
 
-    freeglut_return_if_fail( schar );
+  freeglut_return_if_fail( schar );
 
-    strip = schar->Strips;
+  strip = schar->Strips;
 
-    for (i = 0; i < schar->Number; i++, strip++)
+  for (i = 0; i < schar->Number; i++, strip++)
+  {
+    glBegin(GL_LINE_STRIP);
+    for(j = 0; j < strip->Number; j++)
     {
-        glBegin(GL_LINE_STRIP);
-        for(j = 0; j < strip->Number; j++)
-        {
-            glVertex2f(strip->Vertices[j].X, strip->Vertices[j].Y);
-        }
-        glEnd();
+      glVertex2f(strip->Vertices[j].X, strip->Vertices[j].Y);
     }
-    glTranslatef(schar->Right, 0.0, 0.0);
+    glEnd();
+  }
+  glTranslatef(schar->Right, 0.0, 0.0);
 }
 
-/*
- * Return the width in pixels of a stroke character
- */
-int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
+void FGAPIENTRY glutStrokeString( void* fontID, const char *string )
 {
-    const SFG_StrokeChar *schar;
-    /*
-     * First of all we'll need a font to use
-     */
-    SFG_StrokeFont* font = fghStrokeByID( fontID );
-
-    /*
-     * Make sure the character we want to output is valid
-     */
-    freeglut_return_if_fail( character >= 0 && character < font->Quantity );
+  int c, i, j;
+  int numchar = strlen ( string ) ;
+  float length = 0.0 ;
+
+  /*
+   * First of all we'll need a font to use
+   */
+  SFG_StrokeFont* font = fghStrokeByID( fontID );
+
+  /*
+   * Step through the string, drawing each character.
+   * A carriage return will simply translate the next character's insertion point back to the
+   * start of the line and down one line.
+   */
+  for( c = 0; c < numchar; c++ )
+  {
+    if ( ( string[ c ] >= 0 ) && ( string[ c ] < font->Quantity ) )
+    {
+      if ( string[c] == '\n' )
+      {
+        glTranslatef ( -length, -(float)(font->Height), 0.0 ) ;
+        length = 0.0 ;
+      }
+      else  /* Not a carriage return, draw the bitmap character */
+      {
+        const SFG_StrokeChar *schar = font->Characters[string[c]];
+        if ( schar != NULL )
+        {
+          const SFG_StrokeStrip *strip = schar->Strips;
 
-    schar = font->Characters[character];
+          for (i = 0; i < schar->Number; i++, strip++)
+          {
+            glBegin(GL_LINE_STRIP);
+            for(j = 0; j < strip->Number; j++)
+              glVertex2f(strip->Vertices[j].X, strip->Vertices[j].Y);
 
-    freeglut_return_if_fail( schar );
+            glEnd();
+          }
 
-    return (schar->Right);
+          length += schar->Right ;
+          glTranslatef(schar->Right, 0.0, 0.0);
+        }
+      }
+    }
+  }
 }
 
 /*
- * Return the width of a string drawn using a bitmap font
+ * Return the width in pixels of a stroke character
  */
-int FGAPIENTRY glutBitmapLength( void* fontID, const char* string )
+int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
 {
-    int i, length = 0;
+  const SFG_StrokeChar *schar;
+  /*
+   * First of all we'll need a font to use
+   */
+  SFG_StrokeFont* font = fghStrokeByID( fontID );
 
-    /*
-     * Using glutBitmapWidth() function to calculate the result
-     */
-    for( i=0; i<strlen( string ); i++ )
-        length += glutBitmapWidth( fontID, string[ i ] );
+  /*
+   * Make sure the character we want to output is valid
+   */
+  freeglut_return_val_if_fail( character >= 0 && character < font->Quantity, 0 );
 
-    /*
-     * Return the result now
-     */
-    return( length );
+  schar = font->Characters[character];
+
+  freeglut_return_val_if_fail( schar, 0 );
+
+  return ((int)(schar->Right + 0.5));
 }
 
 /*
@@ -288,34 +428,43 @@ int FGAPIENTRY glutBitmapLength( void* fontID, const char* string )
  */
 int FGAPIENTRY glutStrokeLength( void* fontID, const char* string )
 {
-    int i, length = 0;
-
-    /*
-     * Using glutStrokeWidth() function to calculate the result
-     */
-    for( i=0; i<strlen( string ); i++ )
-        length += glutStrokeWidth( fontID, string[ i ] );
-
-    /*
-     * Return the result now
-     */
-    return( length );
-}
+  int c;
+  float length = 0.0;
+  float this_line_length = 0.0 ;
+
+  /*
+   * First of all we'll need a font to use
+   */
+  SFG_StrokeFont* font = fghStrokeByID( fontID );
+
+  /*
+   * Step through the characters in the string, adding up the width of each one
+   */
+  int numchar = strlen ( string ) ;
+  for( c = 0; c < numchar; c++ )
+  {
+    if ( ( string[ c ] >= 0 ) && ( string[ c ] < font->Quantity ) )
+    {
+      if ( string[ c ] == '\n' )  /* Carriage return, reset the length of this line */
+      {
+        if ( length < this_line_length ) length = this_line_length ;
+        this_line_length = 0.0 ;
+      }
+      else  /* Not a carriage return, increment the length of this line */
+      {
+        const SFG_StrokeChar *schar = font->Characters[string[c]];
+        if ( schar != NULL )
+          this_line_length += schar->Right ;
+      }
+    }
+  }
 
-/*
- * Returns the height of a bitmap font
- */
-int FGAPIENTRY glutBitmapHeight( void* fontID )
-{
-    /*
-     * See which font are we queried about
-     */
-    SFG_Font* font = fghFontByID( fontID );
+  if ( length < this_line_length ) length = this_line_length ;
 
-    /*
-     * Return the character set's height
-     */
-    return( font->Height );
+  /*
+   * Return the result now
+   */
+  return( (int)(length+0.5) );
 }
 
 /*
index 7747bfb..ac0473b 100644 (file)
@@ -43,8 +43,8 @@
  * 7. fgFontTimesRoman24 <-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1>
  */
 
-static const GLubyte Fixed8x13_Character_032[] = {  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_097[] = {  6,  0,  0,116,140,132,124,  4,120,  0,  0,  0,  0,  0};
+static const GLubyte Fixed8x13_Character_032[] = {  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* blank */
+static const GLubyte Fixed8x13_Character_097[] = {  6,  0,  0,116,140,132,124,  4,120,  0,  0,  0,  0,  0}; /* "a" */
 static const GLubyte Fixed8x13_Character_098[] = {  6,  0,  0,184,196,132,132,196,184,128,128,128,  0,  0};
 static const GLubyte Fixed8x13_Character_099[] = {  6,  0,  0,120,132,128,128,132,120,  0,  0,  0,  0,  0};
 static const GLubyte Fixed8x13_Character_100[] = {  6,  0,  0,116,140,132,132,140,116,  4,  4,  4,  0,  0};
@@ -69,8 +69,8 @@ static const GLubyte Fixed8x13_Character_119[] = {  7,  0,  0, 68,170,146,146,13
 static const GLubyte Fixed8x13_Character_118[] = {  5,  0,  0, 32, 80, 80,136,136,136,  0,  0,  0,  0,  0};
 static const GLubyte Fixed8x13_Character_120[] = {  6,  0,  0,132, 72, 48, 48, 72,132,  0,  0,  0,  0,  0};
 static const GLubyte Fixed8x13_Character_121[] = {  6,120,132,  4,116,140,132,132,132,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_122[] = {  6,  0,  0,252, 64, 32, 16,  8,252,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_065[] = {  6,  0,  0,132,132,132,252,132,132,132, 72, 48,  0,  0};
+static const GLubyte Fixed8x13_Character_122[] = {  6,  0,  0,252, 64, 32, 16,  8,252,  0,  0,  0,  0,  0}; /* "z" */
+static const GLubyte Fixed8x13_Character_065[] = {  6,  0,  0,132,132,132,252,132,132,132, 72, 48,  0,  0}; /* "A" */
 static const GLubyte Fixed8x13_Character_066[] = {  7,  0,  0,252, 66, 66, 66,124, 66, 66, 66,252,  0,  0};
 static const GLubyte Fixed8x13_Character_067[] = {  6,  0,  0,120,132,128,128,128,128,128,132,120,  0,  0};
 static const GLubyte Fixed8x13_Character_068[] = {  7,  0,  0,252, 66, 66, 66, 66, 66, 66, 66,252,  0,  0};
@@ -95,8 +95,8 @@ static const GLubyte Fixed8x13_Character_087[] = {  7,  0,  0, 68,170,146,146,14
 static const GLubyte Fixed8x13_Character_086[] = {  7,  0,  0, 16, 40, 40, 40, 68, 68, 68,130,130,  0,  0};
 static const GLubyte Fixed8x13_Character_088[] = {  7,  0,  0,130,130, 68, 40, 16, 40, 68,130,130,  0,  0};
 static const GLubyte Fixed8x13_Character_089[] = {  7,  0,  0, 16, 16, 16, 16, 16, 40, 68,130,130,  0,  0};
-static const GLubyte Fixed8x13_Character_090[] = {  6,  0,  0,252,128,128, 64, 32, 16,  8,  4,252,  0,  0};
-static const GLubyte Fixed8x13_Character_048[] = {  6,  0,  0, 48, 72,132,132,132,132,132, 72, 48,  0,  0};
+static const GLubyte Fixed8x13_Character_090[] = {  6,  0,  0,252,128,128, 64, 32, 16,  8,  4,252,  0,  0}; /* "Z" */
+static const GLubyte Fixed8x13_Character_048[] = {  6,  0,  0, 48, 72,132,132,132,132,132, 72, 48,  0,  0}; /* "0" */
 static const GLubyte Fixed8x13_Character_049[] = {  5,  0,  0,248, 32, 32, 32, 32, 32,160, 96, 32,  0,  0};
 static const GLubyte Fixed8x13_Character_050[] = {  6,  0,  0,252,128, 64, 48,  8,  4,132,132,120,  0,  0};
 static const GLubyte Fixed8x13_Character_051[] = {  6,  0,  0,120,132,  4,  4, 56, 16,  8,  4,252,  0,  0};
@@ -105,46 +105,57 @@ static const GLubyte Fixed8x13_Character_053[] = {  6,  0,  0,120,132,  4,  4,19
 static const GLubyte Fixed8x13_Character_054[] = {  6,  0,  0,120,132,132,196,184,128,128, 64, 56,  0,  0};
 static const GLubyte Fixed8x13_Character_055[] = {  6,  0,  0, 64, 64, 32, 32, 16, 16,  8,  4,252,  0,  0};
 static const GLubyte Fixed8x13_Character_056[] = {  6,  0,  0,120,132,132,132,120,132,132,132,120,  0,  0};
-static const GLubyte Fixed8x13_Character_057[] = {  6,  0,  0,112,  8,  4,  4,116,140,132,132,120,  0,  0};
-static const GLubyte Fixed8x13_Character_096[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0, 16, 96,224,  0,  0};
-static const GLubyte Fixed8x13_Character_126[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,144,168, 72,  0,  0};
-static const GLubyte Fixed8x13_Character_033[] = {  1,  0,  0,128,  0,128,128,128,128,128,128,128,  0,  0};
-static const GLubyte Fixed8x13_Character_064[] = {  6,  0,  0,120,128,148,172,164,156,132,132,120,  0,  0};
-static const GLubyte Fixed8x13_Character_035[] = {  6,  0,  0,  0, 72, 72,252, 72,252, 72, 72,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_036[] = {  5,  0,  0,  0, 32,240, 40,112,160,120, 32,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_037[] = {  6,  0,  0,136, 84, 72, 32, 16, 16, 72,164, 68,  0,  0};
-static const GLubyte Fixed8x13_Character_094[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,136, 80, 32,  0,  0};
-static const GLubyte Fixed8x13_Character_038[] = {  6,  0,  0,116,136,148, 96,144,144, 96,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_042[] = {  6,  0,  0,  0,  0, 72, 48,252, 48, 72,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_040[] = {  3,  0,  0, 32, 64, 64,128,128,128, 64, 64, 32,  0,  0};
-static const GLubyte Fixed8x13_Character_041[] = {  3,  0,  0,128, 64, 64, 32, 32, 32, 64, 64,128,  0,  0};
-static const GLubyte Fixed8x13_Character_045[] = {  6,  0,  0,  0,  0,  0,  0,252,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_095[] = {  7,  0,254,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_061[] = {  6,  0,  0,  0,  0,252,  0,  0,252,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_043[] = {  5,  0,  0,  0,  0, 32, 32,248, 32, 32,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_091[] = {  4,  0,  0,240,128,128,128,128,128,128,128,240,  0,  0};
-static const GLubyte Fixed8x13_Character_123[] = {  5,  0,  0, 56, 64, 64, 32,192, 32, 64, 64, 56,  0,  0};
-static const GLubyte Fixed8x13_Character_125[] = {  5,  0,  0,224, 16, 16, 32, 24, 32, 16, 16,224,  0,  0};
-static const GLubyte Fixed8x13_Character_093[] = {  4,  0,  0,240, 16, 16, 16, 16, 16, 16, 16,240,  0,  0};
-static const GLubyte Fixed8x13_Character_059[] = {  4,  0,128, 96,112,  0,  0, 32,112, 32,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_058[] = {  3,  0, 64,224, 64,  0,  0, 64,224, 64,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_044[] = {  4,  0,128, 96,112,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_046[] = {  3,  0, 64,224, 64,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed8x13_Character_060[] = {  5,  0,  0,  8, 16, 32, 64,128, 64, 32, 16,  8,  0,  0};
-static const GLubyte Fixed8x13_Character_062[] = {  5,  0,  0,128, 64, 32, 16,  8, 16, 32, 64,128,  0,  0};
-static const GLubyte Fixed8x13_Character_047[] = {  7,  0,  0,128,128, 64, 32, 16,  8,  4,  2,  2,  0,  0};
-static const GLubyte Fixed8x13_Character_063[] = {  6,  0,  0, 16,  0, 16, 16,  8,  4,132,132,120,  0,  0};
-static const GLubyte Fixed8x13_Character_092[] = {  7,  0,  0,  2,  2,  4,  8, 16, 32, 64,128,128,  0,  0};
-static const GLubyte Fixed8x13_Character_034[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,144,144,144,  0,  0};
+static const GLubyte Fixed8x13_Character_057[] = {  6,  0,  0,112,  8,  4,  4,116,140,132,132,120,  0,  0}; /* "9" */
+static const GLubyte Fixed8x13_Character_096[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0, 16, 96,224,  0,  0}; /* "`" */
+static const GLubyte Fixed8x13_Character_126[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,144,168, 72,  0,  0}; /* "~" */
+static const GLubyte Fixed8x13_Character_033[] = {  1,  0,  0,128,  0,128,128,128,128,128,128,128,  0,  0}; /* "!" */
+static const GLubyte Fixed8x13_Character_064[] = {  6,  0,  0,120,128,148,172,164,156,132,132,120,  0,  0}; /* "@" */
+static const GLubyte Fixed8x13_Character_035[] = {  6,  0,  0,  0, 72, 72,252, 72,252, 72, 72,  0,  0,  0}; /* "#" */
+static const GLubyte Fixed8x13_Character_036[] = {  5,  0,  0,  0, 32,240, 40,112,160,120, 32,  0,  0,  0}; /* "$" */
+static const GLubyte Fixed8x13_Character_037[] = {  6,  0,  0,136, 84, 72, 32, 16, 16, 72,164, 68,  0,  0}; /* "%" */
+static const GLubyte Fixed8x13_Character_094[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,136, 80, 32,  0,  0}; /* "^" */
+static const GLubyte Fixed8x13_Character_038[] = {  6,  0,  0,116,136,148, 96,144,144, 96,  0,  0,  0,  0}; /* "&" */
+static const GLubyte Fixed8x13_Character_042[] = {  6,  0,  0,  0,  0, 72, 48,252, 48, 72,  0,  0,  0,  0}; /* "*" */
+static const GLubyte Fixed8x13_Character_040[] = {  3,  0,  0, 32, 64, 64,128,128,128, 64, 64, 32,  0,  0}; /* "(" */
+static const GLubyte Fixed8x13_Character_041[] = {  3,  0,  0,128, 64, 64, 32, 32, 32, 64, 64,128,  0,  0}; /* ")" */
+static const GLubyte Fixed8x13_Character_045[] = {  6,  0,  0,  0,  0,  0,  0,252,  0,  0,  0,  0,  0,  0}; /* "-" */
+static const GLubyte Fixed8x13_Character_095[] = {  7,  0,254,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "_" */
+static const GLubyte Fixed8x13_Character_061[] = {  6,  0,  0,  0,  0,252,  0,  0,252,  0,  0,  0,  0,  0}; /* "=" */
+static const GLubyte Fixed8x13_Character_043[] = {  5,  0,  0,  0,  0, 32, 32,248, 32, 32,  0,  0,  0,  0}; /* "+" */
+static const GLubyte Fixed8x13_Character_091[] = {  4,  0,  0,240,128,128,128,128,128,128,128,240,  0,  0}; /* "[" */
+static const GLubyte Fixed8x13_Character_123[] = {  5,  0,  0, 56, 64, 64, 32,192, 32, 64, 64, 56,  0,  0}; /* "{" */
+static const GLubyte Fixed8x13_Character_125[] = {  5,  0,  0,224, 16, 16, 32, 24, 32, 16, 16,224,  0,  0}; /* "}" */
+static const GLubyte Fixed8x13_Character_093[] = {  4,  0,  0,240, 16, 16, 16, 16, 16, 16, 16,240,  0,  0}; /* "]" */
+static const GLubyte Fixed8x13_Character_059[] = {  4,  0,128, 96,112,  0,  0, 32,112, 32,  0,  0,  0,  0}; /* ";" */
+static const GLubyte Fixed8x13_Character_058[] = {  3,  0, 64,224, 64,  0,  0, 64,224, 64,  0,  0,  0,  0}; /* ":" */
+static const GLubyte Fixed8x13_Character_044[] = {  4,  0,128, 96,112,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "," */
+static const GLubyte Fixed8x13_Character_046[] = {  3,  0, 64,224, 64,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "." */
+static const GLubyte Fixed8x13_Character_060[] = {  5,  0,  0,  8, 16, 32, 64,128, 64, 32, 16,  8,  0,  0}; /* "<" */
+static const GLubyte Fixed8x13_Character_062[] = {  5,  0,  0,128, 64, 32, 16,  8, 16, 32, 64,128,  0,  0}; /* ">" */
+static const GLubyte Fixed8x13_Character_047[] = {  7,  0,  0,128,128, 64, 32, 16,  8,  4,  2,  2,  0,  0}; /* "/" */
+static const GLubyte Fixed8x13_Character_063[] = {  6,  0,  0, 16,  0, 16, 16,  8,  4,132,132,120,  0,  0}; /* "?" */
+static const GLubyte Fixed8x13_Character_092[] = {  7,  0,  0,  2,  2,  4,  8, 16, 32, 64,128,128,  0,  0}; /* "\" */
+static const GLubyte Fixed8x13_Character_034[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,144,144,144,  0,  0}; /* """ */
+
+/* Missing Characters filled in by John Fay by hand ... */
+static const GLubyte Fixed8x13_Character_039[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0, 32, 32, 32,  0,  0}; /* """ */
+static const GLubyte Fixed8x13_Character_124[] = {  3, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,  0,  0}; /* """ */
+
 
 /* The font characters mapping: */
-static const GLubyte* Fixed8x13_Character_Map[] = {Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_032,Fixed8x13_Character_033,Fixed8x13_Character_034,Fixed8x13_Character_035,Fixed8x13_Character_036,Fixed8x13_Character_037,Fixed8x13_Character_038,Fixed8x13_Character_042,Fixed8x13_Character_040,Fixed8x13_Character_041,Fixed8x13_Character_042,Fixed8x13_Character_043,Fixed8x13_Character_044,Fixed8x13_Character_045,Fixed8x13_Character_046,Fixed8x13_Character_047,Fixed8x13_Character_048,Fixed8x13_Character_049,Fixed8x13_Character_050,Fixed8x13_Character_051,Fixed8x13_Character_052,Fixed8x13_Character_053,Fixed8x13_Character_054,Fixed8x13_Character_055,Fixed8x13_Character_056,Fixed8x13_Character_057,Fixed8x13_Character_058,Fixed8x13_Character_059,Fixed8x13_Character_060,Fixed8x13_Character_061,Fixed8x13_Character_062,Fixed8x13_Character_063,Fixed8x13_Character_064,Fixed8x13_Character_065,Fixed8x13_Character_066,Fixed8x13_Character_067,Fixed8x13_Character_068,Fixed8x13_Character_069,Fixed8x13_Character_070,Fixed8x13_Character_071,Fixed8x13_Character_072,Fixed8x13_Character_073,Fixed8x13_Character_074,Fixed8x13_Character_075,Fixed8x13_Character_076,Fixed8x13_Character_077,Fixed8x13_Character_078,Fixed8x13_Character_079,Fixed8x13_Character_080,Fixed8x13_Character_081,Fixed8x13_Character_082,Fixed8x13_Character_083,Fixed8x13_Character_084,Fixed8x13_Character_085,Fixed8x13_Character_086,Fixed8x13_Character_087,Fixed8x13_Character_088,Fixed8x13_Character_089,Fixed8x13_Character_090,Fixed8x13_Character_091,Fixed8x13_Character_092,Fixed8x13_Character_093,Fixed8x13_Character_094,Fixed8x13_Character_095,Fixed8x13_Character_096,Fixed8x13_Character_097,Fixed8x13_Character_098,Fixed8x13_Character_099,Fixed8x13_Character_100,Fixed8x13_Character_101,Fixed8x13_Character_102,Fixed8x13_Character_103,Fixed8x13_Character_104,Fixed8x13_Character_105,Fixed8x13_Character_106,Fixed8x13_Character_107,Fixed8x13_Character_108,Fixed8x13_Character_109,Fixed8x13_Character_110,Fixed8x13_Character_111,Fixed8x13_Character_112,Fixed8x13_Character_113,Fixed8x13_Character_114,Fixed8x13_Character_115,Fixed8x13_Character_116,Fixed8x13_Character_117,Fixed8x13_Character_118,Fixed8x13_Character_119,Fixed8x13_Character_120,Fixed8x13_Character_121,Fixed8x13_Character_122,Fixed8x13_Character_123,Fixed8x13_Character_042,Fixed8x13_Character_125,Fixed8x13_Character_126,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,NULL};
+static const GLubyte* Fixed8x13_Character_Map[] = {Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_032,Fixed8x13_Character_033,Fixed8x13_Character_034,Fixed8x13_Character_035,Fixed8x13_Character_036,Fixed8x13_Character_037,Fixed8x13_Character_038,Fixed8x13_Character_039,Fixed8x13_Character_040,
+   Fixed8x13_Character_041,Fixed8x13_Character_042,Fixed8x13_Character_043,Fixed8x13_Character_044,Fixed8x13_Character_045,Fixed8x13_Character_046,Fixed8x13_Character_047,Fixed8x13_Character_048,Fixed8x13_Character_049,Fixed8x13_Character_050,Fixed8x13_Character_051,Fixed8x13_Character_052,Fixed8x13_Character_053,Fixed8x13_Character_054,Fixed8x13_Character_055,Fixed8x13_Character_056,Fixed8x13_Character_057,Fixed8x13_Character_058,Fixed8x13_Character_059,Fixed8x13_Character_060,Fixed8x13_Character_061,Fixed8x13_Character_062,Fixed8x13_Character_063,Fixed8x13_Character_064,Fixed8x13_Character_065,Fixed8x13_Character_066,Fixed8x13_Character_067,Fixed8x13_Character_068,Fixed8x13_Character_069,Fixed8x13_Character_070,Fixed8x13_Character_071,Fixed8x13_Character_072,Fixed8x13_Character_073,Fixed8x13_Character_074,Fixed8x13_Character_075,Fixed8x13_Character_076,Fixed8x13_Character_077,Fixed8x13_Character_078,Fixed8x13_Character_079,Fixed8x13_Character_080,Fixed8x13_Character_081,Fixed8x13_Character_082,
+   Fixed8x13_Character_083,Fixed8x13_Character_084,Fixed8x13_Character_085,Fixed8x13_Character_086,Fixed8x13_Character_087,Fixed8x13_Character_088,Fixed8x13_Character_089,Fixed8x13_Character_090,Fixed8x13_Character_091,Fixed8x13_Character_092,Fixed8x13_Character_093,Fixed8x13_Character_094,Fixed8x13_Character_095,Fixed8x13_Character_096,Fixed8x13_Character_097,Fixed8x13_Character_098,Fixed8x13_Character_099,Fixed8x13_Character_100,Fixed8x13_Character_101,Fixed8x13_Character_102,Fixed8x13_Character_103,Fixed8x13_Character_104,Fixed8x13_Character_105,Fixed8x13_Character_106,Fixed8x13_Character_107,Fixed8x13_Character_108,Fixed8x13_Character_109,Fixed8x13_Character_110,Fixed8x13_Character_111,Fixed8x13_Character_112,Fixed8x13_Character_113,Fixed8x13_Character_114,Fixed8x13_Character_115,Fixed8x13_Character_116,Fixed8x13_Character_117,Fixed8x13_Character_118,Fixed8x13_Character_119,Fixed8x13_Character_120,Fixed8x13_Character_121,Fixed8x13_Character_122,Fixed8x13_Character_123,Fixed8x13_Character_124,
+   Fixed8x13_Character_125,Fixed8x13_Character_126,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,
+   Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,
+   Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,
+   Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,Fixed8x13_Character_042,NULL};
 
 /* The font structure: */
-const SFG_Font fgFontFixed8x13 = { "-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", 93, 13, Fixed8x13_Character_Map };
+const SFG_Font fgFontFixed8x13 = { "-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", 93, 13, Fixed8x13_Character_Map, 0.0f, 0.0f };
 
-static const GLubyte Fixed9x15_Character_032[] = {  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_097[] = {  7,  0,  0,  0,122,134,130,126,  2,  2,124,  0,  0,  0,  0,  0};
+static const GLubyte Fixed9x15_Character_032[] = {  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* blank */
+static const GLubyte Fixed9x15_Character_097[] = {  7,  0,  0,  0,122,134,130,126,  2,  2,124,  0,  0,  0,  0,  0}; /* "a" */
 static const GLubyte Fixed9x15_Character_098[] = {  7,  0,  0,  0,188,194,130,130,130,194,188,128,128,128,  0,  0};
 static const GLubyte Fixed9x15_Character_099[] = {  7,  0,  0,  0,124,130,128,128,128,130,124,  0,  0,  0,  0,  0};
 static const GLubyte Fixed9x15_Character_100[] = {  7,  0,  0,  0,122,134,130,130,130,134,122,  2,  2,  2,  0,  0};
@@ -169,8 +180,8 @@ static const GLubyte Fixed9x15_Character_119[] = {  7,  0,  0,  0, 68,170,146,14
 static const GLubyte Fixed9x15_Character_118[] = {  7,  0,  0,  0, 16, 40, 40, 68, 68,130,130,  0,  0,  0,  0,  0};
 static const GLubyte Fixed9x15_Character_120[] = {  7,  0,  0,  0,130, 68, 40, 16, 40, 68,130,  0,  0,  0,  0,  0};
 static const GLubyte Fixed9x15_Character_121[] = {  6,120,132,  4,116,140,132,132,132,132,132,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_122[] = {  7,  0,  0,  0,254, 64, 32, 16,  8,  4,254,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_065[] = {  7,  0,  0,  0,130,130,130,254,130,130,130, 68, 40, 16,  0,  0};
+static const GLubyte Fixed9x15_Character_122[] = {  7,  0,  0,  0,254, 64, 32, 16,  8,  4,254,  0,  0,  0,  0,  0}; /* "z" */
+static const GLubyte Fixed9x15_Character_065[] = {  7,  0,  0,  0,130,130,130,254,130,130,130, 68, 40, 16,  0,  0}; /* "A" */
 static const GLubyte Fixed9x15_Character_066[] = {  7,  0,  0,  0,252, 66, 66, 66, 66,124, 66, 66, 66,252,  0,  0};
 static const GLubyte Fixed9x15_Character_067[] = {  7,  0,  0,  0,124,130,128,128,128,128,128,128,130,124,  0,  0};
 static const GLubyte Fixed9x15_Character_068[] = {  7,  0,  0,  0,252, 66, 66, 66, 66, 66, 66, 66, 66,252,  0,  0};
@@ -195,8 +206,8 @@ static const GLubyte Fixed9x15_Character_087[] = {  7,  0,  0,  0, 68,170,146,14
 static const GLubyte Fixed9x15_Character_086[] = {  7,  0,  0,  0, 16, 40, 40, 40, 68, 68, 68,130,130,130,  0,  0};
 static const GLubyte Fixed9x15_Character_088[] = {  7,  0,  0,  0,130,130, 68, 40, 16, 16, 40, 68,130,130,  0,  0};
 static const GLubyte Fixed9x15_Character_089[] = {  7,  0,  0,  0, 16, 16, 16, 16, 16, 16, 40, 68,130,130,  0,  0};
-static const GLubyte Fixed9x15_Character_090[] = {  7,  0,  0,  0,254,128,128, 64, 32, 16,  8,  4,  2,254,  0,  0};
-static const GLubyte Fixed9x15_Character_048[] = {  7,  0,  0,  0, 56, 68,130,130,130,130,130,130, 68, 56,  0,  0};
+static const GLubyte Fixed9x15_Character_090[] = {  7,  0,  0,  0,254,128,128, 64, 32, 16,  8,  4,  2,254,  0,  0}; /* "Z" */
+static const GLubyte Fixed9x15_Character_048[] = {  7,  0,  0,  0, 56, 68,130,130,130,130,130,130, 68, 56,  0,  0}; /* "0" */
 static const GLubyte Fixed9x15_Character_049[] = {  7,  0,  0,  0,254, 16, 16, 16, 16, 16,144, 80, 48, 16,  0,  0};
 static const GLubyte Fixed9x15_Character_050[] = {  7,  0,  0,  0,254,128, 64, 48,  8,  4,  2,130,130,124,  0,  0};
 static const GLubyte Fixed9x15_Character_051[] = {  7,  0,  0,  0,124,130,  2,  2,  2, 28,  8,  4,  2,254,  0,  0};
@@ -205,43 +216,54 @@ static const GLubyte Fixed9x15_Character_053[] = {  7,  0,  0,  0,124,130,  2,
 static const GLubyte Fixed9x15_Character_054[] = {  7,  0,  0,  0,124,130,130,130,194,188,128,128, 64, 60,  0,  0};
 static const GLubyte Fixed9x15_Character_055[] = {  7,  0,  0,  0, 64, 64, 32, 32, 16,  8,  4,  2,  2,254,  0,  0};
 static const GLubyte Fixed9x15_Character_056[] = {  7,  0,  0,  0, 56, 68,130,130, 68, 56, 68,130, 68, 56,  0,  0};
-static const GLubyte Fixed9x15_Character_057[] = {  7,  0,  0,  0,120,  4,  2,  2,122,134,130,130,130,124,  0,  0};
-static const GLubyte Fixed9x15_Character_096[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16, 32, 64,192,  0,  0};
-static const GLubyte Fixed9x15_Character_126[] = {  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,140,146, 98,  0,  0};
-static const GLubyte Fixed9x15_Character_033[] = {  1,  0,  0,  0,128,128,  0,  0,128,128,128,128,128,128,128,  0};
-static const GLubyte Fixed9x15_Character_064[] = {  7,  0,  0,  0,124,128,128,154,166,162,158,130,130,124,  0,  0};
-static const GLubyte Fixed9x15_Character_035[] = {  6,  0,  0,  0,  0, 72, 72,252, 72, 72,252, 72, 72,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_036[] = {  7,  0,  0, 16,124,146, 18, 18, 20, 56, 80,144,146,124, 16,  0};
-static const GLubyte Fixed9x15_Character_037[] = {  7,  0,  0,  0,132, 74, 74, 36, 16, 16, 72,164,164, 66,  0,  0};
-static const GLubyte Fixed9x15_Character_094[] = {  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,130, 68, 40, 16,  0,  0};
-static const GLubyte Fixed9x15_Character_038[] = {  7,  0,  0,  0, 98,148,136,148, 98, 96,144,144,144, 96,  0,  0};
-static const GLubyte Fixed9x15_Character_042[] = {  7,  0,  0,  0,  0, 16,146, 84, 56, 84,146, 16,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_040[] = {  3,  0,  0, 32, 64, 64,128,128,128,128,128,128, 64, 64, 32,  0};
-static const GLubyte Fixed9x15_Character_041[] = {  3,  0,  0,128, 64, 64, 32, 32, 32, 32, 32, 32, 64, 64,128,  0};
-static const GLubyte Fixed9x15_Character_045[] = {  7,  0,  0,  0,  0,  0,  0,  0,254,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_095[] = {  8,  0,  0,255,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_061[] = {  7,  0,  0,  0,  0,  0,254,  0,  0,254,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_043[] = {  7,  0,  0,  0,  0, 16, 16, 16,254, 16, 16, 16,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_091[] = {  4,  0,  0,240,128,128,128,128,128,128,128,128,128,128,240,  0};
-static const GLubyte Fixed9x15_Character_123[] = {  5,  0,  0, 56, 64, 64, 64, 32,192,192, 32, 64, 64, 64, 56,  0};
-static const GLubyte Fixed9x15_Character_125[] = {  5,  0,  0,224, 16, 16, 16, 32, 24, 24, 32, 16, 16, 16,224,  0};
-static const GLubyte Fixed9x15_Character_093[] = {  4,  0,  0,240, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,240,  0};
-static const GLubyte Fixed9x15_Character_059[] = {  2,128, 64, 64,192,192,  0,  0,  0,192,192,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_058[] = {  2,  0,  0,  0,192,192,  0,  0,  0,192,192,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_044[] = {  2,128, 64, 64,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_046[] = {  2,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Fixed9x15_Character_060[] = {  5,  0,  0,  0,  8, 16, 32, 64,128,128, 64, 32, 16,  8,  0,  0};
-static const GLubyte Fixed9x15_Character_062[] = {  5,  0,  0,  0,128, 64, 32, 16,  8,  8, 16, 32, 64,128,  0,  0};
-static const GLubyte Fixed9x15_Character_047[] = {  7,  0,  0,  0,128, 64, 64, 32, 16, 16,  8,  4,  4,  2,  0,  0};
-static const GLubyte Fixed9x15_Character_063[] = {  7,  0,  0,  0, 16,  0, 16, 16,  8,  4,  2,130,130,124,  0,  0};
-static const GLubyte Fixed9x15_Character_092[] = {  7,  0,  0,  0,  2,  4,  4,  8, 16, 16, 32, 64, 64,128,  0,  0};
-static const GLubyte Fixed9x15_Character_034[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,144,144,144,  0,  0};
+static const GLubyte Fixed9x15_Character_057[] = {  7,  0,  0,  0,120,  4,  2,  2,122,134,130,130,130,124,  0,  0}; /* "9" */
+static const GLubyte Fixed9x15_Character_096[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16, 32, 64,192,  0,  0}; /* "`" */
+static const GLubyte Fixed9x15_Character_126[] = {  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,140,146, 98,  0,  0}; /* "~" */
+static const GLubyte Fixed9x15_Character_033[] = {  1,  0,  0,  0,128,128,  0,  0,128,128,128,128,128,128,128,  0}; /* "!" */
+static const GLubyte Fixed9x15_Character_064[] = {  7,  0,  0,  0,124,128,128,154,166,162,158,130,130,124,  0,  0}; /* "@" */
+static const GLubyte Fixed9x15_Character_035[] = {  6,  0,  0,  0,  0, 72, 72,252, 72, 72,252, 72, 72,  0,  0,  0}; /* "#" */
+static const GLubyte Fixed9x15_Character_036[] = {  7,  0,  0, 16,124,146, 18, 18, 20, 56, 80,144,146,124, 16,  0}; /* "$" */
+static const GLubyte Fixed9x15_Character_037[] = {  7,  0,  0,  0,132, 74, 74, 36, 16, 16, 72,164,164, 66,  0,  0}; /* "%" */
+static const GLubyte Fixed9x15_Character_094[] = {  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,130, 68, 40, 16,  0,  0}; /* "^" */
+static const GLubyte Fixed9x15_Character_038[] = {  7,  0,  0,  0, 98,148,136,148, 98, 96,144,144,144, 96,  0,  0}; /* "&" */
+static const GLubyte Fixed9x15_Character_042[] = {  7,  0,  0,  0,  0, 16,146, 84, 56, 84,146, 16,  0,  0,  0,  0}; /* "*" */
+static const GLubyte Fixed9x15_Character_040[] = {  3,  0,  0, 32, 64, 64,128,128,128,128,128,128, 64, 64, 32,  0}; /* "(" */
+static const GLubyte Fixed9x15_Character_041[] = {  3,  0,  0,128, 64, 64, 32, 32, 32, 32, 32, 32, 64, 64,128,  0}; /* ")" */
+static const GLubyte Fixed9x15_Character_045[] = {  7,  0,  0,  0,  0,  0,  0,  0,254,  0,  0,  0,  0,  0,  0,  0}; /* "-" */
+static const GLubyte Fixed9x15_Character_095[] = {  8,  0,  0,255,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "_" */
+static const GLubyte Fixed9x15_Character_061[] = {  7,  0,  0,  0,  0,  0,254,  0,  0,254,  0,  0,  0,  0,  0,  0}; /* "=" */
+static const GLubyte Fixed9x15_Character_043[] = {  7,  0,  0,  0,  0, 16, 16, 16,254, 16, 16, 16,  0,  0,  0,  0}; /* "+" */
+static const GLubyte Fixed9x15_Character_091[] = {  4,  0,  0,240,128,128,128,128,128,128,128,128,128,128,240,  0}; /* "[" */
+static const GLubyte Fixed9x15_Character_123[] = {  5,  0,  0, 56, 64, 64, 64, 32,192,192, 32, 64, 64, 64, 56,  0}; /* "{" */
+static const GLubyte Fixed9x15_Character_125[] = {  5,  0,  0,224, 16, 16, 16, 32, 24, 24, 32, 16, 16, 16,224,  0}; /* "}" */
+static const GLubyte Fixed9x15_Character_093[] = {  4,  0,  0,240, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,240,  0}; /* "]" */
+static const GLubyte Fixed9x15_Character_059[] = {  2,128, 64, 64,192,192,  0,  0,  0,192,192,  0,  0,  0,  0,  0}; /* ";" */
+static const GLubyte Fixed9x15_Character_058[] = {  2,  0,  0,  0,192,192,  0,  0,  0,192,192,  0,  0,  0,  0,  0}; /* ":" */
+static const GLubyte Fixed9x15_Character_044[] = {  2,128, 64, 64,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "," */
+static const GLubyte Fixed9x15_Character_046[] = {  2,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "." */
+static const GLubyte Fixed9x15_Character_060[] = {  5,  0,  0,  0,  8, 16, 32, 64,128,128, 64, 32, 16,  8,  0,  0}; /* "<" */
+static const GLubyte Fixed9x15_Character_062[] = {  5,  0,  0,  0,128, 64, 32, 16,  8,  8, 16, 32, 64,128,  0,  0}; /* ">" */
+static const GLubyte Fixed9x15_Character_047[] = {  7,  0,  0,  0,128, 64, 64, 32, 16, 16,  8,  4,  4,  2,  0,  0}; /* "/" */
+static const GLubyte Fixed9x15_Character_063[] = {  7,  0,  0,  0, 16,  0, 16, 16,  8,  4,  2,130,130,124,  0,  0}; /* "?" */
+static const GLubyte Fixed9x15_Character_092[] = {  7,  0,  0,  0,  2,  4,  4,  8, 16, 16, 32, 64, 64,128,  0,  0}; /* "\" */
+static const GLubyte Fixed9x15_Character_034[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,144,144,144,  0,  0}; /* """ */
+
+/* Missing Characters filled in by John Fay by hand ... */
+static const GLubyte Fixed9x15_Character_039[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,  0, 32, 32, 32, 32,  0,  0}; /* "'" */
+static const GLubyte Fixed9x15_Character_124[] = {  3, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,  0,  0}; /* "|" */
+
 
 /* The font characters mapping: */
-static const GLubyte* Fixed9x15_Character_Map[] = {Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_032,Fixed9x15_Character_033,Fixed9x15_Character_034,Fixed9x15_Character_035,Fixed9x15_Character_036,Fixed9x15_Character_037,Fixed9x15_Character_038,Fixed9x15_Character_042,Fixed9x15_Character_040,Fixed9x15_Character_041,Fixed9x15_Character_042,Fixed9x15_Character_043,Fixed9x15_Character_044,Fixed9x15_Character_045,Fixed9x15_Character_046,Fixed9x15_Character_047,Fixed9x15_Character_048,Fixed9x15_Character_049,Fixed9x15_Character_050,Fixed9x15_Character_051,Fixed9x15_Character_052,Fixed9x15_Character_053,Fixed9x15_Character_054,Fixed9x15_Character_055,Fixed9x15_Character_056,Fixed9x15_Character_057,Fixed9x15_Character_058,Fixed9x15_Character_059,Fixed9x15_Character_060,Fixed9x15_Character_061,Fixed9x15_Character_062,Fixed9x15_Character_063,Fixed9x15_Character_064,Fixed9x15_Character_065,Fixed9x15_Character_066,Fixed9x15_Character_067,Fixed9x15_Character_068,Fixed9x15_Character_069,Fixed9x15_Character_070,Fixed9x15_Character_071,Fixed9x15_Character_072,Fixed9x15_Character_073,Fixed9x15_Character_074,Fixed9x15_Character_075,Fixed9x15_Character_076,Fixed9x15_Character_077,Fixed9x15_Character_078,Fixed9x15_Character_079,Fixed9x15_Character_080,Fixed9x15_Character_081,Fixed9x15_Character_082,Fixed9x15_Character_083,Fixed9x15_Character_084,Fixed9x15_Character_085,Fixed9x15_Character_086,Fixed9x15_Character_087,Fixed9x15_Character_088,Fixed9x15_Character_089,Fixed9x15_Character_090,Fixed9x15_Character_091,Fixed9x15_Character_092,Fixed9x15_Character_093,Fixed9x15_Character_094,Fixed9x15_Character_095,Fixed9x15_Character_096,Fixed9x15_Character_097,Fixed9x15_Character_098,Fixed9x15_Character_099,Fixed9x15_Character_100,Fixed9x15_Character_101,Fixed9x15_Character_102,Fixed9x15_Character_103,Fixed9x15_Character_104,Fixed9x15_Character_105,Fixed9x15_Character_106,Fixed9x15_Character_107,Fixed9x15_Character_108,Fixed9x15_Character_109,Fixed9x15_Character_110,Fixed9x15_Character_111,Fixed9x15_Character_112,Fixed9x15_Character_113,Fixed9x15_Character_114,Fixed9x15_Character_115,Fixed9x15_Character_116,Fixed9x15_Character_117,Fixed9x15_Character_118,Fixed9x15_Character_119,Fixed9x15_Character_120,Fixed9x15_Character_121,Fixed9x15_Character_122,Fixed9x15_Character_123,Fixed9x15_Character_042,Fixed9x15_Character_125,Fixed9x15_Character_126,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,NULL};
+static const GLubyte* Fixed9x15_Character_Map[] = {Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_032,Fixed9x15_Character_033,Fixed9x15_Character_034,Fixed9x15_Character_035,Fixed9x15_Character_036,Fixed9x15_Character_037,Fixed9x15_Character_038,Fixed9x15_Character_039,Fixed9x15_Character_040,
+   Fixed9x15_Character_041,Fixed9x15_Character_042,Fixed9x15_Character_043,Fixed9x15_Character_044,Fixed9x15_Character_045,Fixed9x15_Character_046,Fixed9x15_Character_047,Fixed9x15_Character_048,Fixed9x15_Character_049,Fixed9x15_Character_050,Fixed9x15_Character_051,Fixed9x15_Character_052,Fixed9x15_Character_053,Fixed9x15_Character_054,Fixed9x15_Character_055,Fixed9x15_Character_056,Fixed9x15_Character_057,Fixed9x15_Character_058,Fixed9x15_Character_059,Fixed9x15_Character_060,Fixed9x15_Character_061,Fixed9x15_Character_062,Fixed9x15_Character_063,Fixed9x15_Character_064,Fixed9x15_Character_065,Fixed9x15_Character_066,Fixed9x15_Character_067,Fixed9x15_Character_068,Fixed9x15_Character_069,Fixed9x15_Character_070,Fixed9x15_Character_071,Fixed9x15_Character_072,Fixed9x15_Character_073,Fixed9x15_Character_074,Fixed9x15_Character_075,Fixed9x15_Character_076,Fixed9x15_Character_077,Fixed9x15_Character_078,Fixed9x15_Character_079,Fixed9x15_Character_080,Fixed9x15_Character_081,Fixed9x15_Character_082,
+   Fixed9x15_Character_083,Fixed9x15_Character_084,Fixed9x15_Character_085,Fixed9x15_Character_086,Fixed9x15_Character_087,Fixed9x15_Character_088,Fixed9x15_Character_089,Fixed9x15_Character_090,Fixed9x15_Character_091,Fixed9x15_Character_092,Fixed9x15_Character_093,Fixed9x15_Character_094,Fixed9x15_Character_095,Fixed9x15_Character_096,Fixed9x15_Character_097,Fixed9x15_Character_098,Fixed9x15_Character_099,Fixed9x15_Character_100,Fixed9x15_Character_101,Fixed9x15_Character_102,Fixed9x15_Character_103,Fixed9x15_Character_104,Fixed9x15_Character_105,Fixed9x15_Character_106,Fixed9x15_Character_107,Fixed9x15_Character_108,Fixed9x15_Character_109,Fixed9x15_Character_110,Fixed9x15_Character_111,Fixed9x15_Character_112,Fixed9x15_Character_113,Fixed9x15_Character_114,Fixed9x15_Character_115,Fixed9x15_Character_116,Fixed9x15_Character_117,Fixed9x15_Character_118,Fixed9x15_Character_119,Fixed9x15_Character_120,Fixed9x15_Character_121,Fixed9x15_Character_122,Fixed9x15_Character_123,Fixed9x15_Character_124,
+   Fixed9x15_Character_125,Fixed9x15_Character_126,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,
+   Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,
+   Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,
+   Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,Fixed9x15_Character_042,NULL};
 
 /* The font structure: */
-const SFG_Font fgFontFixed9x15 = { "-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1", 93, 15, Fixed9x15_Character_Map };
+const SFG_Font fgFontFixed9x15 = { "-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1", 93, 15, Fixed9x15_Character_Map, 0.0f, 0.0f };
 
 static const GLubyte Helvetica10_Character_032[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
 static const GLubyte Helvetica10_Character_097[] = {  5,  0,  0,104,144,144,112, 16,224,  0,  0,  0,  0,  0};
@@ -337,211 +359,244 @@ static const GLubyte Helvetica10_Character_063[] = {  4,  0,  0, 64,  0, 64, 64,
 static const GLubyte Helvetica10_Character_092[] = {  3,  0,  0, 32, 32, 64, 64, 64, 64,128,128,  0,  0,  0};
 static const GLubyte Helvetica10_Character_034[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,160,160,  0,  0,  0};
 
+/* Missing Characters filled in by John Fay by hand ... */
+static const GLubyte Helvetica10_Character_039[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0, 32, 32, 32,  0,  0}; /* """ */
+static const GLubyte Helvetica10_Character_124[] = {  3, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,  0,  0}; /* """ */
+
+
 /* The font characters mapping: */
-static const GLubyte* Helvetica10_Character_Map[] = {Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_032,Helvetica10_Character_033,Helvetica10_Character_034,Helvetica10_Character_035,Helvetica10_Character_036,Helvetica10_Character_037,Helvetica10_Character_038,Helvetica10_Character_042,Helvetica10_Character_040,Helvetica10_Character_041,Helvetica10_Character_042,Helvetica10_Character_043,Helvetica10_Character_044,Helvetica10_Character_045,Helvetica10_Character_046,Helvetica10_Character_047,Helvetica10_Character_048,Helvetica10_Character_049,Helvetica10_Character_050,Helvetica10_Character_051,Helvetica10_Character_052,Helvetica10_Character_053,Helvetica10_Character_054,Helvetica10_Character_055,Helvetica10_Character_056,Helvetica10_Character_057,Helvetica10_Character_058,Helvetica10_Character_059,Helvetica10_Character_060,Helvetica10_Character_061,Helvetica10_Character_062,Helvetica10_Character_063,Helvetica10_Character_064,Helvetica10_Character_065,Helvetica10_Character_066,Helvetica10_Character_067,Helvetica10_Character_068,Helvetica10_Character_069,Helvetica10_Character_070,Helvetica10_Character_071,Helvetica10_Character_072,Helvetica10_Character_073,Helvetica10_Character_074,Helvetica10_Character_075,Helvetica10_Character_076,Helvetica10_Character_077,Helvetica10_Character_078,Helvetica10_Character_079,Helvetica10_Character_080,Helvetica10_Character_081,Helvetica10_Character_082,Helvetica10_Character_083,Helvetica10_Character_084,Helvetica10_Character_085,Helvetica10_Character_086,Helvetica10_Character_087,Helvetica10_Character_088,Helvetica10_Character_089,Helvetica10_Character_090,Helvetica10_Character_091,Helvetica10_Character_092,Helvetica10_Character_093,Helvetica10_Character_094,Helvetica10_Character_095,Helvetica10_Character_096,Helvetica10_Character_097,Helvetica10_Character_098,Helvetica10_Character_099,Helvetica10_Character_100,Helvetica10_Character_101,Helvetica10_Character_102,Helvetica10_Character_103,Helvetica10_Character_104,Helvetica10_Character_105,Helvetica10_Character_106,Helvetica10_Character_107,Helvetica10_Character_108,Helvetica10_Character_109,Helvetica10_Character_110,Helvetica10_Character_111,Helvetica10_Character_112,Helvetica10_Character_113,Helvetica10_Character_114,Helvetica10_Character_115,Helvetica10_Character_116,Helvetica10_Character_117,Helvetica10_Character_118,Helvetica10_Character_119,Helvetica10_Character_120,Helvetica10_Character_121,Helvetica10_Character_122,Helvetica10_Character_123,Helvetica10_Character_042,Helvetica10_Character_125,Helvetica10_Character_126,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,NULL};
+static const GLubyte* Helvetica10_Character_Map[] = {Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_032,Helvetica10_Character_033,Helvetica10_Character_034,Helvetica10_Character_035,Helvetica10_Character_036,Helvetica10_Character_037,
+ Helvetica10_Character_038,Helvetica10_Character_039,Helvetica10_Character_040,Helvetica10_Character_041,Helvetica10_Character_042,Helvetica10_Character_043,Helvetica10_Character_044,Helvetica10_Character_045,Helvetica10_Character_046,Helvetica10_Character_047,Helvetica10_Character_048,Helvetica10_Character_049,Helvetica10_Character_050,Helvetica10_Character_051,Helvetica10_Character_052,Helvetica10_Character_053,Helvetica10_Character_054,Helvetica10_Character_055,Helvetica10_Character_056,Helvetica10_Character_057,Helvetica10_Character_058,Helvetica10_Character_059,Helvetica10_Character_060,Helvetica10_Character_061,Helvetica10_Character_062,Helvetica10_Character_063,Helvetica10_Character_064,Helvetica10_Character_065,Helvetica10_Character_066,Helvetica10_Character_067,Helvetica10_Character_068,Helvetica10_Character_069,Helvetica10_Character_070,Helvetica10_Character_071,Helvetica10_Character_072,Helvetica10_Character_073,Helvetica10_Character_074,Helvetica10_Character_075,Helvetica10_Character_076,
+ Helvetica10_Character_077,Helvetica10_Character_078,Helvetica10_Character_079,Helvetica10_Character_080,Helvetica10_Character_081,Helvetica10_Character_082,Helvetica10_Character_083,Helvetica10_Character_084,Helvetica10_Character_085,Helvetica10_Character_086,Helvetica10_Character_087,Helvetica10_Character_088,Helvetica10_Character_089,Helvetica10_Character_090,Helvetica10_Character_091,Helvetica10_Character_092,Helvetica10_Character_093,Helvetica10_Character_094,Helvetica10_Character_095,Helvetica10_Character_096,Helvetica10_Character_097,Helvetica10_Character_098,Helvetica10_Character_099,Helvetica10_Character_100,Helvetica10_Character_101,Helvetica10_Character_102,Helvetica10_Character_103,Helvetica10_Character_104,Helvetica10_Character_105,Helvetica10_Character_106,Helvetica10_Character_107,Helvetica10_Character_108,Helvetica10_Character_109,Helvetica10_Character_110,Helvetica10_Character_111,Helvetica10_Character_112,Helvetica10_Character_113,Helvetica10_Character_114,Helvetica10_Character_115,
+ Helvetica10_Character_116,Helvetica10_Character_117,Helvetica10_Character_118,Helvetica10_Character_119,Helvetica10_Character_120,Helvetica10_Character_121,Helvetica10_Character_122,Helvetica10_Character_123,Helvetica10_Character_124,Helvetica10_Character_125,Helvetica10_Character_126,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,
+ Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,
+ Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,
+ Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,Helvetica10_Character_042,NULL};
 
 /* The font structure: */
-const SFG_Font fgFontHelvetica10 = { "-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1", 93, 13, Helvetica10_Character_Map };
-
-static const GLubyte Helvetica12_Character_032[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_097[] = {  6,  0,  0,  0,116,136,136,120,  8,136,112,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_098[] = {  5,  0,  0,  0,176,200,136,136,136,200,176,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_099[] = {  5,  0,  0,  0,112,136,128,128,128,136,112,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_100[] = {  5,  0,  0,  0,104,152,136,136,136,152,104,  8,  8,  0,  0,  0};
-static const GLubyte Helvetica12_Character_101[] = {  5,  0,  0,  0,112,136,128,248,136,136,112,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_102[] = {  4,  0,  0,  0, 64, 64, 64, 64, 64, 64,224, 64, 48,  0,  0,  0};
-static const GLubyte Helvetica12_Character_103[] = {  5,112,136,  8,104,152,136,136,136,152,104,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_104[] = {  5,  0,  0,  0,136,136,136,136,136,200,176,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_105[] = {  1,  0,  0,  0,128,128,128,128,128,128,128,  0,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_106[] = {  2,128, 64, 64, 64, 64, 64, 64, 64, 64, 64,  0, 64,  0,  0,  0};
-static const GLubyte Helvetica12_Character_107[] = {  5,  0,  0,  0,136,144,160,192,192,160,144,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_108[] = {  1,  0,  0,  0,128,128,128,128,128,128,128,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_109[] = {  7,  0,  0,  0,146,146,146,146,146,218,164,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_110[] = {  5,  0,  0,  0,136,136,136,136,136,200,176,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_111[] = {  5,  0,  0,  0,112,136,136,136,136,136,112,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_112[] = {  5,128,128,128,176,200,136,136,136,200,176,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_113[] = {  5,  8,  8,  8,104,152,136,136,136,152,104,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_114[] = {  3,  0,  0,  0,128,128,128,128,128,192,160,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_115[] = {  4,  0,  0,  0, 96,144, 16, 96,128,144, 96,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_116[] = {  3,  0,  0,  0, 96, 64, 64, 64, 64, 64,224, 64, 64,  0,  0,  0};
-static const GLubyte Helvetica12_Character_117[] = {  5,  0,  0,  0,104,152,136,136,136,136,136,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_119[] = {  9,  0,  0,  0,  0,  0,  0, 34,  0, 34,  0, 85,  0, 73,  0, 73,  0,136,128,136,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_118[] = {  5,  0,  0,  0, 32, 32, 80, 80,136,136,136,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_120[] = {  6,  0,  0,  0,132,132, 72, 48, 48, 72,132,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_121[] = {  5,128, 64, 32, 32, 80, 80,144,136,136,136,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_122[] = {  4,  0,  0,  0,240,128, 64, 64, 32, 16,240,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_065[] = {  7,  0,  0,  0,130,130,130,124, 68, 68, 40, 40, 16,  0,  0,  0};
-static const GLubyte Helvetica12_Character_066[] = {  6,  0,  0,  0,248,132,132,132,248,132,132,132,248,  0,  0,  0};
-static const GLubyte Helvetica12_Character_067[] = {  7,  0,  0,  0, 60, 66,128,128,128,128,128, 66, 60,  0,  0,  0};
-static const GLubyte Helvetica12_Character_068[] = {  7,  0,  0,  0,248,132,130,130,130,130,130,132,248,  0,  0,  0};
-static const GLubyte Helvetica12_Character_069[] = {  6,  0,  0,  0,252,128,128,128,252,128,128,128,252,  0,  0,  0};
-static const GLubyte Helvetica12_Character_070[] = {  6,  0,  0,  0,128,128,128,128,248,128,128,128,252,  0,  0,  0};
-static const GLubyte Helvetica12_Character_071[] = {  7,  0,  0,  0, 58, 70,130,130,142,128,128, 66, 60,  0,  0,  0};
-static const GLubyte Helvetica12_Character_072[] = {  7,  0,  0,  0,130,130,130,130,254,130,130,130,130,  0,  0,  0};
-static const GLubyte Helvetica12_Character_073[] = {  1,  0,  0,  0,128,128,128,128,128,128,128,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_074[] = {  5,  0,  0,  0,112,136,136,  8,  8,  8,  8,  8,  8,  0,  0,  0};
-static const GLubyte Helvetica12_Character_075[] = {  7,  0,  0,  0,130,132,136,144,224,160,144,136,132,  0,  0,  0};
-static const GLubyte Helvetica12_Character_076[] = {  5,  0,  0,  0,248,128,128,128,128,128,128,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_077[] = {  9,  0,  0,  0,  0,  0,  0,136,128,136,128,148,128,148,128,162,128,162,128,193,128,193,128,128,128,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_078[] = {  7,  0,  0,  0,130,134,138,138,146,162,162,194,130,  0,  0,  0};
-static const GLubyte Helvetica12_Character_079[] = {  8,  0,  0,  0, 60, 66,129,129,129,129,129, 66, 60,  0,  0,  0};
-static const GLubyte Helvetica12_Character_080[] = {  6,  0,  0,  0,128,128,128,128,248,132,132,132,248,  0,  0,  0};
-static const GLubyte Helvetica12_Character_081[] = {  8,  0,  0,  0, 61, 66,133,137,129,129,129, 66, 60,  0,  0,  0};
-static const GLubyte Helvetica12_Character_082[] = {  6,  0,  0,  0,132,132,132,136,248,132,132,132,248,  0,  0,  0};
-static const GLubyte Helvetica12_Character_083[] = {  6,  0,  0,  0,120,132,132,  4, 24, 96,128,132,120,  0,  0,  0};
-static const GLubyte Helvetica12_Character_084[] = {  7,  0,  0,  0, 16, 16, 16, 16, 16, 16, 16, 16,254,  0,  0,  0};
-static const GLubyte Helvetica12_Character_085[] = {  6,  0,  0,  0,120,132,132,132,132,132,132,132,132,  0,  0,  0};
-static const GLubyte Helvetica12_Character_087[] = {  9,  0,  0,  0,  0,  0,  0, 34,  0, 34,  0, 34,  0, 85,  0, 85,  0, 73,  0,136,128,136,128,136,128,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_086[] = {  7,  0,  0,  0, 16, 16, 40, 40, 68, 68, 68,130,130,  0,  0,  0};
-static const GLubyte Helvetica12_Character_088[] = {  7,  0,  0,  0,130, 68, 68, 40, 16, 40, 68, 68,130,  0,  0,  0};
-static const GLubyte Helvetica12_Character_089[] = {  7,  0,  0,  0, 16, 16, 16, 16, 40, 68, 68,130,130,  0,  0,  0};
-static const GLubyte Helvetica12_Character_090[] = {  7,  0,  0,  0,254,128, 64, 32, 16,  8,  4,  2,254,  0,  0,  0};
-static const GLubyte Helvetica12_Character_048[] = {  5,  0,  0,  0,112,136,136,136,136,136,136,136,112,  0,  0,  0};
-static const GLubyte Helvetica12_Character_049[] = {  3,  0,  0,  0, 32, 32, 32, 32, 32, 32, 32,224, 32,  0,  0,  0};
-static const GLubyte Helvetica12_Character_050[] = {  5,  0,  0,  0,248,128,128, 64, 32, 16,  8,136,112,  0,  0,  0};
-static const GLubyte Helvetica12_Character_051[] = {  5,  0,  0,  0,112,136,136,  8,  8, 48,  8,136,112,  0,  0,  0};
-static const GLubyte Helvetica12_Character_052[] = {  6,  0,  0,  0,  8,  8,252,136, 72, 40, 40, 24,  8,  0,  0,  0};
-static const GLubyte Helvetica12_Character_053[] = {  5,  0,  0,  0,112,136,136,  8,  8,240,128,128,248,  0,  0,  0};
-static const GLubyte Helvetica12_Character_054[] = {  5,  0,  0,  0,112,136,136,136,200,176,128,136,112,  0,  0,  0};
-static const GLubyte Helvetica12_Character_055[] = {  5,  0,  0,  0, 64, 64, 32, 32, 32, 16, 16,  8,248,  0,  0,  0};
-static const GLubyte Helvetica12_Character_056[] = {  5,  0,  0,  0,112,136,136,136,136,112,136,136,112,  0,  0,  0};
-static const GLubyte Helvetica12_Character_057[] = {  5,  0,  0,  0,112,136,  8,  8,120,136,136,136,112,  0,  0,  0};
-static const GLubyte Helvetica12_Character_096[] = {  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,192,128, 64,  0,  0,  0};
-static const GLubyte Helvetica12_Character_126[] = {  6,  0,  0,  0,  0,  0,  0,152,100,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_033[] = {  1,  0,  0,  0,128,  0,128,128,128,128,128,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_064[] = { 10,  0,  0,  0,  0, 62,  0, 64,  0,155,  0,166,128,162, 64,162, 64,146, 64, 77, 64, 96,128, 31,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_035[] = {  6,  0,  0,  0, 80, 80, 80,252, 40,252, 40, 40,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_036[] = {  5,  0,  0, 32,112,168,168, 40,112,160,168,112, 32,  0,  0,  0};
-static const GLubyte Helvetica12_Character_037[] = {  9,  0,  0,  0,  0,  0,  0, 35,  0, 20,128, 20,128, 19,  0,  8,  0,104,  0,148,  0,148,  0, 98,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_094[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,136, 80, 32,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_038[] = {  7,  0,  0,  0,114,140,132,138, 80, 48, 72, 72, 48,  0,  0,  0};
-static const GLubyte Helvetica12_Character_042[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,160, 64,160,  0,  0,  0};
-static const GLubyte Helvetica12_Character_040[] = {  3, 32, 64, 64,128,128,128,128,128,128, 64, 64, 32,  0,  0,  0};
-static const GLubyte Helvetica12_Character_041[] = {  3,128, 64, 64, 32, 32, 32, 32, 32, 32, 64, 64,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_045[] = {  5,  0,  0,  0,  0,  0,  0,248,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_095[] = {  7,  0,254,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_061[] = {  5,  0,  0,  0,  0,  0,248,  0,248,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_043[] = {  5,  0,  0,  0,  0, 32, 32,248, 32, 32,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_091[] = {  2,192,128,128,128,128,128,128,128,128,128,128,192,  0,  0,  0};
-static const GLubyte Helvetica12_Character_123[] = {  4, 48, 64, 64, 64, 64, 64,128, 64, 64, 64, 64, 48,  0,  0,  0};
-static const GLubyte Helvetica12_Character_125[] = {  4,192, 32, 32, 32, 32, 32, 16, 32, 32, 32, 32,192,  0,  0,  0};
-static const GLubyte Helvetica12_Character_093[] = {  2,192, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,192,  0,  0,  0};
-static const GLubyte Helvetica12_Character_059[] = {  2,  0,128, 64, 64,  0,  0,  0,  0, 64,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_058[] = {  1,  0,  0,  0,128,  0,  0,  0,  0,128,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_044[] = {  2,  0,128, 64, 64,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_046[] = {  1,  0,  0,  0,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_060[] = {  6,  0,  0,  0,  0, 12, 48,192, 48, 12,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_062[] = {  6,  0,  0,  0,  0,192, 48, 12, 48,192,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica12_Character_047[] = {  4,  0,  0,  0,128,128, 64, 64, 64, 32, 32, 16, 16,  0,  0,  0};
-static const GLubyte Helvetica12_Character_063[] = {  5,  0,  0,  0, 32,  0, 32, 32, 16, 16,136,136,112,  0,  0,  0};
-static const GLubyte Helvetica12_Character_092[] = {  4,  0,  0,  0, 16, 16, 32, 32, 32, 64, 64,128,128,  0,  0,  0};
-static const GLubyte Helvetica12_Character_034[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,160,160,160,  0,  0,  0};
+const SFG_Font fgFontHelvetica10 = { "-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1", 93, 13, Helvetica10_Character_Map, -2.0f, 3.0f };
+
+static const GLubyte Helvetica12_Character_032[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* " " */
+static const GLubyte Helvetica12_Character_097[] = {  6,  0,  0,  0,116,136,136,120,  8,136,112,  0,  0,  0,  0,  0}; /* "a" */
+static const GLubyte Helvetica12_Character_098[] = {  6,  0,  0,  0,176,200,136,136,136,200,176,128,128,  0,  0,  0}; /* "b" */
+static const GLubyte Helvetica12_Character_099[] = {  6,  0,  0,  0,112,136,128,128,128,136,112,  0,  0,  0,  0,  0}; /* "c" */
+static const GLubyte Helvetica12_Character_100[] = {  6,  0,  0,  0,104,152,136,136,136,152,104,  8,  8,  0,  0,  0}; /* "d" */
+static const GLubyte Helvetica12_Character_101[] = {  6,  0,  0,  0,112,136,128,248,136,136,112,  0,  0,  0,  0,  0}; /* "e" */
+static const GLubyte Helvetica12_Character_102[] = {  2,  0,  0,  0, 64, 64, 64, 64, 64, 64,224, 64, 48,  0,  0,  0}; /* "f" */
+static const GLubyte Helvetica12_Character_103[] = {  6,112,136,  8,104,152,136,136,136,152,104,  0,  0,  0,  0,  0}; /* "g" */
+static const GLubyte Helvetica12_Character_104[] = {  6,  0,  0,  0,136,136,136,136,136,200,176,128,128,  0,  0,  0}; /* "h" */
+static const GLubyte Helvetica12_Character_105[] = {  2,  0,  0,  0,128,128,128,128,128,128,128,  0,128,  0,  0,  0}; /* "i" */
+static const GLubyte Helvetica12_Character_106[] = {  2,128, 64, 64, 64, 64, 64, 64, 64, 64, 64,  0, 64,  0,  0,  0}; /* "j" */
+static const GLubyte Helvetica12_Character_107[] = {  5,  0,  0,  0,136,144,160,192,192,160,144,128,128,  0,  0,  0}; /* "k" */
+static const GLubyte Helvetica12_Character_108[] = {  2,  0,  0,  0,128,128,128,128,128,128,128,128,128,  0,  0,  0}; /* "l" */
+static const GLubyte Helvetica12_Character_109[] = {  8,  0,  0,  0,146,146,146,146,146,218,164,  0,  0,  0,  0,  0}; /* "m" */
+static const GLubyte Helvetica12_Character_110[] = {  6,  0,  0,  0,136,136,136,136,136,200,176,  0,  0,  0,  0,  0}; /* "n" */
+static const GLubyte Helvetica12_Character_111[] = {  6,  0,  0,  0,112,136,136,136,136,136,112,  0,  0,  0,  0,  0}; /* "o" */
+static const GLubyte Helvetica12_Character_112[] = {  6,128,128,128,176,200,136,136,136,200,176,  0,  0,  0,  0,  0}; /* "p" */
+static const GLubyte Helvetica12_Character_113[] = {  6,  8,  8,  8,104,152,136,136,136,152,104,  0,  0,  0,  0,  0}; /* "q" */
+static const GLubyte Helvetica12_Character_114[] = {  3,  0,  0,  0,128,128,128,128,128,192,160,  0,  0,  0,  0,  0}; /* "r" */
+static const GLubyte Helvetica12_Character_115[] = {  5,  0,  0,  0, 96,144, 16, 96,128,144, 96,  0,  0,  0,  0,  0}; /* "s" */
+static const GLubyte Helvetica12_Character_116[] = {  1,  0,  0,  0, 96, 64, 64, 64, 64, 64,224, 64, 64,  0,  0,  0}; /* "t" */
+static const GLubyte Helvetica12_Character_117[] = {  6,  0,  0,  0,104,152,136,136,136,136,136,  0,  0,  0,  0,  0}; /* "u" */
+static const GLubyte Helvetica12_Character_118[] = {  6,  0,  0,  0, 32, 32, 80, 80,136,136,136,  0,  0,  0,  0,  0}; /* "v" */
+static const GLubyte Helvetica12_Character_119[] = {  9,  0,  0,  0,  0,  0,  0, 34,  0, 34,  0, 85,  0, 73,  0, 73,  0,136,128,136,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "w" */
+static const GLubyte Helvetica12_Character_120[] = {  5,  0,  0,  0,132,132, 72, 48, 48, 72,132,  0,  0,  0,  0,  0}; /* "x" */
+static const GLubyte Helvetica12_Character_121[] = {  6,128, 64, 32, 32, 80, 80,144,136,136,136,  0,  0,  0,  0,  0}; /* "y" */
+static const GLubyte Helvetica12_Character_122[] = {  5,  0,  0,  0,240,128, 64, 64, 32, 16,240,  0,  0,  0,  0,  0}; /* "z" */
+static const GLubyte Helvetica12_Character_065[] = {  8,  0,  0,  0,130,130,130,124, 68, 68, 40, 40, 16,  0,  0,  0}; /* "A" */
+static const GLubyte Helvetica12_Character_066[] = {  7,  0,  0,  0,248,132,132,132,248,132,132,132,248,  0,  0,  0}; /* "B" */
+static const GLubyte Helvetica12_Character_067[] = {  8,  0,  0,  0, 60, 66,128,128,128,128,128, 66, 60,  0,  0,  0}; /* "C" */
+static const GLubyte Helvetica12_Character_068[] = {  8,  0,  0,  0,248,132,130,130,130,130,130,132,248,  0,  0,  0}; /* "D" */
+static const GLubyte Helvetica12_Character_069[] = {  7,  0,  0,  0,252,128,128,128,252,128,128,128,252,  0,  0,  0}; /* "E" */
+static const GLubyte Helvetica12_Character_070[] = {  7,  0,  0,  0,128,128,128,128,248,128,128,128,252,  0,  0,  0}; /* "F" */
+static const GLubyte Helvetica12_Character_071[] = {  8,  0,  0,  0, 58, 70,130,130,142,128,128, 66, 60,  0,  0,  0}; /* "G" */
+static const GLubyte Helvetica12_Character_072[] = {  8,  0,  0,  0,130,130,130,130,254,130,130,130,130,  0,  0,  0}; /* "H" */
+static const GLubyte Helvetica12_Character_073[] = {  2,  0,  0,  0,128,128,128,128,128,128,128,128,128,  0,  0,  0}; /* "I" */
+static const GLubyte Helvetica12_Character_074[] = {  6,  0,  0,  0,112,136,136,  8,  8,  8,  8,  8,  8,  0,  0,  0}; /* "J" */
+static const GLubyte Helvetica12_Character_075[] = {  7,  0,  0,  0,130,132,136,144,224,160,144,136,132,  0,  0,  0}; /* "K" */
+static const GLubyte Helvetica12_Character_076[] = {  6,  0,  0,  0,248,128,128,128,128,128,128,128,128,  0,  0,  0}; /* "L" */
+static const GLubyte Helvetica12_Character_077[] = { 10,  0,  0,  0,  0,  0,  0,136,128,136,128,148,128,148,128,162,128,162,128,193,128,193,128,128,128,  0,  0,  0,  0,  0,  0}; /* "M" */
+static const GLubyte Helvetica12_Character_078[] = {  8,  0,  0,  0,130,134,138,138,146,162,162,194,130,  0,  0,  0}; /* "N" */
+static const GLubyte Helvetica12_Character_079[] = {  9,  0,  0,  0,  0,  0,  0, 60,  0, 66,  0,129,  0,129,  0,129,  0,129,  0,129,  0, 66,  0, 60,  0,  0,  0,  0,  0,  0,  0}; /* "O" */
+static const GLubyte Helvetica12_Character_080[] = {  7,  0,  0,  0,128,128,128,128,248,132,132,132,248,  0,  0,  0}; /* "P" */
+static const GLubyte Helvetica12_Character_081[] = {  9,  0,  0,  0,  0,  0,  0, 61,  0, 66,  0,133,  0,137,  0,129,  0,129,  0,129,  0, 66,  0, 60,  0,  0,  0,  0,  0,  0,  0}; /* "Q" */
+static const GLubyte Helvetica12_Character_082[] = {  7,  0,  0,  0,132,132,132,136,248,132,132,132,248,  0,  0,  0}; /* "R" */
+static const GLubyte Helvetica12_Character_083[] = {  7,  0,  0,  0,120,132,132,  4, 24, 96,128,132,120,  0,  0,  0}; /* "S" */
+static const GLubyte Helvetica12_Character_084[] = {  6,  0,  0,  0, 16, 16, 16, 16, 16, 16, 16, 16,254,  0,  0,  0}; /* "T" */
+static const GLubyte Helvetica12_Character_085[] = {  7,  0,  0,  0,120,132,132,132,132,132,132,132,132,  0,  0,  0}; /* "U" */
+static const GLubyte Helvetica12_Character_087[] = { 10,  0,  0,  0,  0,  0,  0, 34,  0, 34,  0, 34,  0, 85,  0, 85,  0, 73,  0,136,128,136,128,136,128,  0,  0,  0,  0,  0,  0}; /* "V" */
+static const GLubyte Helvetica12_Character_086[] = {  8,  0,  0,  0, 16, 16, 40, 40, 68, 68, 68,130,130,  0,  0,  0}; /* "W" */
+static const GLubyte Helvetica12_Character_088[] = {  8,  0,  0,  0,130, 68, 68, 40, 16, 40, 68, 68,130,  0,  0,  0}; /* "X" */
+static const GLubyte Helvetica12_Character_089[] = {  8,  0,  0,  0, 16, 16, 16, 16, 40, 68, 68,130,130,  0,  0,  0}; /* "Y" */
+static const GLubyte Helvetica12_Character_090[] = {  8,  0,  0,  0,254,128, 64, 32, 16,  8,  4,  2,254,  0,  0,  0}; /* "Z" */
+static const GLubyte Helvetica12_Character_048[] = {  6,  0,  0,  0,112,136,136,136,136,136,136,136,112,  0,  0,  0}; /* "0" */
+static const GLubyte Helvetica12_Character_049[] = {  6,  0,  0,  0, 32, 32, 32, 32, 32, 32, 32,224, 32,  0,  0,  0}; /* "1" */
+static const GLubyte Helvetica12_Character_050[] = {  6,  0,  0,  0,248,128,128, 64, 32, 16,  8,136,112,  0,  0,  0}; /* "2" */
+static const GLubyte Helvetica12_Character_051[] = {  6,  0,  0,  0,112,136,136,  8,  8, 48,  8,136,112,  0,  0,  0}; /* "3" */
+static const GLubyte Helvetica12_Character_052[] = {  6,  0,  0,  0,  8,  8,252,136, 72, 40, 40, 24,  8,  0,  0,  0}; /* "4" */
+static const GLubyte Helvetica12_Character_053[] = {  6,  0,  0,  0,112,136,136,  8,  8,240,128,128,248,  0,  0,  0}; /* "5" */
+static const GLubyte Helvetica12_Character_054[] = {  6,  0,  0,  0,112,136,136,136,200,176,128,136,112,  0,  0,  0}; /* "6" */
+static const GLubyte Helvetica12_Character_055[] = {  6,  0,  0,  0, 64, 64, 32, 32, 32, 16, 16,  8,248,  0,  0,  0}; /* "7" */
+static const GLubyte Helvetica12_Character_056[] = {  6,  0,  0,  0,112,136,136,136,136,112,136,136,112,  0,  0,  0}; /* "8" */
+static const GLubyte Helvetica12_Character_057[] = {  6,  0,  0,  0,112,136,  8,  8,120,136,136,136,112,  0,  0,  0}; /* "9" */
+static const GLubyte Helvetica12_Character_096[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,192,128, 64,  0,  0,  0}; /* "`" */
+static const GLubyte Helvetica12_Character_126[] = {  7,  0,  0,  0,  0,  0,  0,152,100,  0,  0,  0,  0,  0,  0,  0}; /* "~" */
+static const GLubyte Helvetica12_Character_033[] = {  2,  0,  0,  0,128,  0,128,128,128,128,128,128,128,  0,  0,  0}; /* "!" */
+static const GLubyte Helvetica12_Character_064[] = { 11,  0,  0,  0,  0, 62,  0, 64,  0,155,  0,166,128,162, 64,162, 64,146, 64, 77, 64, 96,128, 31,  0,  0,  0,  0,  0,  0,  0}; /* "@" */
+static const GLubyte Helvetica12_Character_035[] = {  6,  0,  0,  0, 80, 80, 80,252, 40,252, 40, 40,  0,  0,  0,  0}; /* "#" */
+static const GLubyte Helvetica12_Character_036[] = {  6,  0,  0, 32,112,168,168, 40,112,160,168,112, 32,  0,  0,  0}; /* "$" */
+static const GLubyte Helvetica12_Character_037[] = { 10,  0,  0,  0,  0,  0,  0, 35,  0, 20,128, 20,128, 19,  0,  8,  0,104,  0,148,  0,148,  0, 98,  0,  0,  0,  0,  0,  0,  0}; /* "%" */
+static const GLubyte Helvetica12_Character_094[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,136, 80, 32,  0,  0,  0,  0}; /* "^" */
+static const GLubyte Helvetica12_Character_038[] = {  8,  0,  0,  0,114,140,132,138, 80, 48, 72, 72, 48,  0,  0,  0}; /* "&" */
+static const GLubyte Helvetica12_Character_042[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,160, 64,160,  0,  0,  0}; /* "*" */
+static const GLubyte Helvetica12_Character_040[] = {  3, 32, 64, 64,128,128,128,128,128,128, 64, 64, 32,  0,  0,  0}; /* "(" */
+static const GLubyte Helvetica12_Character_041[] = {  3,128, 64, 64, 32, 32, 32, 32, 32, 32, 64, 64,128,  0,  0,  0}; /* ")" */
+static const GLubyte Helvetica12_Character_045[] = {  7,  0,  0,  0,  0,  0,  0,248,  0,  0,  0,  0,  0,  0,  0,  0}; /* "-" */
+static const GLubyte Helvetica12_Character_095[] = {  6,  0,255,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "_" */
+static const GLubyte Helvetica12_Character_061[] = {  6,  0,  0,  0,  0,  0,248,  0,248,  0,  0,  0,  0,  0,  0,  0}; /* "=" */
+static const GLubyte Helvetica12_Character_043[] = {  6,  0,  0,  0,  0, 32, 32,248, 32, 32,  0,  0,  0,  0,  0,  0}; /* "+" */
+static const GLubyte Helvetica12_Character_091[] = {  2,192,128,128,128,128,128,128,128,128,128,128,192,  0,  0,  0}; /* "[" */
+static const GLubyte Helvetica12_Character_123[] = {  3, 48, 64, 64, 64, 64, 64,128, 64, 64, 64, 64, 48,  0,  0,  0}; /* "{" */
+static const GLubyte Helvetica12_Character_125[] = {  3,192, 32, 32, 32, 32, 32, 16, 32, 32, 32, 32,192,  0,  0,  0}; /* "}" */
+static const GLubyte Helvetica12_Character_093[] = {  2,192, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,192,  0,  0,  0}; /* "]" */
+static const GLubyte Helvetica12_Character_059[] = {  2,  0,128, 64, 64,  0,  0,  0,  0, 64,  0,  0,  0,  0,  0,  0}; /* ";" */
+static const GLubyte Helvetica12_Character_058[] = {  2,  0,  0,  0,128,  0,  0,  0,  0,128,  0,  0,  0,  0,  0,  0}; /* ":" */
+static const GLubyte Helvetica12_Character_044[] = {  3,  0,128, 64, 64,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "," */
+static const GLubyte Helvetica12_Character_046[] = {  2,  0,  0,  0,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "." */
+static const GLubyte Helvetica12_Character_060[] = {  6,  0,  0,  0,  0, 12, 48,192, 48, 12,  0,  0,  0,  0,  0,  0}; /* "<" */
+static const GLubyte Helvetica12_Character_062[] = {  6,  0,  0,  0,  0,192, 48, 12, 48,192,  0,  0,  0,  0,  0,  0}; /* ">" */
+static const GLubyte Helvetica12_Character_047[] = {  3,  0,  0,  0,128,128,128, 64, 64, 64, 32, 32, 32,  0,  0,  0}; /* "/" */
+static const GLubyte Helvetica12_Character_063[] = {  6,  0,  0,  0, 32,  0, 32, 32, 16, 16,136,136,112,  0,  0,  0}; /* "?" */
+static const GLubyte Helvetica12_Character_092[] = {  3,  0,  0,  0, 32, 32, 32, 64, 64, 64,128,128,128,  0,  0,  0}; /* "\" */
+static const GLubyte Helvetica12_Character_034[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,160,160,160,  0,  0,  0}; /* """ */
+
+/* Missing Characters filled in by John Fay by hand ... */
+static const GLubyte Helvetica12_Character_039[] = {  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,128, 64, 64,  0,  0}; /* "'" */
+static const GLubyte Helvetica12_Character_124[] = {  2, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  0,  0}; /* "|" */
+
 
 /* The font characters mapping: */
-static const GLubyte* Helvetica12_Character_Map[] = {Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_032,Helvetica12_Character_033,Helvetica12_Character_034,Helvetica12_Character_035,Helvetica12_Character_036,Helvetica12_Character_037,Helvetica12_Character_038,Helvetica12_Character_042,Helvetica12_Character_040,Helvetica12_Character_041,Helvetica12_Character_042,Helvetica12_Character_043,Helvetica12_Character_044,Helvetica12_Character_045,Helvetica12_Character_046,Helvetica12_Character_047,Helvetica12_Character_048,Helvetica12_Character_049,Helvetica12_Character_050,Helvetica12_Character_051,Helvetica12_Character_052,Helvetica12_Character_053,Helvetica12_Character_054,Helvetica12_Character_055,Helvetica12_Character_056,Helvetica12_Character_057,Helvetica12_Character_058,Helvetica12_Character_059,Helvetica12_Character_060,Helvetica12_Character_061,Helvetica12_Character_062,Helvetica12_Character_063,Helvetica12_Character_064,Helvetica12_Character_065,Helvetica12_Character_066,Helvetica12_Character_067,Helvetica12_Character_068,Helvetica12_Character_069,Helvetica12_Character_070,Helvetica12_Character_071,Helvetica12_Character_072,Helvetica12_Character_073,Helvetica12_Character_074,Helvetica12_Character_075,Helvetica12_Character_076,Helvetica12_Character_077,Helvetica12_Character_078,Helvetica12_Character_079,Helvetica12_Character_080,Helvetica12_Character_081,Helvetica12_Character_082,Helvetica12_Character_083,Helvetica12_Character_084,Helvetica12_Character_085,Helvetica12_Character_086,Helvetica12_Character_087,Helvetica12_Character_088,Helvetica12_Character_089,Helvetica12_Character_090,Helvetica12_Character_091,Helvetica12_Character_092,Helvetica12_Character_093,Helvetica12_Character_094,Helvetica12_Character_095,Helvetica12_Character_096,Helvetica12_Character_097,Helvetica12_Character_098,Helvetica12_Character_099,Helvetica12_Character_100,Helvetica12_Character_101,Helvetica12_Character_102,Helvetica12_Character_103,Helvetica12_Character_104,Helvetica12_Character_105,Helvetica12_Character_106,Helvetica12_Character_107,Helvetica12_Character_108,Helvetica12_Character_109,Helvetica12_Character_110,Helvetica12_Character_111,Helvetica12_Character_112,Helvetica12_Character_113,Helvetica12_Character_114,Helvetica12_Character_115,Helvetica12_Character_116,Helvetica12_Character_117,Helvetica12_Character_118,Helvetica12_Character_119,Helvetica12_Character_120,Helvetica12_Character_121,Helvetica12_Character_122,Helvetica12_Character_123,Helvetica12_Character_042,Helvetica12_Character_125,Helvetica12_Character_126,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,NULL};
+static const GLubyte* Helvetica12_Character_Map[] = {Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_032,Helvetica12_Character_033,Helvetica12_Character_034,Helvetica12_Character_035,Helvetica12_Character_036,Helvetica12_Character_037,
+ Helvetica12_Character_038,Helvetica12_Character_039,Helvetica12_Character_040,Helvetica12_Character_041,Helvetica12_Character_042,Helvetica12_Character_043,Helvetica12_Character_044,Helvetica12_Character_045,Helvetica12_Character_046,Helvetica12_Character_047,Helvetica12_Character_048,Helvetica12_Character_049,Helvetica12_Character_050,Helvetica12_Character_051,Helvetica12_Character_052,Helvetica12_Character_053,Helvetica12_Character_054,Helvetica12_Character_055,Helvetica12_Character_056,Helvetica12_Character_057,Helvetica12_Character_058,Helvetica12_Character_059,Helvetica12_Character_060,Helvetica12_Character_061,Helvetica12_Character_062,Helvetica12_Character_063,Helvetica12_Character_064,Helvetica12_Character_065,Helvetica12_Character_066,Helvetica12_Character_067,Helvetica12_Character_068,Helvetica12_Character_069,Helvetica12_Character_070,Helvetica12_Character_071,Helvetica12_Character_072,Helvetica12_Character_073,Helvetica12_Character_074,Helvetica12_Character_075,Helvetica12_Character_076,
+ Helvetica12_Character_077,Helvetica12_Character_078,Helvetica12_Character_079,Helvetica12_Character_080,Helvetica12_Character_081,Helvetica12_Character_082,Helvetica12_Character_083,Helvetica12_Character_084,Helvetica12_Character_085,Helvetica12_Character_086,Helvetica12_Character_087,Helvetica12_Character_088,Helvetica12_Character_089,Helvetica12_Character_090,Helvetica12_Character_091,Helvetica12_Character_092,Helvetica12_Character_093,Helvetica12_Character_094,Helvetica12_Character_095,Helvetica12_Character_096,Helvetica12_Character_097,Helvetica12_Character_098,Helvetica12_Character_099,Helvetica12_Character_100,Helvetica12_Character_101,Helvetica12_Character_102,Helvetica12_Character_103,Helvetica12_Character_104,Helvetica12_Character_105,Helvetica12_Character_106,Helvetica12_Character_107,Helvetica12_Character_108,Helvetica12_Character_109,Helvetica12_Character_110,Helvetica12_Character_111,Helvetica12_Character_112,Helvetica12_Character_113,Helvetica12_Character_114,Helvetica12_Character_115,
+ Helvetica12_Character_116,Helvetica12_Character_117,Helvetica12_Character_118,Helvetica12_Character_119,Helvetica12_Character_120,Helvetica12_Character_121,Helvetica12_Character_122,Helvetica12_Character_123,Helvetica12_Character_124,Helvetica12_Character_125,Helvetica12_Character_126,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,
+ Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,
+ Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,
+ Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,Helvetica12_Character_042,NULL};
 
 /* The font structure: */
-const SFG_Font fgFontHelvetica12 = { "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", 93, 15, Helvetica12_Character_Map };
-
-static const GLubyte Helvetica18_Character_032[] = { 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_097[] = {  7,  0,  0,  0,  0,118,238,198,198,230,126, 14,198,238,124,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_098[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,222,  0,255,  0,227,  0,193,128,193,128,193,128,193,128,227,  0,255,  0,222,  0,192,  0,192,  0,192,  0,192,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_099[] = {  8,  0,  0,  0,  0, 62,127, 99,192,192,192,192, 99,127, 62,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_100[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 61,128,127,128, 99,128,193,128,193,128,193,128,193,128, 99,128,127,128, 61,128,  1,128,  1,128,  1,128,  1,128,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_101[] = {  8,  0,  0,  0,  0, 60,127,227,192,192,255,195,195,126, 60,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_102[] = {  6,  0,  0,  0,  0, 48, 48, 48, 48, 48, 48, 48, 48,252,252, 48, 48, 60, 28,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_103[] = {  9, 28,  0,127,  0, 99,  0,  1,128, 61,128,127,128, 99,128,193,128,193,128,193,128,193,128, 97,128,127,128, 61,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_104[] = {  8,  0,  0,  0,  0,195,195,195,195,195,195,195,227,223,206,192,192,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_105[] = {  2,  0,  0,  0,  0,192,192,192,192,192,192,192,192,192,192,  0,  0,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_106[] = {  4,224,240, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,  0,  0, 48, 48,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_107[] = {  8,  0,  0,  0,  0,199,198,206,204,216,248,240,216,204,198,192,192,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_108[] = {  2,  0,  0,  0,  0,192,192,192,192,192,192,192,192,192,192,192,192,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_109[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,198, 48,198, 48,198, 48,198, 48,198, 48,198, 48,198, 48,231, 48,222,240,204, 96,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_110[] = {  8,  0,  0,  0,  0,195,195,195,195,195,195,195,227,223,206,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_111[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 62,  0,127,  0, 99,  0,193,128,193,128,193,128,193,128, 99,  0,127,  0, 62,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_112[] = {  9,192,  0,192,  0,192,  0,192,  0,222,  0,255,  0,227,  0,193,128,193,128,193,128,193,128,227,  0,255,  0,222,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_113[] = {  9,  1,128,  1,128,  1,128,  1,128, 61,128,127,128, 99,128,193,128,193,128,193,128,193,128, 99,128,127,128, 61,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_114[] = {  5,  0,  0,  0,  0,192,192,192,192,192,192,192,224,216,216,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_115[] = {  7,  0,  0,  0,  0,120,252,198,  6, 62,252,192,198,126, 60,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_116[] = {  6,  0,  0,  0,  0, 24, 56, 48, 48, 48, 48, 48, 48,252,252, 48, 48, 48,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_117[] = {  8,  0,  0,  0,  0,115,251,199,195,195,195,195,195,195,195,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_119[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0, 25,128, 25,128, 57,192, 41, 64,105, 96,102, 96,102, 96,198, 48,198, 48,198, 48,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_118[] = {  8,  0,  0,  0,  0, 24, 24, 60, 36,102,102,102,195,195,195,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_120[] = {  8,  0,  0,  0,  0,195,231,102, 60, 24, 24, 60,102,231,195,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_121[] = {  8,112,112, 24, 24, 24, 24, 60, 36,102,102,102,195,195,195,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_122[] = {  7,  0,  0,  0,  0,254,254,192, 96, 48, 24, 12,  6,254,254,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_065[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,192, 48,192, 48, 96, 96, 96, 96,127,224, 63,192, 48,192, 48,192, 25,128, 25,128, 15,  0, 15,  0,  6,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_066[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,255,128,255,192,192,224,192, 96,192, 96,192,224,255,192,255,128,193,128,192,192,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_067[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0, 15,128, 63,224,112,112, 96, 48,224,  0,192,  0,192,  0,192,  0,192,  0,224,  0, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_068[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,255,  0,255,128,193,192,192,192,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_069[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,255,128,255,128,192,  0,192,  0,192,  0,192,  0,255,  0,255,  0,192,  0,192,  0,192,  0,192,  0,255,128,255,128,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_070[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,255,  0,255,  0,192,  0,192,  0,192,  0,192,  0,255,128,255,128,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_071[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0, 15,176, 63,240,112,112, 96, 48,224, 48,193,240,193,240,192,  0,192,  0,224, 48, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_072[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,255,224,255,224,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_073[] = {  2,  0,  0,  0,  0,192,192,192,192,192,192,192,192,192,192,192,192,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_074[] = {  8,  0,  0,  0,  0, 60,126,231,195,195,  3,  3,  3,  3,  3,  3,  3,  3,  3,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_075[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,192,112,192,224,193,192,195,128,199,  0,206,  0,252,  0,248,  0,220,  0,206,  0,199,  0,195,128,193,192,192,224,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_076[] = {  8,  0,  0,  0,  0,255,255,192,192,192,192,192,192,192,192,192,192,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_077[] = { 14,  0,  0,  0,  0,  0,  0,  0,  0,195, 12,195, 12,199,140,196,140,204,204,204,204,216,108,216,108,240, 60,240, 60,224, 28,224, 28,192, 12,192, 12,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_078[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,192, 96,192,224,193,224,193,224,195, 96,198, 96,198, 96,204, 96,204, 96,216, 96,240, 96,240, 96,224, 96,192, 96,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_079[] = { 13,  0,  0,  0,  0,  0,  0,  0,  0, 15,128, 63,224,112,112, 96, 48,224, 56,192, 24,192, 24,192, 24,192, 24,224, 56, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_080[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,255,  0,255,128,193,192,192,192,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_081[] = { 13,  0,  0,  0,  0,  0,  0,  0, 48, 15,176, 63,224,112,240, 97,176,225,184,192, 24,192, 24,192, 24,192, 24,224, 56, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_082[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,192,192,192,192,192,192,192,192,193,128,193,128,255,  0,255,128,193,192,192,192,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_083[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0, 63,  0,127,192,224,224,192, 96,  0, 96,  0,224,  3,192, 31,  0,124,  0,224,  0,192, 96,224,224,127,192, 31,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_084[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0,255,192,255,192,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_085[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0, 31,  0,127,192, 96,192,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_087[] = { 16,  0,  0,  0,  0,  0,  0,  0,  0, 24, 24, 24, 24, 28, 56, 52, 44, 54,108, 54,108,102,102,102,102, 98, 70, 99,198,195,195,193,131,193,131,193,131,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_086[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0, 15,  0, 15,  0, 25,128, 25,128, 25,128, 48,192, 48,192, 48,192, 96, 96, 96, 96, 96, 96,192, 48,192, 48,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_088[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,192, 96,224,224, 96,192,113,192, 49,128, 27,  0, 14,  0, 14,  0, 27,  0, 49,128,113,192, 96,192,224,224,192, 96,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_089[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  6,  0,  6,  0,  6,  0,  6,  0,  6,  0, 15,  0, 25,128, 48,192, 48,192, 96, 96, 96, 96,192, 48,192, 48,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_090[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,255,192,255,192,192,  0, 96,  0, 48,  0, 24,  0, 28,  0, 12,  0,  6,  0,  3,  0,  1,128,  0,192,255,192,255,192,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_048[] = {  8,  0,  0,  0,  0, 60,126,102,195,195,195,195,195,195,195,102,126, 60,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_049[] = {  5,  0,  0,  0,  0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,248,248, 24,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_050[] = {  8,  0,  0,  0,  0,255,255,192,224,112, 56, 28, 14,  7,  3,195,254, 60,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_051[] = {  8,  0,  0,  0,  0, 60,126,199,195,  3,  7, 30, 28,  6,195,195,126, 60,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_052[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  3,  0,  3,  0,255,128,255,128,195,  0, 99,  0, 51,  0, 51,  0, 27,  0, 15,  0,  7,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_053[] = {  8,  0,  0,  0,  0,124,254,199,195,  3,  3,199,254,252,192,192,254,254,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_054[] = {  8,  0,  0,  0,  0, 60,126,227,195,195,195,254,220,192,192, 99,127, 60,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_055[] = {  8,  0,  0,  0,  0, 96, 96, 48, 48, 48, 24, 24, 12, 12,  6,  3,255,255,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_056[] = {  8,  0,  0,  0,  0, 60,126,231,195,195,102,126,102,195,195,231,126, 60,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_057[] = {  8,  0,  0,  0,  0,124,254,198,  3,  3, 59,127,195,195,195,199,126, 60,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_096[] = {  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,192,192,128,128, 64,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_126[] = {  8,  0,  0,  0,  0,  0,  0,  0,  0,204,126, 51,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_033[] = {  2,  0,  0,  0,  0,192,192,  0,  0,128,128,192,192,192,192,192,192,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_064[] = { 16,  0,  0,  7,224, 31,240, 56,  0,112,  0,103,112,207,248,204,204,204,102,204,102,204, 99,198, 51,103,115, 99,179, 48,  6, 28, 14, 15,252,  3,240,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_035[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0, 36,  0, 36,  0, 36,  0,255,128,255,128, 18,  0, 18,  0, 18,  0,127,192,127,192,  9,  0,  9,  0,  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_036[] = {  9,  0,  0,  0,  0,  8,  0,  8,  0, 62,  0,127,  0,235,128,201,128,  9,128, 15,  0, 62,  0,120,  0,232,  0,200,  0,203,  0,127,  0, 62,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_037[] = { 14,  0,  0,  0,  0,  0,  0,  0,  0, 24,120, 24,252, 12,204, 12,204,  6,252,  6,120,  3,  0,123,  0,253,128,205,128,204,192,252,192,120, 96,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_094[] = {  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,130,198,108, 56, 16,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_038[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0, 60,112,126,224,231,192,195,128,195,192,198,192,238,192,124,  0, 60,  0,102,  0,102,  0,126,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_042[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,136,112,112,248, 32, 32,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_040[] = {  4, 16, 48, 96, 96,192,192,192,192,192,192,192,192,192,192, 96, 96, 48, 16,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_041[] = {  4,128,192, 96, 96, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 96, 96,192,128,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_045[] = {  8,  0,  0,  0,  0,  0,  0,  0,  0,255,255,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_095[] = { 10,255,192,255,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_061[] = {  7,  0,  0,  0,  0,  0,  0,254,254,  0,  0,254,254,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_043[] = {  8,  0,  0,  0,  0, 24, 24, 24, 24,255,255, 24, 24, 24, 24,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_091[] = {  4,240,240,192,192,192,192,192,192,192,192,192,192,192,192,192,192,240,240,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_123[] = {  6, 12, 24, 48, 48, 48, 48, 48, 48, 96,192, 96, 48, 48, 48, 48, 48, 24, 12,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_125[] = {  6,192, 96, 48, 48, 48, 48, 48, 48, 24, 12, 24, 48, 48, 48, 48, 48, 96,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_093[] = {  4,240,240, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,240,240,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_059[] = {  2,  0,128, 64, 64,192,192,  0,  0,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_058[] = {  2,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_044[] = {  2,  0,128, 64, 64,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_046[] = {  2,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_060[] = {  8,  0,  0,  0,  0,  3, 15, 60,112,192,112, 60, 15,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_062[] = {  8,  0,  0,  0,  0,192,240, 60, 14,  3, 14, 60,240,192,  0,  0,  0,  0,  0,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_047[] = {  5,  0,  0,  0,  0,192,192, 64, 64, 96, 96, 32, 32, 48, 48, 16, 16, 24, 24,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_063[] = {  7,  0,  0,  0,  0, 48, 48,  0,  0, 48, 48, 48, 56, 28, 14,198,198,254,124,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_092[] = {  5,  0,  0,  0,  0, 24, 24, 16, 16, 48, 48, 32, 32, 96, 96, 64, 64,192,192,  0,  0,  0,  0};
-static const GLubyte Helvetica18_Character_034[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,144,144,216,216,216,  0,  0,  0,  0};
+const SFG_Font fgFontHelvetica12 = { "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", 93, 15, Helvetica12_Character_Map, -1.0f, 3.0f };
+
+static const GLubyte Helvetica18_Character_032[] = {  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* " " */
+static const GLubyte Helvetica18_Character_097[] = {  8,  0,  0,  0,  0,118,238,198,198,230,126, 14,198,238,124,  0,  0,  0,  0,  0,  0,  0,  0}; /* "a" */
+static const GLubyte Helvetica18_Character_098[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,222,  0,255,  0,227,  0,193,128,193,128,193,128,193,128,227,  0,255,  0,222,  0,192,  0,192,  0,192,  0,192,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "b" */
+static const GLubyte Helvetica18_Character_099[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 62,  0,127,  0, 99,  0,192,  0,192,  0,192,  0,192,  0, 99,  0,127,  0, 62,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "c" */
+static const GLubyte Helvetica18_Character_100[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0, 61,128,127,128, 99,128,193,128,193,128,193,128,193,128, 99,128,127,128, 61,128,  1,128,  1,128,  1,128,  1,128,  0,  0,  0,  0,  0,  0,  0,  0}; /* "d" */
+static const GLubyte Helvetica18_Character_101[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 60,  0,127,  0,227,  0,192,  0,192,  0,255,  0,195,  0,195,  0,126,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "e" */
+static const GLubyte Helvetica18_Character_102[] = {  5,  0,  0,  0,  0, 48, 48, 48, 48, 48, 48, 48, 48,252,252, 48, 48, 60, 28,  0,  0,  0,  0}; /* "f" */
+static const GLubyte Helvetica18_Character_103[] = { 10, 28,  0,127,  0, 99,  0,  1,128, 61,128,127,128, 99,128,193,128,193,128,193,128,193,128, 97,128,127,128, 61,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "g" */
+static const GLubyte Helvetica18_Character_104[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,227,  0,223,  0,206,  0,192,  0,192,  0,192,  0,192,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "h" */
+static const GLubyte Helvetica18_Character_105[] = {  3,  0,  0,  0,  0,192,192,192,192,192,192,192,192,192,192,  0,  0,192,192,  0,  0,  0,  0}; /* "i" */
+static const GLubyte Helvetica18_Character_106[] = {  3,224,240, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,  0,  0, 48, 48,  0,  0,  0,  0}; /* "j" */
+static const GLubyte Helvetica18_Character_107[] = {  8,  0,  0,  0,  0,199,198,206,204,216,248,240,216,204,198,192,192,192,192,  0,  0,  0,  0}; /* "k" */
+static const GLubyte Helvetica18_Character_108[] = {  3,  0,  0,  0,  0,192,192,192,192,192,192,192,192,192,192,192,192,192,192,  0,  0,  0,  0}; /* "l" */
+static const GLubyte Helvetica18_Character_109[] = { 13,  0,  0,  0,  0,  0,  0,  0,  0,198, 48,198, 48,198, 48,198, 48,198, 48,198, 48,198, 48,231, 48,222,240,204, 96,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "m" */
+static const GLubyte Helvetica18_Character_110[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,227,  0,223,  0,206,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "n" */
+static const GLubyte Helvetica18_Character_111[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0, 62,  0,127,  0, 99,  0,193,128,193,128,193,128,193,128, 99,  0,127,  0, 62,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "o" */
+static const GLubyte Helvetica18_Character_112[] = { 10,192,  0,192,  0,192,  0,192,  0,222,  0,255,  0,227,  0,193,128,193,128,193,128,193,128,227,  0,255,  0,222,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "p" */
+static const GLubyte Helvetica18_Character_113[] = { 10,  1,128,  1,128,  1,128,  1,128, 61,128,127,128, 99,128,193,128,193,128,193,128,193,128, 99,128,127,128, 61,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "q" */
+static const GLubyte Helvetica18_Character_114[] = {  5,  0,  0,  0,  0,192,192,192,192,192,192,192,224,216,216,  0,  0,  0,  0,  0,  0,  0,  0}; /* "r" */
+static const GLubyte Helvetica18_Character_115[] = {  8,  0,  0,  0,  0,120,252,198,  6, 62,252,192,198,126, 60,  0,  0,  0,  0,  0,  0,  0,  0}; /* "s" */
+static const GLubyte Helvetica18_Character_116[] = {  5,  0,  0,  0,  0, 24, 56, 48, 48, 48, 48, 48, 48,252,252, 48, 48, 48,  0,  0,  0,  0,  0}; /* "t" */
+static const GLubyte Helvetica18_Character_117[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,115,  0,251,  0,199,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "u" */
+static const GLubyte Helvetica18_Character_118[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 24,  0, 24,  0, 60,  0, 36,  0,102,  0,102,  0,102,  0,195,  0,195,  0,195,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "v" */
+static const GLubyte Helvetica18_Character_119[] = { 13,  0,  0,  0,  0,  0,  0,  0,  0, 25,128, 25,128, 57,192, 41, 64,105, 96,102, 96,102, 96,198, 48,198, 48,198, 48,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "w" */
+static const GLubyte Helvetica18_Character_120[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,195,  0,231,  0,102,  0, 60,  0, 24,  0, 24,  0, 60,  0,102,  0,231,  0,195,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "x" */
+static const GLubyte Helvetica18_Character_121[] = {  9,112,  0,112,  0, 24,  0, 24,  0, 24,  0, 24,  0, 60,  0, 36,  0,102,  0,102,  0,102,  0,195,  0,195,  0,195,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "y" */
+static const GLubyte Helvetica18_Character_122[] = {  8,  0,  0,  0,  0,254,254,192, 96, 48, 24, 12,  6,254,254,  0,  0,  0,  0,  0,  0,  0,  0}; /* "z" */
+static const GLubyte Helvetica18_Character_065[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,192, 48,192, 48, 96, 96, 96, 96,127,224, 63,192, 48,192, 48,192, 25,128, 25,128, 15,  0, 15,  0,  6,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "A" */
+static const GLubyte Helvetica18_Character_066[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,255,128,255,192,192,224,192, 96,192, 96,192,224,255,192,255,128,193,128,192,192,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "B" */
+static const GLubyte Helvetica18_Character_067[] = { 13,  0,  0,  0,  0,  0,  0,  0,  0, 15,128, 63,224,112,112, 96, 48,224,  0,192,  0,192,  0,192,  0,192,  0,224,  0, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0}; /* "C" */
+static const GLubyte Helvetica18_Character_068[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,255,  0,255,128,193,192,192,192,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "D" */
+static const GLubyte Helvetica18_Character_069[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,255,128,255,128,192,  0,192,  0,192,  0,192,  0,255,  0,255,  0,192,  0,192,  0,192,  0,192,  0,255,128,255,128,  0,  0,  0,  0,  0,  0,  0,  0}; /* "E" */
+static const GLubyte Helvetica18_Character_070[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,255,  0,255,  0,192,  0,192,  0,192,  0,192,  0,255,128,255,128,  0,  0,  0,  0,  0,  0,  0,  0}; /* "F" */
+static const GLubyte Helvetica18_Character_071[] = { 13,  0,  0,  0,  0,  0,  0,  0,  0, 15,176, 63,240,112,112, 96, 48,224, 48,193,240,193,240,192,  0,192,  0,224, 48, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0}; /* "G" */
+static const GLubyte Helvetica18_Character_072[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,255,224,255,224,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,  0,  0,  0,  0,  0,  0,  0,  0}; /* "H" */
+static const GLubyte Helvetica18_Character_073[] = {  5,  0,  0,  0,  0,192,192,192,192,192,192,192,192,192,192,192,192,192,192,  0,  0,  0,  0}; /* "I" */
+static const GLubyte Helvetica18_Character_074[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 60,  0,126,  0,231,  0,195,  0,195,  0,  3,  0,  3,  0,  3,  0,  3,  0,  3,  0,  3,  0,  3,  0,  3,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "J" */
+static const GLubyte Helvetica18_Character_075[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,192,112,192,224,193,192,195,128,199,  0,206,  0,252,  0,248,  0,220,  0,206,  0,199,  0,195,128,193,192,192,224,  0,  0,  0,  0,  0,  0,  0,  0}; /* "K" */
+static const GLubyte Helvetica18_Character_076[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,255,  0,255,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "L" */
+static const GLubyte Helvetica18_Character_077[] = { 15,  0,  0,  0,  0,  0,  0,  0,  0,195, 12,195, 12,199,140,196,140,204,204,204,204,216,108,216,108,240, 60,240, 60,224, 28,224, 28,192, 12,192, 12,  0,  0,  0,  0,  0,  0,  0,  0}; /* "M" */
+static const GLubyte Helvetica18_Character_078[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,192, 96,192,224,193,224,193,224,195, 96,198, 96,198, 96,204, 96,204, 96,216, 96,240, 96,240, 96,224, 96,192, 96,  0,  0,  0,  0,  0,  0,  0,  0}; /* "N" */
+static const GLubyte Helvetica18_Character_079[] = { 14,  0,  0,  0,  0,  0,  0,  0,  0, 15,128, 63,224,112,112, 96, 48,224, 56,192, 24,192, 24,192, 24,192, 24,224, 56, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0}; /* "O" */
+static const GLubyte Helvetica18_Character_080[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,192,  0,192,  0,192,  0,192,  0,192,  0,192,  0,255,  0,255,128,193,192,192,192,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "P" */
+static const GLubyte Helvetica18_Character_081[] = { 14,  0,  0,  0,  0,  0,  0,  0, 48, 15,176, 63,224,112,240, 97,176,225,184,192, 24,192, 24,192, 24,192, 24,224, 56, 96, 48,112,112, 63,224, 15,128,  0,  0,  0,  0,  0,  0,  0,  0}; /* "Q" */
+static const GLubyte Helvetica18_Character_082[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,192,192,192,192,192,192,192,192,193,128,193,128,255,  0,255,128,193,192,192,192,192,192,193,192,255,128,255,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "R" */
+static const GLubyte Helvetica18_Character_083[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0, 63,  0,127,192,224,224,192, 96,  0, 96,  0,224,  3,192, 31,  0,124,  0,224,  0,192, 96,224,224,127,192, 31,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "S" */
+static const GLubyte Helvetica18_Character_084[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0, 12,  0,255,192,255,192,  0,  0,  0,  0,  0,  0,  0,  0}; /* "T" */
+static const GLubyte Helvetica18_Character_085[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0, 31,  0,127,192, 96,192,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,192, 96,  0,  0,  0,  0,  0,  0,  0,  0}; /* "U" */
+static const GLubyte Helvetica18_Character_086[] = { 13,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0, 15,  0, 15,  0, 25,128, 25,128, 25,128, 48,192, 48,192, 48,192, 96, 96, 96, 96, 96, 96,192, 48,192, 48,  0,  0,  0,  0,  0,  0,  0,  0}; /* "V" */
+static const GLubyte Helvetica18_Character_087[] = { 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 24, 24,  0, 24, 24,  0, 28, 56,  0, 52, 44,  0, 54,108,  0, 54,108,  0,102,102,  0,102,102,  0, 98, 70,  0, 99,198,  0,195,195,  0,193,131,  0,193,131,  0,193,131,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "W" */
+static const GLubyte Helvetica18_Character_088[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0,192, 96,224,224, 96,192,113,192, 49,128, 27,  0, 14,  0, 14,  0, 27,  0, 49,128,113,192, 96,192,224,224,192, 96,  0,  0,  0,  0,  0,  0,  0,  0}; /* "X" */
+static const GLubyte Helvetica18_Character_089[] = { 13,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  6,  0,  6,  0,  6,  0,  6,  0,  6,  0, 15,  0, 25,128, 48,192, 48,192, 96, 96, 96, 96,192, 48,192, 48,  0,  0,  0,  0,  0,  0,  0,  0}; /* "Y" */
+static const GLubyte Helvetica18_Character_090[] = { 11,  0,  0,  0,  0,  0,  0,  0,  0,255,192,255,192,192,  0, 96,  0, 48,  0, 24,  0, 28,  0, 12,  0,  6,  0,  3,  0,  1,128,  0,192,255,192,255,192,  0,  0,  0,  0,  0,  0,  0,  0}; /* "Z" */
+static const GLubyte Helvetica18_Character_048[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 60,  0,126,  0,102,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,195,  0,102,  0,126,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "0" */
+static const GLubyte Helvetica18_Character_049[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 24,  0, 24,  0, 24,  0, 24,  0, 24,  0, 24,  0, 24,  0, 24,  0, 24,  0, 24,  0,248,  0,248,  0, 24,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "1" */
+static const GLubyte Helvetica18_Character_050[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,255,  0,255,  0,192,  0,224,  0,112,  0, 56,  0, 28,  0, 14,  0,  7,  0,  3,  0,195,  0,254,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "2" */
+static const GLubyte Helvetica18_Character_051[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 60,  0,126,  0,199,  0,195,  0,  3,  0,  7,  0, 30,  0, 28,  0,  6,  0,195,  0,195,  0,126,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "3" */
+static const GLubyte Helvetica18_Character_052[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  3,  0,  3,  0,255,128,255,128,195,  0, 99,  0, 51,  0, 51,  0, 27,  0, 15,  0,  7,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "4" */
+static const GLubyte Helvetica18_Character_053[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,124,  0,254,  0,199,  0,195,  0,  3,  0,  3,  0,199,  0,254,  0,252,  0,192,  0,192,  0,254,  0,254,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "5" */
+static const GLubyte Helvetica18_Character_054[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 60,  0,126,  0,227,  0,195,  0,195,  0,195,  0,254,  0,220,  0,192,  0,192,  0, 99,  0,127,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "6" */
+static const GLubyte Helvetica18_Character_055[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 96,  0, 96,  0, 48,  0, 48,  0, 48,  0, 24,  0, 24,  0, 12,  0, 12,  0,  6,  0,  3,  0,255,  0,255,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "7" */
+static const GLubyte Helvetica18_Character_056[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 60,  0,126,  0,231,  0,195,  0,195,  0,102,  0,126,  0,102,  0,195,  0,195,  0,231,  0,126,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "8" */
+static const GLubyte Helvetica18_Character_057[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,124,  0,254,  0,198,  0,  3,  0,  3,  0, 59,  0,127,  0,195,  0,195,  0,195,  0,199,  0,126,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "9" */
+static const GLubyte Helvetica18_Character_096[] = {  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,192,192,128,128, 64,  0,  0,  0,  0}; /* "`" */
+static const GLubyte Helvetica18_Character_126[] = {  8,  0,  0,  0,  0,  0,  0,  0,  0,204,126, 51,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "~" */
+static const GLubyte Helvetica18_Character_033[] = {  5,  0,  0,  0,  0,192,192,  0,  0,128,128,192,192,192,192,192,192,192,192,  0,  0,  0,  0}; /* "!" */
+static const GLubyte Helvetica18_Character_064[] = { 17,  0,  0,  0,  7,224,  0, 31,240,  0, 56,  0,  0,112,  0,  0,103,112,  0,207,248,  0,204,204,  0,204,102,  0,204,102,  0,204, 99,  0,198, 51,  0,103,115,  0, 99,179,  0, 48,  6,  0, 28, 14,  0, 15,252,  0,  3,240,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "@" */
+static const GLubyte Helvetica18_Character_035[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 36,  0, 36,  0, 36,  0,255,128,255,128, 18,  0, 18,  0, 18,  0,127,192,127,192,  9,  0,  9,  0,  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "#" */
+static const GLubyte Helvetica18_Character_036[] = {  9,  0,  0,  0,  0,  8,  0,  8,  0, 62,  0,127,  0,235,128,201,128,  9,128, 15,  0, 62,  0,120,  0,232,  0,200,  0,203,  0,127,  0, 62,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "$" */
+static const GLubyte Helvetica18_Character_037[] = { 15,  0,  0,  0,  0,  0,  0,  0,  0, 24,120, 24,252, 12,204, 12,204,  6,252,  6,120,  3,  0,123,  0,253,128,205,128,204,192,252,192,120, 96,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "%" */
+static const GLubyte Helvetica18_Character_094[] = {  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,130,198,108, 56, 16,  0,  0,  0,  0,  0}; /* "^" */
+static const GLubyte Helvetica18_Character_038[] = { 12,  0,  0,  0,  0,  0,  0,  0,  0, 60,112,126,224,231,192,195,128,195,192,198,192,238,192,124,  0, 60,  0,102,  0,102,  0,126,  0, 60,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "&" */
+static const GLubyte Helvetica18_Character_042[] = {  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,136,112,112,248, 32, 32,  0,  0,  0,  0}; /* "*" */
+static const GLubyte Helvetica18_Character_040[] = {  5, 16, 48, 96, 96,192,192,192,192,192,192,192,192,192,192, 96, 96, 48, 16,  0,  0,  0,  0}; /* "(" */
+static const GLubyte Helvetica18_Character_041[] = {  5,128,192, 96, 96, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 96, 96,192,128,  0,  0,  0,  0}; /* ")" */
+static const GLubyte Helvetica18_Character_045[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,255,  0,255,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "-" */
+static const GLubyte Helvetica18_Character_095[] = {  9,255,248,255,248,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "_" */
+static const GLubyte Helvetica18_Character_061[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,254,  0,254,  0,  0,  0,  0,  0,254,  0,254,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "=" */
+static const GLubyte Helvetica18_Character_043[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 24,  0, 24,  0, 24,  0, 24,  0,255,  0,255,  0, 24,  0, 24,  0, 24,  0, 24,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "+" */
+static const GLubyte Helvetica18_Character_091[] = {  4,240,240,192,192,192,192,192,192,192,192,192,192,192,192,192,192,240,240,  0,  0,  0,  0}; /* "[" */
+static const GLubyte Helvetica18_Character_123[] = {  6, 12, 24, 48, 48, 48, 48, 48, 48, 96,192, 96, 48, 48, 48, 48, 48, 24, 12,  0,  0,  0,  0}; /* "{" */
+static const GLubyte Helvetica18_Character_125[] = {  6,192, 96, 48, 48, 48, 48, 48, 48, 24, 12, 24, 48, 48, 48, 48, 48, 96,192,  0,  0,  0,  0}; /* "}" */
+static const GLubyte Helvetica18_Character_093[] = {  4,240,240, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,240,240,  0,  0,  0,  0}; /* "]" */
+static const GLubyte Helvetica18_Character_059[] = {  4,  0,128, 64, 64,192,192,  0,  0,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0}; /* ";" */
+static const GLubyte Helvetica18_Character_058[] = {  4,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0}; /* ":" */
+static const GLubyte Helvetica18_Character_044[] = {  4,  0,128, 64, 64,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "," */
+static const GLubyte Helvetica18_Character_046[] = {  4,  0,  0,  0,  0,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "." */
+static const GLubyte Helvetica18_Character_060[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0, 15,  0, 60,  0,112,  0,192,  0,112,  0, 60,  0, 15,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "<" */
+static const GLubyte Helvetica18_Character_062[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,192,  0,240,  0, 60,  0, 14,  0,  3,  0, 14,  0, 60,  0,240,  0,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* ">" */
+static const GLubyte Helvetica18_Character_047[] = {  4,  0,  0,  0,  0,192,192, 64, 64, 64, 64, 96, 96, 32, 32, 32, 32, 48, 48,  0,  0,  0,  0}; /* "/" */
+static const GLubyte Helvetica18_Character_063[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0, 48,  0, 48,  0,  0,  0,  0,  0, 48,  0, 48,  0, 48,  0, 56,  0, 28,  0, 14,  0,198,  0,198,  0,254,  0,124,  0,  0,  0,  0,  0,  0,  0,  0,  0}; /* "?" */
+static const GLubyte Helvetica18_Character_092[] = {  4,  0,  0,  0,  0, 48, 48, 32, 32, 32, 32, 96, 96, 64, 64, 64, 64,192,192,  0,  0,  0,  0}; /* "\" */
+static const GLubyte Helvetica18_Character_034[] = {  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,144,144,216,216,216,  0,  0,  0,  0}; /* """ */
+
+/* Missing Characters filled in by John Fay by hand ... */
+static const GLubyte Helvetica18_Character_039[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,128, 64, 64,192,192,  0,  0,  0,  0}; /* "'" */
+static const GLubyte Helvetica18_Character_124[] = {  3, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96}; /* "|" */
+
 
 /* The font characters mapping: */
-static const GLubyte* Helvetica18_Character_Map[] = {Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_032,Helvetica18_Character_033,Helvetica18_Character_034,Helvetica18_Character_035,Helvetica18_Character_036,Helvetica18_Character_037,Helvetica18_Character_038,Helvetica18_Character_042,Helvetica18_Character_040,Helvetica18_Character_041,Helvetica18_Character_042,Helvetica18_Character_043,Helvetica18_Character_044,Helvetica18_Character_045,Helvetica18_Character_046,Helvetica18_Character_047,Helvetica18_Character_048,Helvetica18_Character_049,Helvetica18_Character_050,Helvetica18_Character_051,Helvetica18_Character_052,Helvetica18_Character_053,Helvetica18_Character_054,Helvetica18_Character_055,Helvetica18_Character_056,Helvetica18_Character_057,Helvetica18_Character_058,Helvetica18_Character_059,Helvetica18_Character_060,Helvetica18_Character_061,Helvetica18_Character_062,Helvetica18_Character_063,Helvetica18_Character_064,Helvetica18_Character_065,Helvetica18_Character_066,Helvetica18_Character_067,Helvetica18_Character_068,Helvetica18_Character_069,Helvetica18_Character_070,Helvetica18_Character_071,Helvetica18_Character_072,Helvetica18_Character_073,Helvetica18_Character_074,Helvetica18_Character_075,Helvetica18_Character_076,Helvetica18_Character_077,Helvetica18_Character_078,Helvetica18_Character_079,Helvetica18_Character_080,Helvetica18_Character_081,Helvetica18_Character_082,Helvetica18_Character_083,Helvetica18_Character_084,Helvetica18_Character_085,Helvetica18_Character_086,Helvetica18_Character_087,Helvetica18_Character_088,Helvetica18_Character_089,Helvetica18_Character_090,Helvetica18_Character_091,Helvetica18_Character_092,Helvetica18_Character_093,Helvetica18_Character_094,Helvetica18_Character_095,Helvetica18_Character_096,Helvetica18_Character_097,Helvetica18_Character_098,Helvetica18_Character_099,Helvetica18_Character_100,Helvetica18_Character_101,Helvetica18_Character_102,Helvetica18_Character_103,Helvetica18_Character_104,Helvetica18_Character_105,Helvetica18_Character_106,Helvetica18_Character_107,Helvetica18_Character_108,Helvetica18_Character_109,Helvetica18_Character_110,Helvetica18_Character_111,Helvetica18_Character_112,Helvetica18_Character_113,Helvetica18_Character_114,Helvetica18_Character_115,Helvetica18_Character_116,Helvetica18_Character_117,Helvetica18_Character_118,Helvetica18_Character_119,Helvetica18_Character_120,Helvetica18_Character_121,Helvetica18_Character_122,Helvetica18_Character_123,Helvetica18_Character_042,Helvetica18_Character_125,Helvetica18_Character_126,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,NULL};
+static const GLubyte* Helvetica18_Character_Map[] = {Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_032,Helvetica18_Character_033,Helvetica18_Character_034,Helvetica18_Character_035,Helvetica18_Character_036,Helvetica18_Character_037,
+ Helvetica18_Character_038,Helvetica18_Character_039,Helvetica18_Character_040,Helvetica18_Character_041,Helvetica18_Character_042,Helvetica18_Character_043,Helvetica18_Character_044,Helvetica18_Character_045,Helvetica18_Character_046,Helvetica18_Character_047,Helvetica18_Character_048,Helvetica18_Character_049,Helvetica18_Character_050,Helvetica18_Character_051,Helvetica18_Character_052,Helvetica18_Character_053,Helvetica18_Character_054,Helvetica18_Character_055,Helvetica18_Character_056,Helvetica18_Character_057,Helvetica18_Character_058,Helvetica18_Character_059,Helvetica18_Character_060,Helvetica18_Character_061,Helvetica18_Character_062,Helvetica18_Character_063,Helvetica18_Character_064,Helvetica18_Character_065,Helvetica18_Character_066,Helvetica18_Character_067,Helvetica18_Character_068,Helvetica18_Character_069,Helvetica18_Character_070,Helvetica18_Character_071,Helvetica18_Character_072,Helvetica18_Character_073,Helvetica18_Character_074,Helvetica18_Character_075,Helvetica18_Character_076,
+ Helvetica18_Character_077,Helvetica18_Character_078,Helvetica18_Character_079,Helvetica18_Character_080,Helvetica18_Character_081,Helvetica18_Character_082,Helvetica18_Character_083,Helvetica18_Character_084,Helvetica18_Character_085,Helvetica18_Character_086,Helvetica18_Character_087,Helvetica18_Character_088,Helvetica18_Character_089,Helvetica18_Character_090,Helvetica18_Character_091,Helvetica18_Character_092,Helvetica18_Character_093,Helvetica18_Character_094,Helvetica18_Character_095,Helvetica18_Character_096,Helvetica18_Character_097,Helvetica18_Character_098,Helvetica18_Character_099,Helvetica18_Character_100,Helvetica18_Character_101,Helvetica18_Character_102,Helvetica18_Character_103,Helvetica18_Character_104,Helvetica18_Character_105,Helvetica18_Character_106,Helvetica18_Character_107,Helvetica18_Character_108,Helvetica18_Character_109,Helvetica18_Character_110,Helvetica18_Character_111,Helvetica18_Character_112,Helvetica18_Character_113,Helvetica18_Character_114,Helvetica18_Character_115,
+ Helvetica18_Character_116,Helvetica18_Character_117,Helvetica18_Character_118,Helvetica18_Character_119,Helvetica18_Character_120,Helvetica18_Character_121,Helvetica18_Character_122,Helvetica18_Character_123,Helvetica18_Character_124,Helvetica18_Character_125,Helvetica18_Character_126,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,
+ Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,
+ Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,
+ Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,Helvetica18_Character_042,NULL};
 
 /* The font structure: */
-const SFG_Font fgFontHelvetica18 = { "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1", 93, 22, Helvetica18_Character_Map };
+const SFG_Font fgFontHelvetica18 = { "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1", 93, 22, Helvetica18_Character_Map, -1.0f, 4.0f };
 
 static const GLubyte TimesRoman10_Character_032[] = { 10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
 static const GLubyte TimesRoman10_Character_097[] = {  3,  0,  0,  0,224,160, 96, 32,192,  0,  0,  0,  0,  0};
@@ -637,11 +692,22 @@ static const GLubyte TimesRoman10_Character_063[] = {  3,  0,  0,  0, 64,  0, 64
 static const GLubyte TimesRoman10_Character_092[] = {  3,  0,  0,  0, 32, 32, 64, 64, 64,128,128,  0,  0,  0};
 static const GLubyte TimesRoman10_Character_034[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,160,160,  0,  0,  0};
 
+/* Missing Characters filled in by John Fay by hand ... */
+static const GLubyte TimesRoman10_Character_039[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0, 32, 32, 32,  0,  0}; /* """ */
+static const GLubyte TimesRoman10_Character_124[] = {  3, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,  0,  0}; /* """ */
+
+
 /* The font characters mapping: */
-static const GLubyte* TimesRoman10_Character_Map[] = {TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_032,TimesRoman10_Character_033,TimesRoman10_Character_034,TimesRoman10_Character_035,TimesRoman10_Character_036,TimesRoman10_Character_037,TimesRoman10_Character_038,TimesRoman10_Character_042,TimesRoman10_Character_040,TimesRoman10_Character_041,TimesRoman10_Character_042,TimesRoman10_Character_043,TimesRoman10_Character_044,TimesRoman10_Character_045,TimesRoman10_Character_046,TimesRoman10_Character_047,TimesRoman10_Character_048,TimesRoman10_Character_049,TimesRoman10_Character_050,TimesRoman10_Character_051,TimesRoman10_Character_052,TimesRoman10_Character_053,TimesRoman10_Character_054,TimesRoman10_Character_055,TimesRoman10_Character_056,TimesRoman10_Character_057,TimesRoman10_Character_058,TimesRoman10_Character_059,TimesRoman10_Character_060,TimesRoman10_Character_061,TimesRoman10_Character_062,TimesRoman10_Character_063,TimesRoman10_Character_064,TimesRoman10_Character_065,TimesRoman10_Character_066,TimesRoman10_Character_067,TimesRoman10_Character_068,TimesRoman10_Character_069,TimesRoman10_Character_070,TimesRoman10_Character_071,TimesRoman10_Character_072,TimesRoman10_Character_073,TimesRoman10_Character_074,TimesRoman10_Character_075,TimesRoman10_Character_076,TimesRoman10_Character_077,TimesRoman10_Character_078,TimesRoman10_Character_079,TimesRoman10_Character_080,TimesRoman10_Character_081,TimesRoman10_Character_082,TimesRoman10_Character_083,TimesRoman10_Character_084,TimesRoman10_Character_085,TimesRoman10_Character_086,TimesRoman10_Character_087,TimesRoman10_Character_088,TimesRoman10_Character_089,TimesRoman10_Character_090,TimesRoman10_Character_091,TimesRoman10_Character_092,TimesRoman10_Character_093,TimesRoman10_Character_094,TimesRoman10_Character_095,TimesRoman10_Character_096,TimesRoman10_Character_097,TimesRoman10_Character_098,TimesRoman10_Character_099,TimesRoman10_Character_100,TimesRoman10_Character_101,TimesRoman10_Character_102,TimesRoman10_Character_103,TimesRoman10_Character_104,TimesRoman10_Character_105,TimesRoman10_Character_106,TimesRoman10_Character_107,TimesRoman10_Character_108,TimesRoman10_Character_109,TimesRoman10_Character_110,TimesRoman10_Character_111,TimesRoman10_Character_112,TimesRoman10_Character_113,TimesRoman10_Character_114,TimesRoman10_Character_115,TimesRoman10_Character_116,TimesRoman10_Character_117,TimesRoman10_Character_118,TimesRoman10_Character_119,TimesRoman10_Character_120,TimesRoman10_Character_121,TimesRoman10_Character_122,TimesRoman10_Character_123,TimesRoman10_Character_042,TimesRoman10_Character_125,TimesRoman10_Character_126,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,NULL};
+static const GLubyte* TimesRoman10_Character_Map[] = {TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_032,TimesRoman10_Character_033,TimesRoman10_Character_034,TimesRoman10_Character_035,
+TimesRoman10_Character_036,TimesRoman10_Character_037,TimesRoman10_Character_038,TimesRoman10_Character_039,TimesRoman10_Character_040,TimesRoman10_Character_041,TimesRoman10_Character_042,TimesRoman10_Character_043,TimesRoman10_Character_044,TimesRoman10_Character_045,TimesRoman10_Character_046,TimesRoman10_Character_047,TimesRoman10_Character_048,TimesRoman10_Character_049,TimesRoman10_Character_050,TimesRoman10_Character_051,TimesRoman10_Character_052,TimesRoman10_Character_053,TimesRoman10_Character_054,TimesRoman10_Character_055,TimesRoman10_Character_056,TimesRoman10_Character_057,TimesRoman10_Character_058,TimesRoman10_Character_059,TimesRoman10_Character_060,TimesRoman10_Character_061,TimesRoman10_Character_062,TimesRoman10_Character_063,TimesRoman10_Character_064,TimesRoman10_Character_065,TimesRoman10_Character_066,TimesRoman10_Character_067,TimesRoman10_Character_068,TimesRoman10_Character_069,TimesRoman10_Character_070,TimesRoman10_Character_071,TimesRoman10_Character_072,
+TimesRoman10_Character_073,TimesRoman10_Character_074,TimesRoman10_Character_075,TimesRoman10_Character_076,TimesRoman10_Character_077,TimesRoman10_Character_078,TimesRoman10_Character_079,TimesRoman10_Character_080,TimesRoman10_Character_081,TimesRoman10_Character_082,TimesRoman10_Character_083,TimesRoman10_Character_084,TimesRoman10_Character_085,TimesRoman10_Character_086,TimesRoman10_Character_087,TimesRoman10_Character_088,TimesRoman10_Character_089,TimesRoman10_Character_090,TimesRoman10_Character_091,TimesRoman10_Character_092,TimesRoman10_Character_093,TimesRoman10_Character_094,TimesRoman10_Character_095,TimesRoman10_Character_096,TimesRoman10_Character_097,TimesRoman10_Character_098,TimesRoman10_Character_099,TimesRoman10_Character_100,TimesRoman10_Character_101,TimesRoman10_Character_102,TimesRoman10_Character_103,TimesRoman10_Character_104,TimesRoman10_Character_105,TimesRoman10_Character_106,TimesRoman10_Character_107,TimesRoman10_Character_108,TimesRoman10_Character_109,
+TimesRoman10_Character_110,TimesRoman10_Character_111,TimesRoman10_Character_112,TimesRoman10_Character_113,TimesRoman10_Character_114,TimesRoman10_Character_115,TimesRoman10_Character_116,TimesRoman10_Character_117,TimesRoman10_Character_118,TimesRoman10_Character_119,TimesRoman10_Character_120,TimesRoman10_Character_121,TimesRoman10_Character_122,TimesRoman10_Character_123,TimesRoman10_Character_124,TimesRoman10_Character_125,TimesRoman10_Character_126,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,
+TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,
+TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,
+TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,TimesRoman10_Character_042,NULL};
 
 /* The font structure: */
-const SFG_Font fgFontTimesRoman10 = { "-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1", 93, 13, TimesRoman10_Character_Map };
+const SFG_Font fgFontTimesRoman10 = { "-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1", 93, 13, TimesRoman10_Character_Map, -2.0f, 3.0f };
 
 static const GLubyte TimesRoman24_Character_032[] = { 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
 static const GLubyte TimesRoman24_Character_097[] = {  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,113,128,251,  0,199,  0,195,  0,195,  0, 99,  0, 59,  0, 15,  0,  3,  0, 99,  0,103,  0, 62,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0};
@@ -737,11 +803,22 @@ static const GLubyte TimesRoman24_Character_063[] = {  8,  0,  0,  0,  0,  0,  0
 static const GLubyte TimesRoman24_Character_092[] = {  7,  0,  0,  0,  0,  0,  0,  6,  6,  4, 12, 12,  8, 24, 24, 16, 48, 48, 32, 96, 96, 64,192,192,  0,  0,  0,  0,  0};
 static const GLubyte TimesRoman24_Character_034[] = {  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,136,204,204,204,204,  0,  0,  0,  0,  0};
 
+/* Missing Characters filled in by John Fay by hand ... */
+static const GLubyte TimesRoman24_Character_039[] = {  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 32, 32, 32, 32, 32, 32, 32, 32, 32,  0,  0}; /* """ */
+static const GLubyte TimesRoman24_Character_124[] = {  3, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,  0,  0}; /* """ */
+
+
 /* The font characters mapping: */
-static const GLubyte* TimesRoman24_Character_Map[] = {TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_032,TimesRoman24_Character_033,TimesRoman24_Character_034,TimesRoman24_Character_035,TimesRoman24_Character_036,TimesRoman24_Character_037,TimesRoman24_Character_038,TimesRoman24_Character_042,TimesRoman24_Character_040,TimesRoman24_Character_041,TimesRoman24_Character_042,TimesRoman24_Character_043,TimesRoman24_Character_044,TimesRoman24_Character_045,TimesRoman24_Character_046,TimesRoman24_Character_047,TimesRoman24_Character_048,TimesRoman24_Character_049,TimesRoman24_Character_050,TimesRoman24_Character_051,TimesRoman24_Character_052,TimesRoman24_Character_053,TimesRoman24_Character_054,TimesRoman24_Character_055,TimesRoman24_Character_056,TimesRoman24_Character_057,TimesRoman24_Character_058,TimesRoman24_Character_059,TimesRoman24_Character_060,TimesRoman24_Character_061,TimesRoman24_Character_062,TimesRoman24_Character_063,TimesRoman24_Character_064,TimesRoman24_Character_065,TimesRoman24_Character_066,TimesRoman24_Character_067,TimesRoman24_Character_068,TimesRoman24_Character_069,TimesRoman24_Character_070,TimesRoman24_Character_071,TimesRoman24_Character_072,TimesRoman24_Character_073,TimesRoman24_Character_074,TimesRoman24_Character_075,TimesRoman24_Character_076,TimesRoman24_Character_077,TimesRoman24_Character_078,TimesRoman24_Character_079,TimesRoman24_Character_080,TimesRoman24_Character_081,TimesRoman24_Character_082,TimesRoman24_Character_083,TimesRoman24_Character_084,TimesRoman24_Character_085,TimesRoman24_Character_086,TimesRoman24_Character_087,TimesRoman24_Character_088,TimesRoman24_Character_089,TimesRoman24_Character_090,TimesRoman24_Character_091,TimesRoman24_Character_092,TimesRoman24_Character_093,TimesRoman24_Character_094,TimesRoman24_Character_095,TimesRoman24_Character_096,TimesRoman24_Character_097,TimesRoman24_Character_098,TimesRoman24_Character_099,TimesRoman24_Character_100,TimesRoman24_Character_101,TimesRoman24_Character_102,TimesRoman24_Character_103,TimesRoman24_Character_104,TimesRoman24_Character_105,TimesRoman24_Character_106,TimesRoman24_Character_107,TimesRoman24_Character_108,TimesRoman24_Character_109,TimesRoman24_Character_110,TimesRoman24_Character_111,TimesRoman24_Character_112,TimesRoman24_Character_113,TimesRoman24_Character_114,TimesRoman24_Character_115,TimesRoman24_Character_116,TimesRoman24_Character_117,TimesRoman24_Character_118,TimesRoman24_Character_119,TimesRoman24_Character_120,TimesRoman24_Character_121,TimesRoman24_Character_122,TimesRoman24_Character_123,TimesRoman24_Character_042,TimesRoman24_Character_125,TimesRoman24_Character_126,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,NULL};
+static const GLubyte* TimesRoman24_Character_Map[] = {TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_032,TimesRoman24_Character_033,TimesRoman24_Character_034,TimesRoman24_Character_035,
+TimesRoman24_Character_036,TimesRoman24_Character_037,TimesRoman24_Character_038,TimesRoman24_Character_039,TimesRoman24_Character_040,TimesRoman24_Character_041,TimesRoman24_Character_042,TimesRoman24_Character_043,TimesRoman24_Character_044,TimesRoman24_Character_045,TimesRoman24_Character_046,TimesRoman24_Character_047,TimesRoman24_Character_048,TimesRoman24_Character_049,TimesRoman24_Character_050,TimesRoman24_Character_051,TimesRoman24_Character_052,TimesRoman24_Character_053,TimesRoman24_Character_054,TimesRoman24_Character_055,TimesRoman24_Character_056,TimesRoman24_Character_057,TimesRoman24_Character_058,TimesRoman24_Character_059,TimesRoman24_Character_060,TimesRoman24_Character_061,TimesRoman24_Character_062,TimesRoman24_Character_063,TimesRoman24_Character_064,TimesRoman24_Character_065,TimesRoman24_Character_066,TimesRoman24_Character_067,TimesRoman24_Character_068,TimesRoman24_Character_069,TimesRoman24_Character_070,TimesRoman24_Character_071,TimesRoman24_Character_072,
+TimesRoman24_Character_073,TimesRoman24_Character_074,TimesRoman24_Character_075,TimesRoman24_Character_076,TimesRoman24_Character_077,TimesRoman24_Character_078,TimesRoman24_Character_079,TimesRoman24_Character_080,TimesRoman24_Character_081,TimesRoman24_Character_082,TimesRoman24_Character_083,TimesRoman24_Character_084,TimesRoman24_Character_085,TimesRoman24_Character_086,TimesRoman24_Character_087,TimesRoman24_Character_088,TimesRoman24_Character_089,TimesRoman24_Character_090,TimesRoman24_Character_091,TimesRoman24_Character_092,TimesRoman24_Character_093,TimesRoman24_Character_094,TimesRoman24_Character_095,TimesRoman24_Character_096,TimesRoman24_Character_097,TimesRoman24_Character_098,TimesRoman24_Character_099,TimesRoman24_Character_100,TimesRoman24_Character_101,TimesRoman24_Character_102,TimesRoman24_Character_103,TimesRoman24_Character_104,TimesRoman24_Character_105,TimesRoman24_Character_106,TimesRoman24_Character_107,TimesRoman24_Character_108,TimesRoman24_Character_109,
+TimesRoman24_Character_110,TimesRoman24_Character_111,TimesRoman24_Character_112,TimesRoman24_Character_113,TimesRoman24_Character_114,TimesRoman24_Character_115,TimesRoman24_Character_116,TimesRoman24_Character_117,TimesRoman24_Character_118,TimesRoman24_Character_119,TimesRoman24_Character_120,TimesRoman24_Character_121,TimesRoman24_Character_122,TimesRoman24_Character_123,TimesRoman24_Character_124,TimesRoman24_Character_125,TimesRoman24_Character_126,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,
+TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,
+TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,
+TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,TimesRoman24_Character_042,NULL};
 
 /* The font structure: */
-const SFG_Font fgFontTimesRoman24 = { "-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1", 93, 28, TimesRoman24_Character_Map };
+const SFG_Font fgFontTimesRoman24 = { "-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1", 93, 28, TimesRoman24_Character_Map, -2.0f, 4.0f };
 
 /*** END OF FILE ***/
 
index 13f2526..3964068 100644 (file)
@@ -82,9 +82,9 @@ void fghRememberState( void )
      */
 
 /* hack to get around my stupid cross-gcc headers */
-#define ENUM_CURRENT_SETTINGS -1
+#define FREEGLUT_ENUM_CURRENT_SETTINGS -1
 
-    EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &fgDisplay.DisplayMode );
+    EnumDisplaySettings( NULL, FREEGLUT_ENUM_CURRENT_SETTINGS, &fgDisplay.DisplayMode );
 
     /*
      * Make sure we will be restoring all settings needed
@@ -254,7 +254,7 @@ GLboolean fghChangeDisplayMode( GLboolean haveToTest )
                                  devMode.dmBitsPerPel, fgState.GameModeRefresh ) )
         {
             /*
-             * OKi, we've found a matching display mode, remember it's number and break
+             * OKi, we've found a matching display mode, remember its number and break
              */
             mode = displayModes;
             break;
@@ -355,7 +355,7 @@ int FGAPIENTRY glutEnterGameMode( void )
         /*
          * ...if so, delete it before proceeding...
          */
-        fgDestroyWindow( fgStructure.GameMode, TRUE );
+        fgAddToWindowDestroyList( fgStructure.GameMode, TRUE );
     }
     else
     {
@@ -370,7 +370,7 @@ int FGAPIENTRY glutEnterGameMode( void )
      */
     if( fghChangeDisplayMode( FALSE ) == FALSE )
     {
-       fgWarning( "failed to change screen settings" );
+             fgWarning( "failed to change screen settings" );
         return( FALSE );
     }
 
@@ -434,9 +434,9 @@ void FGAPIENTRY glutLeaveGameMode( void )
     freeglut_return_if_fail( fgStructure.GameMode != NULL );
 
     /*
-     * First of all, have the game mode window created
+     * First of all, have the game mode window destroyed
      */
-    fgDestroyWindow( fgStructure.GameMode, TRUE );
+    fgAddToWindowDestroyList( fgStructure.GameMode, TRUE );
 
 #if TARGET_HOST_UNIX_X11
 
index abb5c01..2b47456 100644 (file)
@@ -55,7 +55,14 @@ SFG_Display fgDisplay;
 /*
  * The settings for the current freeglut session
  */
-SFG_State fgState;
+SFG_State fgState = { { -1, -1, FALSE }, { 300, 300, TRUE }, GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH,
+                      FALSE, TRUE, FALSE, FALSE, FALSE, TRUE,
+#ifdef TARGET_HOST_WIN32
+                      { 0, FALSE },
+#else
+                      { { 0, 0 }, FALSE },
+#endif
+                      { NULL, NULL }, NULL, NULL, NULL, { 640, 480, TRUE }, 16, 72, GLUT_ACTION_EXIT, GLUT_EXEC_STATE_INIT } ;
 
 
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
@@ -163,15 +170,13 @@ void fgInitialize( const char* displayName )
      */
     if( atom == 0 )
     {
-        GLboolean retval;
-
         /*
          * Make sure the unitialized fields are reset to zero
          */
         ZeroMemory( &wc, sizeof(WNDCLASS) );
 
         /*
-         * Each of the windows should have it's own device context...
+         * Each of the windows should have its own device context...
          */
         wc.style          = CS_OWNDC;
         wc.lpfnWndProc    = fgWindowProc;
@@ -187,8 +192,8 @@ void fgInitialize( const char* displayName )
         /*
          * Register the window class
          */
-        retval = RegisterClass( &wc );
-        assert( retval != FALSE );
+        atom = RegisterClass( &wc );
+        assert( atom != 0 );
     }
 
     /*
@@ -250,8 +255,8 @@ void fgDeinitialize( void )
      */
     while ( (timer = fgState.Timers.First) != NULL )
     {
-       fgListRemove(&fgState.Timers, &timer->Node);
-       free(timer);
+      fgListRemove ( &fgState.Timers, &timer->Node ) ;
+      free ( timer ) ;
     }
 
     /*
@@ -259,6 +264,51 @@ void fgDeinitialize( void )
      */
     fgJoystickClose();
 
+    /*
+     * Reset the state structure
+     */
+
+    fgState.Position.X = -1 ;
+    fgState.Position.Y = -1 ;
+    fgState.Position.Use = FALSE ;
+
+    fgState.Size.X = 300 ;
+    fgState.Size.Y = 300 ;
+    fgState.Size.Use = TRUE ;
+
+    /*
+     * The default display mode to be used
+     */
+    fgState.DisplayMode = GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH;
+
+    fgState.ForceDirectContext  = FALSE;
+    fgState.TryDirectContext    = TRUE;
+    fgState.ForceIconic         = FALSE;
+    fgState.GLDebugSwitch       = FALSE;
+    fgState.XSyncSwitch         = FALSE;
+    fgState.ActionOnWindowClose = GLUT_ACTION_EXIT ;
+    fgState.ExecState           = GLUT_EXEC_STATE_INIT ;
+
+    /*
+     * Assume we want to ignore the automatic key repeat
+     */
+    fgState.IgnoreKeyRepeat = TRUE;
+
+    /*
+     * Set the default game mode settings
+     */
+    fgState.GameModeSize.X  = 640;
+    fgState.GameModeSize.Y  = 480;
+    fgState.GameModeDepth   =  16;
+    fgState.GameModeRefresh =  72;
+
+    fgState.Time.Set = FALSE ;
+
+    fgState.Timers.First = fgState.Timers.Last = NULL ;
+    fgState.IdleCallback = NULL ;
+    fgState.MenuStateCallback = (FGCBmenuState)NULL ;
+    fgState.MenuStatusCallback = (FGCBmenuStatus)NULL ;
+
 #if TARGET_HOST_UNIX_X11
 
     /*
@@ -283,7 +333,6 @@ void fgDeinitialize( void )
  */
 void FGAPIENTRY glutInit( int* pargc, char** argv )
 {
-    char* geometrySettings = NULL;
     char* displayName = NULL;
     int i, j, argc = *pargc;
 
@@ -304,54 +353,11 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
     fgCreateStructure();
 
     /*
-     * Fill in the default values that have not been passed in yet.
-     */
-    if( fgState.Position.Use == FALSE )
-    {
-        fgState.Position.X = -1;
-        fgState.Position.Y = -1;
-    }
-
-    if( fgState.Size.Use == FALSE )
-    {
-        fgState.Size.X   =  300;
-        fgState.Size.Y   =  300;
-        fgState.Size.Use = TRUE;
-    }
-
-    /*
-     * Some more settings to come
-     */
-    fgState.ForceDirectContext = FALSE;
-    fgState.TryDirectContext   = TRUE;
-    fgState.ForceIconic        = FALSE;
-    fgState.GLDebugSwitch      = FALSE;
-    fgState.XSyncSwitch        = FALSE;
-
-    /*
-     * Assume we want to ignore the automatic key repeat
-     */
-    fgState.IgnoreKeyRepeat = TRUE;
-
-    /*
-     * The default display mode to be used
-     */
-    fgState.DisplayMode = GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH;
-
-    /*
-     * Set the default game mode settings
-     */
-    fgState.GameModeSize.X  = 640;
-    fgState.GameModeSize.Y  = 480;
-    fgState.GameModeDepth   =  16;
-    fgState.GameModeRefresh =  72;
-
-    /*
      * Remember the function's call time
      */
-#ifndef WIN32
+#if TARGET_HOST_UNIX_X11
     gettimeofday(&fgState.Time.Value, NULL);
-#else
+#elif TARGET_HOST_WIN32
     fgState.Time.Value = timeGetTime();
 #endif
     fgState.Time.Set = TRUE;
@@ -401,23 +407,51 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
          */
         else if( strcmp( argv[ i ], "-geometry" ) == 0 )
         {
-            /*
-             * Again, check if there is at least one more argument
-             */
-            if( ++i >= argc )
-                fgError( "-geometry parameter must be followed by window geometry settings" );
-
-            /*
-             * Otherwise make a duplicate of the geometry settings...
-             */
-            geometrySettings = strdup( argv[ i ] );
+          int result, x, y;
+          unsigned int w, h;
+
+          /*
+           * Again, check if there is at least one more argument
+           */
+          if ( ++i >= argc )
+            fgError( "-geometry parameter must be followed by window geometry settings" );
+
+          /*
+           * Otherwise scan the geometry settings...
+           */
+          result = sscanf ( argv[i], "%dx%d+%d+%d", &x, &y, &w, &h );
+
+          /*
+           * Check what we have been supplied with...
+           */
+          if ( result > 3 )
+            fgState.Size.Y = h ;
+
+          if ( result > 2 )
+            fgState.Size.X = w ;
+
+          if( result > 1 )
+          {
+            if( y < 0 )
+              fgState.Position.Y = fgDisplay.ScreenHeight + y - fgState.Size.Y;
+            else
+              fgState.Position.Y = y;
+          }
 
-            /*
-             * Have both arguments removed
-             */
-            argv[ i - 1 ] = NULL;
-            argv[   i   ] = NULL;
-            (* pargc) -= 2;
+          if( result > 0 )
+          {
+            if( x < 0 )
+              fgState.Position.X = fgDisplay.ScreenWidth + x - fgState.Size.X;
+            else
+              fgState.Position.X = x;
+          }
+
+          /*
+           * Have both arguments removed
+           */
+          argv[ i - 1 ] = NULL;
+          argv[   i   ] = NULL;
+          (* pargc) -= 2;
         }
 
         /*
@@ -483,19 +517,14 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
     /*
      * Have the arguments list compacted now
      */
-    for( i=1; i<argc; i++ )
+    j = 2 ;
+    for( i = 1; i < *pargc; i++, j++ )
     {
-        if( argv[ i ] == NULL )
-        {
-            for( j=i; j<argc; j++ )
-            {
-                if( argv[ j ] != NULL )
-                {
-                    argv[ i ] = argv[ j ];
-                    argv[ j ] = NULL;
-                }
-            }
-        }
+      if( argv[ i ] == NULL )
+      {
+        while ( argv[j] == NULL ) j++ ;  /* Guaranteed to end because there are "*pargc" arguments left */
+        argv[i] = argv[j] ;
+      }
     }
 
     /*
@@ -505,55 +534,6 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
      */
     fgInitialize( displayName );
 
-#if TARGET_HOST_UNIX_X11
-    /*
-     * We can process the default window geometry settings safely now
-     *
-     * WARNING: have this rewritten to be portable. That won't be hard.
-     */
-    if( geometrySettings != NULL )
-    {
-        int result, x, y;
-       unsigned int w, h;
-
-        /*
-         * Have the settings parsed now. This is easy.
-         * We will use the XParseGeometry function.
-         */
-        result = XParseGeometry( geometrySettings, &x, &y, &w, &h );
-
-        /*
-         * Check what we have been supplied with...
-         */
-        if( (result & WidthValue) && (w >= 0) )
-            fgState.Size.X = w;
-
-        if( (result & HeightValue) && (h >= 0) )
-            fgState.Size.Y = h;
-
-        if( result & XValue )
-        {
-            if( result & XNegative )
-                fgState.Position.X = fgDisplay.ScreenWidth + x - fgState.Size.X;
-            else
-                fgState.Position.X = x;
-        }
-
-        if( result & YValue )
-        {
-            if( result & YNegative )
-                fgState.Position.Y = fgDisplay.ScreenHeight + y - fgState.Size.Y;
-            else
-                fgState.Position.Y = y;
-        }
-
-        /*
-         * Free the geometry settings string
-         */
-        free( geometrySettings );
-    }
-#endif
-
     /*
      * Check for the minus one settings for both position and size...
      */
@@ -605,7 +585,7 @@ void FGAPIENTRY glutInitWindowSize( int width, int height )
     /*
      * The settings can be disables when both values are negative
      */
-    if( (width >= 0) && (height >= 0) )
+    if( (width > 0) && (height > 0) )
     {
         /*
          * We want to specify the initial size of each of the windows
@@ -617,7 +597,7 @@ void FGAPIENTRY glutInitWindowSize( int width, int height )
     else
     {
         /*
-         * The initial size of each of the windows is specified by the wm
+         * The initial size of each of the windows is specified by the wm (officially this is an error condition)
          */
         fgState.Size.X   =    -1;
         fgState.Size.Y   =    -1;
@@ -845,7 +825,7 @@ void FGAPIENTRY glutInitDisplayString( char* displayMode )
                 value = strtol( valueString, NULL, 0 );
 
             /*
-             * Now we need to match the capability string and it's ID
+             * Now we need to match the capability string and its ID
              */
             for( i=0; g_Tokens[ i ]!=NULL; i++ )
             {
@@ -921,8 +901,175 @@ void FGAPIENTRY glutInitDisplayString( char* displayMode )
 }
 #endif
 
+#define NUM_TOKENS             28
+static char* Tokens[] =
+{
+    "alpha", "acca", "acc", "blue", "buffer", "conformant", "depth", "double", "green",
+    "index", "num", "red", "rgba", "rgb", "luminance", "stencil", "single", "stereo", "samples",
+    "slow", "win32pdf", "xvisual", "xstaticgray", "xgrayscale", "xstaticcolor", "xpseudocolor",
+    "xtruecolor", "xdirectcolor"
+};
+
+static int TokenLengths[] =
+{
+         5,      4,     3,      4,        6,           10,       5,        6,       5,
+         5,     3,     3,      4,     3,           9,         7,        6,        6,         7,
+        4,          8,         7,            11,           10,             12,             12,
+             10,             12
+};
+
 void FGAPIENTRY glutInitDisplayString( char* displayMode )
 {
+  int glut_state_flag = 0 ;
+  /*
+   * Unpack a lot of options from a character string.  The options are delimited by blanks or tabs.
+   */
+  char *token ;
+  int len = strlen ( displayMode ) ;
+  char *buffer = malloc ( (len+1) * sizeof(char) ) ;
+  memcpy ( buffer, displayMode, len ) ;
+  buffer[len] = '\0' ;
+
+  token = strtok ( buffer, " \t" ) ;
+  while ( token )
+  {
+    /*
+     * Process this token
+     */
+    int i ;
+    for ( i = 0; i < NUM_TOKENS; i++ )
+    {
+      if ( strncmp ( token, Tokens[i], TokenLengths[i] ) == 0 ) break ;
+    }
+
+    switch ( i )
+    {
+    case 0 :  /* "alpha":  Alpha color buffer precision in bits */
+      glut_state_flag |= GLUT_ALPHA ;  /* Somebody fix this for me! */
+      break ;
+
+    case 1 :  /* "acca":  Red, green, blue, and alpha accumulation buffer precision in bits */
+      break ;
+
+    case 2 :  /* "acc":  Red, green, and blue accumulation buffer precision in bits with zero bits alpha */
+      glut_state_flag |= GLUT_ACCUM ;  /* Somebody fix this for me! */
+      break ;
+
+    case 3 :  /* "blue":  Blue color buffer precision in bits */
+      break ;
+
+    case 4 :  /* "buffer":  Number of bits in the color index color buffer */
+      break ;
+
+    case 5 :  /* "conformant":  Boolean indicating if the frame buffer configuration is conformant or not */
+      break ;
+
+    case 6 :  /* "depth":  Number of bits of precsion in the depth buffer */
+      glut_state_flag |= GLUT_DEPTH ;  /* Somebody fix this for me! */
+      break ;
+
+    case 7 :  /* "double":  Boolean indicating if the color buffer is double buffered */
+      glut_state_flag |= GLUT_DOUBLE ;
+      break ;
+
+    case 8 :  /* "green":  Green color buffer precision in bits */
+      break ;
+
+    case 9 :  /* "index":  Boolean if the color model is color index or not */
+      glut_state_flag |= GLUT_INDEX ;
+      break ;
+
+    case 10 :  /* "num":  A special capability  name indicating where the value represents the Nth frame buffer configuration matching the description string */
+      break ;
+
+    case 11 :  /* "red":  Red color buffer precision in bits */
+      break ;
+
+    case 12 :  /* "rgba":  Number of bits of red, green, blue, and alpha in the RGBA color buffer */
+      glut_state_flag |= GLUT_RGBA ;  /* Somebody fix this for me! */
+      break ;
+
+    case 13 :  /* "rgb":  Number of bits of red, green, and blue in the RGBA color buffer with zero bits alpha */
+      glut_state_flag |= GLUT_RGB ;  /* Somebody fix this for me! */
+      break ;
+
+    case 14 :  /* "luminance":  Number of bits of red in the RGBA and zero bits of green, blue (alpha not specified) of color buffer precision */
+      glut_state_flag |= GLUT_LUMINANCE ;  /* Somebody fix this for me! */
+      break ;
+
+    case 15 :  /* "stencil":  Number of bits in the stencil buffer */
+      glut_state_flag |= GLUT_STENCIL ;  /* Somebody fix this for me! */
+      break ;
+
+    case 16 :  /* "single":  Boolean indicate the color buffer is single buffered */
+      glut_state_flag |= GLUT_SINGLE ;
+      break ;
+
+    case 17 :  /* "stereo":  Boolean indicating the color buffer supports OpenGL-style stereo */
+      glut_state_flag |= GLUT_STEREO ;
+      break ;
+
+    case 18 :  /* "samples":  Indicates the number of multisamples to use based on GLX's SGIS_multisample extension (for antialiasing) */
+      glut_state_flag |= GLUT_MULTISAMPLE ;  /* Somebody fix this for me! */
+      break ;
+
+    case 19 :  /* "slow":  Boolean indicating if the frame buffer configuration is slow or not */
+      break ;
+
+    case 20 :  /* "win32pdf":  matches the Win32 Pixel Format Descriptor by number */
+#ifdef TARGET_HOST_WIN32
+#endif
+      break ;
+
+    case 21 :  /* "xvisual":  matches the X visual ID by number */
+#ifdef TARGET_HOST_UNIX_X11
+#endif
+      break ;
+
+    case 22 :  /* "xstaticgray":  boolean indicating if the frame buffer configuration's X visual is of type StaticGray */
+#ifdef TARGET_HOST_UNIX_X11
+#endif
+      break ;
+
+    case 23 :  /* "xgrayscale":  boolean indicating if the frame buffer configuration's X visual is of type GrayScale */
+#ifdef TARGET_HOST_UNIX_X11
+#endif
+      break ;
+
+    case 24 :  /* "xstaticcolor":  boolean indicating if the frame buffer configuration's X visual is of type StaticColor */
+#ifdef TARGET_HOST_UNIX_X11
+#endif
+      break ;
+
+    case 25 :  /* "xpseudocolor":  boolean indicating if the frame buffer configuration's X visual is of type PseudoColor */
+#ifdef TARGET_HOST_UNIX_X11
+#endif
+      break ;
+
+    case 26 :  /* "xtruecolor":  boolean indicating if the frame buffer configuration's X visual is of type TrueColor */
+#ifdef TARGET_HOST_UNIX_X11
+#endif
+      break ;
+
+    case 27 :  /* "xdirectcolor":  boolean indicating if the frame buffer configuration's X visual is of type DirectColor */
+#ifdef TARGET_HOST_UNIX_X11
+#endif
+      break ;
+
+    case 28 :  /* Unrecognized */
+      printf ( "WARNING - Display string token not recognized:  %s\n", token ) ;
+      break ;
+    }
+
+    token = strtok ( NULL, " \t" ) ;
+  }
+
+  free ( buffer ) ;
+
+  /*
+   * We will make use of this value when creating a new OpenGL context...
+   */
+  fgState.DisplayMode = glut_state_flag;
 }
 
 /*** END OF FILE ***/
index 86ee47c..455ebf1 100644 (file)
@@ -81,10 +81,16 @@ static void fghRedrawWindowByHandle
     glutSetWindow( window->ID );
 
     /*
+     * Do not exagerate with the redisplaying
+     */
+    window->State.Redisplay = FALSE;
+
+    /*
      * Have the callback executed now. The buffers should
      * be swapped by the glutSwapBuffers() execution inside
      * the callback itself.
      */
+
     window->Callbacks.Display();
 }
 
@@ -128,6 +134,14 @@ static void fghReshapeWindowByHandle
          */
         glViewport( 0, 0, width, height );
     }
+
+    /*
+     * Force a window redraw.  In Windows at least this is only a partial solution:  if the
+     * window is increasing in size in either dimension, the already-drawn part does not get
+     * drawn again and things look funny.  But without this we get this bad behaviour whenever
+     * we resize the window.
+     */
+    window->State.Redisplay = TRUE ;
 }
 
 /*
@@ -183,10 +197,20 @@ static void fghcbDisplayWindow( SFG_Window *window, SFG_Enumerator *enumerator )
     /*
      * This is done in a bit different way under Windows
      */
-    RedrawWindow( 
+    if( (window->Callbacks.Display != NULL) &&
+        (window->State.Redisplay == TRUE) &&
+        (window->State.Visible == TRUE) )
+    {
+      /*
+       * Do not exagerate with the redisplaying
+       */
+      window->State.Redisplay = FALSE;
+
+      RedrawWindow( 
         window->Window.Handle, NULL, NULL, 
         RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE 
-    );
+       );
+    }
 
 #endif
 
@@ -220,7 +244,7 @@ static void fghDisplayAll( void )
  */
 static void fghcbCheckJoystickPolls( SFG_Window *window, SFG_Enumerator *enumerator )
 {
-    double checkTime = fgElapsedTime();
+    long int checkTime = fgElapsedTime();
 
     /*
      * Check if actually need to do the poll for the currently enumerated window:
@@ -307,12 +331,13 @@ static void fghCheckTimers( void )
     }
 }
 
+
 /*
  * Elapsed Time
  */
 long fgElapsedTime( void )
 {
-#ifndef WIN32
+#if TARGET_HOST_UNIX_X11
        struct timeval now;
        long elapsed;
 
@@ -322,8 +347,8 @@ long fgElapsedTime( void )
        elapsed += (now.tv_sec - fgState.Time.Value.tv_sec) * 1000;
 
        return( elapsed );
-#else
-        return (timeGetTime() - fgState.Time.Value);
+#elif TARGET_HOST_WIN32
+  return (timeGetTime() - fgState.Time.Value);
 #endif
 }
 
@@ -358,585 +383,727 @@ void fgWarning( const char *fmt, ... )
     va_end( ap );
 }
 
+/*
+ * Clean up on exit
+ */
+static void fgCleanUpGlutsMess( void ) 
+{
+  int i;
+
+  i = 0;
+
+  if ( fgStructure.Windows.First != NULL ) 
+  {
+    SFG_Window *win = fgStructure.Windows.First ;
+    glEnd();
+    glFinish();
+    glFlush();
+    while ( win != NULL )
+    {
+      SFG_Window *temp_win = win->Node.Next ;
+      fgDestroyWindow ( win, FALSE ) ;
+      win = temp_win ;
+    }
+  }
+
+#if 0
+  /* these are pointers to external handles */
+
+  __glutWindowListSize    = 0;
+  __glutStaleWindowList   = NULL;
+  __glutWindowList        = NULL;
+  __glutCurrentWindow     = NULL;
+
+  /* make sure we no longer have a GL context */
+
+  if ( wglGetCurrentContext() != NULL ) 
+  {
+    wglDeleteContext( wglGetCurrentContext() );
+  }
+
+  hInstance = GetModuleHandle(NULL);
+  UnregisterClass( classname, hInstance );
+
+  /* clean up allocated timer memory */
+
+  tList = __glutTimerList;
+  i = 0;
+
+  while ( __glutTimerList ) 
+  {
+    i++;
+    tList = __glutTimerList;
+    
+    if ( __glutTimerList )
+      __glutTimerList = __glutTimerList->next;
+
+    if ( tList )
+      free( tList );
+  }
+#endif
+}
+
+
 /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
 
 /*
- * Enters the FreeGLUT processing loop. Never returns.
+ * Executes a single iteration in the FreeGLUT processing loop.
  */
-void FGAPIENTRY glutMainLoop( void )
+void FGAPIENTRY glutMainLoopEvent( void )
 {
 #if TARGET_HOST_UNIX_X11
-    SFG_Window* window;
-    XEvent event;
-    int modifiers;
-
-    /*
-     * This code was repeated constantly, so here it goes into a definition:
-     */
-#   define GETWINDOW(a) window = fgWindowByHandle( event.a.window );if( window == NULL ) break;
-#   define GETMOUSE(a) window->State.MouseX = event.a.x; window->State.MouseY = event.a.y;
-
+  SFG_Window* window;
+  XEvent event;
+  int modifiers;
+
+  /*
+   * This code was repeated constantly, so here it goes into a definition:
+   */
+# define GETWINDOW(a) window = fgWindowByHandle( event.a.window );if( window == NULL ) break;
+# define GETMOUSE(a) window->State.MouseX = event.a.x; window->State.MouseY = event.a.y;
+
+  /*
+   * Make sure the display has been created etc.
+   */
+  freeglut_assert_ready;
+
+  /*
+   * Do we have any event messages pending?
+   */
+  if( XPending( fgDisplay.Display ) )
+  {
     /*
-     * Make sure the display has been created etc.
+     * Grab the next event to be processed...
      */
-    freeglut_assert_ready;
+    XNextEvent( fgDisplay.Display, &event );
 
     /*
-     * Enter the loop. Iterate as long as there are
-     * any windows in the freeglut structure.
+     * Check the event's type
      */
-    while( fgStructure.Windows.First != NULL )
+    switch( event.type )
     {
+    case CreateNotify:
+      /*
+       * The window creation confirmation
+       */
+      break;
+
+    case DestroyNotify:
+      /*
+       * This is sent to confirm the XDestroyWindow call.
+       */
+      /*
+       * Call the window closure callback, remove from the structure, etc.
+       */
+      fgAddToWindowDestroyList ( window, FALSE );
+
+      break;
+
+    case ClientMessage:
+      /*
+       * Destroy the window when the WM_DELETE_WINDOW message arrives
+       */
+      if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.DeleteWindow )
+      {
+      }
+      break;
+
+    case UnmapNotify:
+      /*
+       * A window of ours has been unmapped...
+       */
+      break;
+
+    case Expose:
+      /*
+       * We are too dumb to process partial exposes...
+       */
+      if( event.xexpose.count == 0 )
+          fghRedrawWindowByHandle( event.xexpose.window );
+      break;
+
+    case ConfigureNotify:
+      /*
+       * The window gets resized
+       */
+      fghReshapeWindowByHandle(
+          event.xconfigure.window,
+          event.xconfigure.width,
+          event.xconfigure.height
+      );
+      break;
+
+    case MappingNotify:
+      /*
+       * Have the client's keyboard knowledge updated (xlib.ps,
+       * page 206, says that's a good thing to do)
+       */
+      XRefreshKeyboardMapping( (XMappingEvent *) &event );
+      break;
+
+    case VisibilityNotify:
+      {
+        /*
+         * The window's visiblity might have changed
+         */
+        GETWINDOW( xvisibility );
+
         /*
-         * Do we have any event messages pending?
+         * Break now if no window status callback has been hooked to that window
          */
-        if( XPending( fgDisplay.Display ) )
+        if( window->Callbacks.WindowStatus == NULL )
+            break;
+
+        /*
+         * We're going to send a callback to a window. Make it current.
+         */
+        glutSetWindow( window->ID );
+
+        /*
+         * Sending this event, the X server can notify us that the window has just
+         * acquired one of the three possible visibility states: VisibilityUnobscured,
+         * VisibilityPartiallyObscured or VisibilityFullyObscured
+         */
+        switch( event.xvisibility.state )
         {
-            /*
-             * Grab the next event to be processed...
-             */
-            XNextEvent( fgDisplay.Display, &event );
+        case VisibilityUnobscured:
+          /*
+           * We are fully visible...
+           */
+          window->Callbacks.WindowStatus( GLUT_FULLY_RETAINED );
+          window->State.Visible = TRUE;
+          break;
+
+        case VisibilityPartiallyObscured:
+          /*
+           * The window is partially visible
+           */
+          window->Callbacks.WindowStatus( GLUT_PARTIALLY_RETAINED );
+          window->State.Visible = TRUE;
+          break;
+
+        case VisibilityFullyObscured:
+          /*
+           * The window is totally obscured
+           */
+          window->Callbacks.WindowStatus( GLUT_FULLY_COVERED );
+          window->State.Visible = FALSE;
+          break;
+        }
+      }
+      break;
 
-            /*
-             * Check the event's type
-             */
-            switch( event.type )
-            {
-            case CreateNotify:
-                /*
-                 * The window creation confirmation
-                 */
-                break;
+    case EnterNotify:
+      {
+        /*
+         * Mouse is over one of our windows
+         */
+        GETWINDOW( xcrossing ); GETMOUSE( xcrossing );
 
-            case DestroyNotify:
-                /*
-                 * This is sent to confirm the XDestroyWindow call. Ignore it.
-                 */
-                break;
+        /*
+         * Is there an entry callback hooked to the window?
+         */
+        if( window->Callbacks.Entry != NULL )
+        {
+          /*
+           * Yeah. Notify the window about having the mouse cursor over
+           */
+          window->Callbacks.Entry( GLUT_ENTERED );
+        }
+      }
+      break;
 
-            case ClientMessage:
-                /*
-                 * Destroy the window when the WM_DELETE_WINDOW message arrives
-                 */
-                if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.DeleteWindow )
-                {
-                    /*
-                     * I wonder if the window still exists ;-)
-                     */
-                    fgDestroyWindow( fgWindowByHandle( event.xclient.window ), TRUE );
-                }
-                break;
-
-            case UnmapNotify:
-                /*
-                 * A window of ours has been unmapped...
-                 */
-                break;
+    case LeaveNotify:
+      {
+        /*
+         * Mouse is no longer over one of our windows
+         */
+        GETWINDOW( xcrossing ); GETMOUSE( xcrossing );
 
-            case Expose:
-                /*
-                 * We are too dumb to process partial exposes...
-                 */
-                if( event.xexpose.count == 0 )
-                    fghRedrawWindowByHandle( event.xexpose.window );
-                break;
+        /*
+         * Is there an entry callback hooked to the window?
+         */
+        if( window->Callbacks.Entry != NULL )
+        {
+          /*
+           * Yeah. Notify the window about having the mouse cursor over
+           */
+          window->Callbacks.Entry( GLUT_LEFT );
+        }
+      }
+      break;
 
-            case ConfigureNotify:
-                /*
-                 * The window gets resized
-                 */
-                fghReshapeWindowByHandle(
-                    event.xconfigure.window,
-                    event.xconfigure.width,
-                    event.xconfigure.height
-                );
-                break;
-
-            case MappingNotify:
-                /*
-                 * Have the client's keyboard knowledge updated (xlib.ps,
-                 * page 206, says that's a good thing to do)
-                 */
-                XRefreshKeyboardMapping( (XMappingEvent *) &event );
-                break;
-
-            case VisibilityNotify:
-                {
-                    /*
-                     * The window's visiblity might have changed
-                     */
-                    GETWINDOW( xvisibility );
-
-                    /*
-                     * Break now if no window status callback has been hooked to that window
-                     */
-                    if( window->Callbacks.WindowStatus == NULL )
-                        break;
-
-                    /*
-                     * We're going to send a callback to a window. Make it current.
-                     */
-                    glutSetWindow( window->ID );
-
-                    /*
-                     * Sending this event, the X server can notify us that the window has just
-                     * acquired one of the three possible visibility states: VisibilityUnobscured,
-                     * VisibilityPartiallyObscured or VisibilityFullyObscured
-                     */
-                    switch( event.xvisibility.state )
-                    {
-                    case VisibilityUnobscured:
-                        /*
-                         * We are fully visible...
-                         */
-                        window->Callbacks.WindowStatus( GLUT_FULLY_RETAINED );
-                        window->State.Visible = TRUE;
-                        break;
-
-                    case VisibilityPartiallyObscured:
-                        /*
-                         * The window is partially visible
-                         */
-                        window->Callbacks.WindowStatus( GLUT_PARTIALLY_RETAINED );
-                        window->State.Visible = TRUE;
-                        break;
-
-                    case VisibilityFullyObscured:
-                        /*
-                         * The window is totally obscured
-                         */
-                        window->Callbacks.WindowStatus( GLUT_FULLY_COVERED );
-                        window->State.Visible = FALSE;
-                        break;
-                    }
-                }
-                break;
-
-            case EnterNotify:
-                {
-                    /*
-                     * Mouse is over one of our windows
-                     */
-                    GETWINDOW( xcrossing ); GETMOUSE( xcrossing );
-
-                    /*
-                     * Is there an entry callback hooked to the window?
-                     */
-                    if( window->Callbacks.Entry != NULL )
-                    {
-                        /*
-                         * Yeah. Notify the window about having the mouse cursor over
-                         */
-                        window->Callbacks.Entry( GLUT_ENTERED );
-                    }
-                }
-                break;
-
-            case LeaveNotify:
-                {
-                    /*
-                     * Mouse is no longer over one of our windows
-                     */
-                    GETWINDOW( xcrossing ); GETMOUSE( xcrossing );
-
-                    /*
-                     * Is there an entry callback hooked to the window?
-                     */
-                    if( window->Callbacks.Entry != NULL )
-                    {
-                        /*
-                         * Yeah. Notify the window about having the mouse cursor over
-                         */
-                        window->Callbacks.Entry( GLUT_LEFT );
-                    }
-                }
-                break;
-
-            case MotionNotify:
-                {
-                    /*
-                     * The mouse cursor was moved...
-                     */
-                    GETWINDOW( xmotion ); GETMOUSE( xmotion );
-
-                    /*
-                     * What kind of a movement was it?
-                     */
-                    if( (event.xmotion.state & Button1Mask) || (event.xmotion.state & Button2Mask) ||
-                        (event.xmotion.state & Button3Mask) || (event.xmotion.state & Button4Mask) ||
-                        (event.xmotion.state & Button5Mask) )
-                    {
-                        /*
-                         * A mouse button was pressed during the movement...
-                         * Is there a motion callback hooked to the window?
-                         */
-                        if( window->Callbacks.Motion != NULL )
-                        {
-                            /*
-                             * Yup. Have it executed immediately
-                             */
-                            window->Callbacks.Motion( event.xmotion.x, event.xmotion.y );
-                        }
-                    }
-                    else
-                    {
-                        /*
-                         * Otherwise it was a passive movement...
-                         */
-                        if( window->Callbacks.Passive != NULL )
-                        {
-                            /*
-                             * That's right, and there is a passive callback, too.
-                             */
-                            window->Callbacks.Passive( event.xmotion.x, event.xmotion.y );
-                        }
-                    }
-                }
-                break;
-
-            case ButtonRelease:
-            case ButtonPress:
-                {
-                    int button;
-
-                    /*
-                     * A mouse button has been pressed or released. Traditionally,
-                     * break if the window was found within the freeglut structures.
-                     */
-                    GETWINDOW( xbutton ); GETMOUSE( xbutton );
-
-                    /*
-                     * GLUT API assumes that you can't have more than three mouse buttons, so:
-                     */
-                    switch( event.xbutton.button )
-                    {
-                    /*
-                     * WARNING: this might be wrong, if we only have two mouse buttons,
-                     *          Button2 might mean the right button, isn't that right?
-                     */
-                    case Button1:   button = GLUT_LEFT_BUTTON;   break;
-                    case Button2:   button = GLUT_MIDDLE_BUTTON; break;
-                    case Button3:   button = GLUT_RIGHT_BUTTON;  break;
-                    default:        button = -1;                 break;
-                    }
-
-                    /*
-                     * Skip the unwanted mouse buttons...
-                     */
-                    if( button == -1 )
-                        break;
-
-                    /*
-                     * Do not execute the callback if a menu is hooked to this key.
-                     * In that case an appropriate private call should be generated
-                     */
-                    if( window->Menu[ button ] != NULL )
-                    {
-                        /*
-                         * Set the current window
-                         */
-                        glutSetWindow( window->ID );
-
-                        if( event.type == ButtonPress )
-                        {
-                            /*
-                             * Activate the appropriate menu structure...
-                             */
-                            fgActivateMenu( button );
-                        }
-                        else
-                        {
-                            /*
-                             * There are two general cases generated when a menu button
-                             * is released -- it can provoke a menu call (when released
-                             * over a menu area) or just deactivate the menu (when released
-                             * somewhere else). Unfortunately, both cases must be checked
-                             * recursively due to the submenu possibilities.
-                             */
-                            fgDeactivateMenu( button );
-                        }
-                        break;
-                    }
-
-                    /*
-                     * Check if there is a mouse callback hooked to the window
-                     */
-                    if( window->Callbacks.Mouse == NULL )
-                        break;
-
-                    /*
-                     * Set the current window
-                     */
-                    glutSetWindow( window->ID );
-
-                    /*
-                     * Remember the current modifiers state
-                     */
-                    modifiers = 0;
-                    if (event.xbutton.state & (ShiftMask|LockMask))
-                        modifiers |= GLUT_ACTIVE_SHIFT;
-                    if (event.xbutton.state & ControlMask)
-                        modifiers |= GLUT_ACTIVE_CTRL;
-                    if (event.xbutton.state & Mod1Mask)
-                        modifiers |= GLUT_ACTIVE_ALT;
-                    window->State.Modifiers = modifiers;
-
-                    /*
-                     * Finally execute the mouse callback
-                     */
-                    window->Callbacks.Mouse(
-                        button,
-                        event.type == ButtonPress ? GLUT_DOWN : GLUT_UP,
-                        event.xbutton.x,
-                        event.xbutton.y
-                    );
-
-                    /*
-                     * Trash the modifiers state
-                     */
-                    window->State.Modifiers = 0xffffffff;
-                }
-                break;
-
-            case KeyRelease:
-            case KeyPress:
-                {
-                    FGCBkeyboard keyboard_cb;
-                    FGCBspecial special_cb;
-
-                    /*
-                     * A key has been pressed, find the window that had the focus:
-                     */
-                    GETWINDOW( xkey ); GETMOUSE( xkey );
-
-                    if( event.type == KeyPress )
-                    {
-                        keyboard_cb = window->Callbacks.Keyboard;
-                        special_cb = window->Callbacks.Special;
-                    }
-                    else
-                    {
-                        keyboard_cb = window->Callbacks.KeyboardUp;
-                        special_cb = window->Callbacks.SpecialUp;
-                    }
-
-                    /*
-                     * Is there a keyboard/special callback hooked for this window?
-                     */
-                    if( (keyboard_cb != NULL) || (special_cb != NULL) )
-                    {
-                        XComposeStatus composeStatus;
-                        char asciiCode[ 32 ];
-                        KeySym keySym;
-                        int len;
-
-                        /*
-                         * Check for the ASCII/KeySym codes associated with the event:
-                         */
-                        len = XLookupString( &event.xkey, asciiCode, sizeof(asciiCode), &keySym, &composeStatus );
-
-                        /*
-                         * Get ready to calling the keyboard/special callbacks
-                         */
-                        glutSetWindow( window->ID );
-
-                        /*
-                         * GLUT API tells us to have two separate callbacks...
-                         */
-                        if( len > 0 )
-                        {
-                            /*
-                             * ...one for the ASCII translateable keypresses...
-                             */
-                            if( keyboard_cb != NULL )
-                            {
-                                /*
-                                 * Remember the current modifiers state
-                                 */
-                                modifiers = 0;
-                                if (event.xkey.state & (ShiftMask|LockMask))
-                                    modifiers |= GLUT_ACTIVE_SHIFT;
-                                if (event.xkey.state & ControlMask)
-                                    modifiers |= GLUT_ACTIVE_CTRL;
-                                if (event.xkey.state & Mod1Mask)
-                                    modifiers |= GLUT_ACTIVE_ALT;
-                                window->State.Modifiers = modifiers;
-
-                                /*
-                                 * Execute the callback
-                                 */
-                                keyboard_cb( asciiCode[ 0 ], event.xkey.x, event.xkey.y );
-
-                                /*
-                                 * Trash the modifiers state
-                                 */
-                                window->State.Modifiers = 0xffffffff;
-                            }
-                        }
-                        else
-                        {
-                            int special = -1;
-
-                            /*
-                             * ...and one for all the others, which need to be translated to GLUT_KEY_Xs...
-                             */
-                            switch( keySym )
-                            {
-                            /*
-                             * First the function keys come:
-                             */
-                            case XK_F1:     special = GLUT_KEY_F1;     break;
-                            case XK_F2:     special = GLUT_KEY_F2;     break;
-                            case XK_F3:     special = GLUT_KEY_F3;     break;
-                            case XK_F4:     special = GLUT_KEY_F4;     break;
-                            case XK_F5:     special = GLUT_KEY_F5;     break;
-                            case XK_F6:     special = GLUT_KEY_F6;     break;
-                            case XK_F7:     special = GLUT_KEY_F7;     break;
-                            case XK_F8:     special = GLUT_KEY_F8;     break;
-                            case XK_F9:     special = GLUT_KEY_F9;     break;
-                            case XK_F10:    special = GLUT_KEY_F10;    break;
-                            case XK_F11:    special = GLUT_KEY_F11;    break;
-                            case XK_F12:    special = GLUT_KEY_F12;    break;
-
-                            /*
-                             * Then the arrows and stuff:
-                             */
-                            case XK_Left:   special = GLUT_KEY_LEFT;   break;
-                            case XK_Right:  special = GLUT_KEY_RIGHT;  break;
-                            case XK_Up:     special = GLUT_KEY_UP;     break;
-                            case XK_Down:   special = GLUT_KEY_DOWN;   break;
-
-                            case XK_KP_Prior:
-                            case XK_Prior:  special = GLUT_KEY_PAGE_UP; break;
-                            case XK_KP_Next:
-                            case XK_Next:   special = GLUT_KEY_PAGE_DOWN; break;
-                            case XK_KP_Home:
-                            case XK_Home:   special = GLUT_KEY_HOME;   break;
-                            case XK_KP_End:
-                            case XK_End:    special = GLUT_KEY_END;    break;
-                            case XK_KP_Insert:
-                            case XK_Insert: special = GLUT_KEY_INSERT; break;
-                            }
-
-                            /*
-                             * Execute the callback (if one has been specified),
-                             * given that the special code seems to be valid...
-                             */
-                            if( (special_cb != NULL) && (special != -1) )
-                            {
-                                /*
-                                 * Remember the current modifiers state
-                                 */
-                                modifiers = 0;
-                                if (event.xkey.state & (ShiftMask|LockMask))
-                                    modifiers |= GLUT_ACTIVE_SHIFT;
-                                if (event.xkey.state & ControlMask)
-                                    modifiers |= GLUT_ACTIVE_CTRL;
-                                if (event.xkey.state & Mod1Mask)
-                                    modifiers |= GLUT_ACTIVE_ALT;
-                                window->State.Modifiers = modifiers;
-
-                                special_cb( special, event.xkey.x, event.xkey.y );
-
-                                /*
-                                 * Trash the modifiers state
-                                 */
-                                window->State.Modifiers = 0xffffffff;
-                            }
-                        }
-                    }
-                }
-                break;
-            }
+    case MotionNotify:
+      {
+        /*
+         * The mouse cursor was moved...
+         */
+        GETWINDOW( xmotion ); GETMOUSE( xmotion );
+
+        /*
+         * What kind of a movement was it?
+         */
+        if( (event.xmotion.state & Button1Mask) || (event.xmotion.state & Button2Mask) ||
+            (event.xmotion.state & Button3Mask) || (event.xmotion.state & Button4Mask) ||
+            (event.xmotion.state & Button5Mask) )
+        {
+          /*
+           * A mouse button was pressed during the movement...
+           * Is there a motion callback hooked to the window?
+           */
+          if( window->Callbacks.Motion != NULL )
+          {
+            /*
+             * Yup. Have it executed immediately
+             */
+            window->Callbacks.Motion( event.xmotion.x, event.xmotion.y );
+          }
         }
         else
         {
+          /*
+           * Otherwise it was a passive movement...
+           */
+          if( window->Callbacks.Passive != NULL )
+          {
             /*
-             * Have all the timers checked.
+             * That's right, and there is a passive callback, too.
              */
-            fghCheckTimers();
+            window->Callbacks.Passive( event.xmotion.x, event.xmotion.y );
+          }
+        }
+      }
+      break;
 
-            /*
-             * Poll the joystick and notify all windows that want to be notified...
-             */
-            fghCheckJoystickPolls();
+    case ButtonRelease:
+    case ButtonPress:
+      {
+        GLboolean pressed = TRUE ;
+        int button;
 
-            /*
-             * No messages in the queue, which means we are idling...
-             */
-            if( fgState.IdleCallback != NULL )
-                fgState.IdleCallback();
+        if ( event.type == ButtonRelease ) pressed = FALSE ;
 
-            /*
-             * Remember about displaying all the windows that have
-             * been marked for a redisplay (possibly in the idle call):
-             */
-            fghDisplayAll();
+        /*
+         * A mouse button has been pressed or released. Traditionally,
+         * break if the window was found within the freeglut structures.
+         */
+        GETWINDOW( xbutton ); GETMOUSE( xbutton );
+
+        /*
+         * GLUT API assumes that you can't have more than three mouse buttons, so:
+         */
+        switch( event.xbutton.button )
+        {
+        /*
+         * WARNING: this might be wrong, if we only have two mouse buttons,
+         *          Button2 might mean the right button, isn't that right?
+         */
+        case Button1:   button = GLUT_LEFT_BUTTON;   break;
+        case Button2:   button = GLUT_MIDDLE_BUTTON; break;
+        case Button3:   button = GLUT_RIGHT_BUTTON;  break;
+        default:        button = -1;                 break;
         }
-    }
 
-#elif TARGET_HOST_WIN32
+        /*
+         * Skip the unwanted mouse buttons...
+         */
+        if( button == -1 )
+          break;
 
-    GLboolean bLoop = TRUE;
-    MSG stMsg;
+        /*
+         * Do not execute the application's mouse callback if a menu is hooked to this button.
+         * In that case an appropriate private call should be generated.
+         * Near as I can tell, this is the menu behaviour:
+         *  - Down-click the menu button, menu not active:  activate the menu with its upper left-hand corner at the mouse location.
+         *  - Down-click any button outside the menu, menu active:  deactivate the menu
+         *  - Down-click any button inside the menu, menu active:  select the menu entry and deactivate the menu
+         *  - Up-click the menu button, menu not active:  nothing happens
+         *  - Up-click the menu button outside the menu, menu active:  nothing happens
+         *  - Up-click the menu button inside the menu, menu active:  select the menu entry and deactivate the menu
+         */
+        if ( window->ActiveMenu != NULL )  /* Window has an active menu, it absorbs any mouse click */
+        {
+          if ( fgCheckActiveMenu ( window, window->ActiveMenu ) == TRUE )  /* Inside the menu, invoke the callback and deactivate the menu*/
+          {
+            fgExecuteMenuCallback ( window->ActiveMenu ) ;
+            fgDeactivateMenu ( window ) ;
+          }
+          else  /* Outside the menu, deactivate the menu if it's a downclick */
+          {
+            if ( pressed == TRUE ) fgDeactivateMenu ( window ) ;
+          }
+
+          /*
+           * Let's make the window redraw as a result of the mouse click and menu activity.
+           */
+          window->State.Redisplay = TRUE ;
+
+          break ;
+        }
 
-    /*
-     * The windows main loop is considerably smaller
-     */
-    while( bLoop )
-    {
-        if( PeekMessage( &stMsg, NULL, 0, 0, PM_NOREMOVE ) )
+        /*
+         * No active menu, let's check whether we need to activate one.
+         */
+        if ( ( window->Menu[ button ] != NULL ) && ( pressed == TRUE ) )
         {
-            /*
-             * Grab the message now, checking for WM_QUIT
-             */
-            if( GetMessage( &stMsg, NULL, 0, 0 ) == 0 )
-                bLoop = FALSE;
+          /*
+           * Let's make the window redraw as a result of the mouse click.
+           */
+          window->State.Redisplay = TRUE ;
 
-            /*
-             * Translate virtual-key messages and send them to the window...
-             */
-            TranslateMessage( &stMsg );
-            DispatchMessage( &stMsg );
+          /*
+           * Activate the appropriate menu structure...
+           */
+          fgActivateMenu( window, button );
+
+          break;
+        }
+
+        /*
+         * Check if there is a mouse callback hooked to the window
+         */
+        if( window->Callbacks.Mouse == NULL )
+          break;
+
+        /*
+         * Set the current window
+         */
+        glutSetWindow( window->ID );
+
+        /*
+         * Remember the current modifiers state
+         */
+        modifiers = 0;
+        if (event.xbutton.state & (ShiftMask|LockMask))
+          modifiers |= GLUT_ACTIVE_SHIFT;
+        if (event.xbutton.state & ControlMask)
+          modifiers |= GLUT_ACTIVE_CTRL;
+        if (event.xbutton.state & Mod1Mask)
+          modifiers |= GLUT_ACTIVE_ALT;
+        window->State.Modifiers = modifiers;
+
+        /*
+         * Finally execute the mouse callback
+         */
+        window->Callbacks.Mouse(
+            button,
+            event.type == ButtonPress ? GLUT_DOWN : GLUT_UP,
+            event.xbutton.x,
+            event.xbutton.y
+        );
+
+        /*
+         * Trash the modifiers state
+         */
+        window->State.Modifiers = 0xffffffff;
+      }
+      break;
+
+    case KeyRelease:
+    case KeyPress:
+      {
+        FGCBkeyboard keyboard_cb;
+        FGCBspecial special_cb;
+
+        /*
+         * A key has been pressed, find the window that had the focus:
+         */
+        GETWINDOW( xkey ); GETMOUSE( xkey );
+
+        if( event.type == KeyPress )
+        {
+          keyboard_cb = window->Callbacks.Keyboard;
+          special_cb = window->Callbacks.Special;
         }
         else
         {
+          keyboard_cb = window->Callbacks.KeyboardUp;
+          special_cb = window->Callbacks.SpecialUp;
+        }
+
+        /*
+         * Is there a keyboard/special callback hooked for this window?
+         */
+        if( (keyboard_cb != NULL) || (special_cb != NULL) )
+        {
+          XComposeStatus composeStatus;
+          char asciiCode[ 32 ];
+          KeySym keySym;
+          int len;
+
+          /*
+           * Check for the ASCII/KeySym codes associated with the event:
+           */
+          len = XLookupString( &event.xkey, asciiCode, sizeof(asciiCode), &keySym, &composeStatus );
+
+          /*
+           * Get ready to calling the keyboard/special callbacks
+           */
+          glutSetWindow( window->ID );
+
+          /*
+           * GLUT API tells us to have two separate callbacks...
+           */
+          if( len > 0 )
+          {
             /*
-             * Have all the timers checked.
+             * ...one for the ASCII translateable keypresses...
              */
-            fghCheckTimers();
+            if( keyboard_cb != NULL )
+            {
+              /*
+               * Remember the current modifiers state
+               */
+              modifiers = 0;
+              if (event.xkey.state & (ShiftMask|LockMask))
+                  modifiers |= GLUT_ACTIVE_SHIFT;
+              if (event.xkey.state & ControlMask)
+                  modifiers |= GLUT_ACTIVE_CTRL;
+              if (event.xkey.state & Mod1Mask)
+                  modifiers |= GLUT_ACTIVE_ALT;
+              window->State.Modifiers = modifiers;
+
+              /*
+               * Execute the callback
+               */
+              keyboard_cb( asciiCode[ 0 ], event.xkey.x, event.xkey.y );
+
+              /*
+               * Trash the modifiers state
+               */
+              window->State.Modifiers = 0xffffffff;
+            }
+          }
+          else
+          {
+            int special = -1;
 
             /*
-             * Poll the joystick and notify all windows that want to be notified...
+             * ...and one for all the others, which need to be translated to GLUT_KEY_Xs...
              */
-            fghCheckJoystickPolls();
-
+            switch( keySym )
+            {
             /*
-             * No messages in the queue, which means we are idling...
+             * First the function keys come:
              */
-            if( fgState.IdleCallback != NULL )
-                fgState.IdleCallback();
+            case XK_F1:     special = GLUT_KEY_F1;     break;
+            case XK_F2:     special = GLUT_KEY_F2;     break;
+            case XK_F3:     special = GLUT_KEY_F3;     break;
+            case XK_F4:     special = GLUT_KEY_F4;     break;
+            case XK_F5:     special = GLUT_KEY_F5;     break;
+            case XK_F6:     special = GLUT_KEY_F6;     break;
+            case XK_F7:     special = GLUT_KEY_F7;     break;
+            case XK_F8:     special = GLUT_KEY_F8;     break;
+            case XK_F9:     special = GLUT_KEY_F9;     break;
+            case XK_F10:    special = GLUT_KEY_F10;    break;
+            case XK_F11:    special = GLUT_KEY_F11;    break;
+            case XK_F12:    special = GLUT_KEY_F12;    break;
 
             /*
-             * Remember about displaying all the windows that have
-             * been marked for a redisplay (possibly in the idle call):
+             * Then the arrows and stuff:
              */
-            fghDisplayAll();
+            case XK_Left:   special = GLUT_KEY_LEFT;   break;
+            case XK_Right:  special = GLUT_KEY_RIGHT;  break;
+            case XK_Up:     special = GLUT_KEY_UP;     break;
+            case XK_Down:   special = GLUT_KEY_DOWN;   break;
+
+            case XK_KP_Prior:
+            case XK_Prior:  special = GLUT_KEY_PAGE_UP; break;
+            case XK_KP_Next:
+            case XK_Next:   special = GLUT_KEY_PAGE_DOWN; break;
+            case XK_KP_Home:
+            case XK_Home:   special = GLUT_KEY_HOME;   break;
+            case XK_KP_End:
+            case XK_End:    special = GLUT_KEY_END;    break;
+            case XK_KP_Insert:
+            case XK_Insert: special = GLUT_KEY_INSERT; break;
+            }
 
             /*
-             * We need to terminate the main loop if no windows are left
+             * Execute the callback (if one has been specified),
+             * given that the special code seems to be valid...
              */
-            bLoop = (fgStructure.Windows.First != NULL);
+            if( (special_cb != NULL) && (special != -1) )
+            {
+              /*
+               * Remember the current modifiers state
+               */
+              modifiers = 0;
+              if (event.xkey.state & (ShiftMask|LockMask))
+                modifiers |= GLUT_ACTIVE_SHIFT;
+              if (event.xkey.state & ControlMask)
+                modifiers |= GLUT_ACTIVE_CTRL;
+              if (event.xkey.state & Mod1Mask)
+                modifiers |= GLUT_ACTIVE_ALT;
+              window->State.Modifiers = modifiers;
+
+              special_cb( special, event.xkey.x, event.xkey.y );
+
+              /*
+               * Trash the modifiers state
+               */
+              window->State.Modifiers = 0xffffffff;
+            }
+          }
         }
+      }
+      break;
     }
+  }
+  else
+  {
+    /*
+     * Have all the timers checked.
+     */
+    fghCheckTimers();
+
+    /*
+     * Poll the joystick and notify all windows that want to be notified...
+     */
+    fghCheckJoystickPolls();
+
+    /*
+     * No messages in the queue, which means we are idling...
+     */
+    if( fgState.IdleCallback != NULL )
+        fgState.IdleCallback();
+
+    /*
+     * Remember about displaying all the windows that have
+     * been marked for a redisplay (possibly in the idle call):
+     */
+    fghDisplayAll();
+  }
+
+#elif TARGET_HOST_WIN32
+
+  MSG stMsg;
+
+  /*
+   * The windows processing is considerably smaller
+   */
+  if( PeekMessage( &stMsg, NULL, 0, 0, PM_NOREMOVE ) )
+  {
+    /*
+     * Grab the message now, checking for WM_QUIT
+     */
+    if( GetMessage( &stMsg, NULL, 0, 0 ) == 0 )
+      fgState.ExecState = GLUT_EXEC_STATE_STOP ;
+
+    /*
+     * Translate virtual-key messages and send them to the window...
+     */
+    TranslateMessage( &stMsg );
+    DispatchMessage( &stMsg );
+  }
+  else
+  {
+    /*
+     * Have all the timers checked.
+     */
+    fghCheckTimers();
+
+    /*
+     * Poll the joystick and notify all windows that want to be notified...
+     */
+    fghCheckJoystickPolls();
+
+    /*
+     * No messages in the queue, which means we are idling...
+     */
+    if( fgState.IdleCallback != NULL )
+      fgState.IdleCallback();
+
+    /*
+     * Remember about displaying all the windows that have
+     * been marked for a redisplay (possibly in the idle call):
+     */
+    fghDisplayAll();
+  }
+#endif
+}
 
+/*
+ * Enters the FreeGLUT processing loop. Stays until the "ExecState" changes to "GLUT_EXEC_STATE_STOP".
+ */
+void FGAPIENTRY glutMainLoop( void )
+{
+#if TARGET_HOST_WIN32
+  SFG_Window *window = fgStructure.Windows.First ;
 #endif
 
+  /*
+   * Make sure the display has been created etc.
+   */
+  freeglut_assert_ready;
+
+#if TARGET_HOST_WIN32
+  /*
+   * Processing before the main loop:  If there is a window which is open and which
+   * has a visibility callback, call it.  I know this is an ugly hack, but I'm not sure
+   * what else to do about it.  Ideally we should leave something uninitialized in the
+   * create window code and initialize it in the main loop, and have that initialization
+   * create a "WM_ACTIVATE" message.  Then we would put the visibility callback code in
+   * the "case WM_ACTIVATE" block below.         - John Fay -- 10/24/02
+   */
+  while ( window != NULL )
+  {
+    if ( window->Callbacks.Visibility != NULL )
+      window->Callbacks.Visibility ( window->State.Visible ) ;
+
+    window = window->Node.Next ;
+  }
+#endif
+
+  /*
+   * Set freeglut to be running
+   */
+  fgState.ExecState = GLUT_EXEC_STATE_RUNNING ;
+
+  /*
+   * Enter the main loop itself.  Inside the loop, process events and check for loop exit.
+   */
+  while ( fgState.ExecState == GLUT_EXEC_STATE_RUNNING )
+  {
+    glutMainLoopEvent () ;
+
     /*
-     * When this loop terminates, destroy the display, state and structure
-     * of a freeglut session, so that another glutInit() call can happen
+     * If an event caused a window to be closed, do the actual closing here
      */
-    fgDeinitialize();
+    fgCloseWindows () ;
+
+    /*
+     * If there are no more windows open, stop execution
+     */
+    if ( fgStructure.Windows.First == NULL )
+      fgState.ExecState = GLUT_EXEC_STATE_STOP ;
+  }
+
+
+  /*
+   * If we got here by the user closing a window or by the application closing down, there may still be windows open.
+   */
+  fgCleanUpGlutsMess () ;
+
+  /*
+   * Check whether we return to the calling program or simply exit
+   */
+  if ( fgState.ActionOnWindowClose == GLUT_ACTION_EXIT )
+    exit ( 0 ) ;
+
+  /*
+   * When this loop terminates, destroy the display, state and structure
+   * of a freeglut session, so that another glutInit() call can happen
+   */
+  fgDeinitialize();
+}
+
+/*
+ * Leaves the FreeGLUT processing loop.
+ */
+void FGAPIENTRY glutLeaveMainLoop( void )
+{
+  fgState.ExecState = GLUT_EXEC_STATE_STOP ;
 }
 
 /*
@@ -949,8 +1116,10 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
     PAINTSTRUCT ps;
     LONG lRet = 1;
 
-#   define  assert_window_registered  if( window == NULL ) return( DefWindowProc( hWnd, uMsg, wParam, lParam ) );
+    if ( ( window == NULL ) && ( uMsg != WM_CREATE ) )
+      return( DefWindowProc( hWnd, uMsg, wParam, lParam ) );
 
+/*    if ( uMsg != 0x000f ) printf ( "message <%x>\n", uMsg ) ; */
     /*
      * Check what type of message are we receiving
      */
@@ -1000,11 +1169,78 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
          */
         fghReshapeWindowByHandle( hWnd, LOWORD(lParam), HIWORD(lParam) );
         break;
+#if 0
+    case WM_SETFOCUS: 
+        printf("WM_SETFOCUS: %p\n", window );
+        lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
+        break;
+
+    case WM_ACTIVATE: 
+        if (LOWORD(wParam) != WA_INACTIVE)
+        {
+          //glutSetCursor( fgStructure.Window->State.Cursor );
+               printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window, window->State.Cursor );
+
+          glutSetCursor( window->State.Cursor );
+        }
+
+        lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
+        break;
+#endif
+
+    case WM_SETCURSOR: 
+        /*
+         * Windows seems to need reminding to erase the cursor for NONE.
+         */
+#if 0
+        if ((LOWORD(lParam) == HTCLIENT) &&
+           (fgStructure.Window->State.Cursor == GLUT_CURSOR_NONE))
+         SetCursor( NULL );
+#else
+       // Set the cursor AND change it for this window class. 
+#      define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); \
+        break;
+       // Nuke the cursor AND change it for this window class. 
+#      define ZAP_CURSOR(a,b) case a: SetCursor( NULL ); \
+        break;
+
+        if (LOWORD(lParam) == HTCLIENT)
+         switch( window->State.Cursor )
+         {
+               MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW     );
+               MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW,  IDC_ARROW     );
+               MAP_CURSOR( GLUT_CURSOR_INFO,        IDC_HELP      );
+               MAP_CURSOR( GLUT_CURSOR_DESTROY,     IDC_CROSS     );
+               MAP_CURSOR( GLUT_CURSOR_HELP,        IDC_HELP      );
+               MAP_CURSOR( GLUT_CURSOR_CYCLE,       IDC_SIZEALL   );
+               MAP_CURSOR( GLUT_CURSOR_SPRAY,       IDC_CROSS     );
+               MAP_CURSOR( GLUT_CURSOR_WAIT,            IDC_WAIT      );
+               MAP_CURSOR( GLUT_CURSOR_TEXT,        IDC_UPARROW   );
+               MAP_CURSOR( GLUT_CURSOR_CROSSHAIR,   IDC_CROSS     );
+               //MAP_CURSOR( GLUT_CURSOR_NONE,        IDC_NO              );
+               ZAP_CURSOR( GLUT_CURSOR_NONE,        NULL          );
+
+               default:
+               MAP_CURSOR( GLUT_CURSOR_UP_DOWN,     IDC_ARROW     );
+         }
+#endif
+       else
+         lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
+       break;
+
+    case WM_SHOWWINDOW:
+        /*
+         * We are now Visible!
+         */
+        window->State.Visible = TRUE;
+        window->State.Redisplay = TRUE;
+        break;
 
     case WM_PAINT:
         /*
          * Start the painting job
          */
+
         BeginPaint( hWnd, &ps );
 
         /*
@@ -1029,22 +1265,24 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
         }
 
         /*
+         * Put on a linked list of windows to be removed after all the callbacks have returned
+         */
+        fgAddToWindowDestroyList ( window, FALSE ) ;
+
+        /*
          * Proceed with the window destruction
          */
-        DestroyWindow( window->Window.Handle );
+        DestroyWindow( hWnd );
         break;
 
     case WM_DESTROY:
         /*
-         * The window already got destroyed, so forget about it's existence:
+         * The window already got destroyed, so don't bother with it.
          */
-        fgDestroyWindow( window, FALSE );
         return( 0 );
 
     case WM_MOUSEMOVE:
     {
-        assert_window_registered;
-
         /*
          * The mouse cursor has moved. Remember the new mouse cursor's position
          */
@@ -1054,16 +1292,23 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
         /*
          * Fallback if there's an active menu hooked to this window
          */
-        if( window->MenuActive[ 0 ] || window->MenuActive[ 1 ] || window->MenuActive[ 2 ] )
+        if( window->ActiveMenu != NULL )
+        {
+            /*
+             * Let's make the window redraw as a result of the mouse motion.
+             */
+            window->State.Redisplay = TRUE ;
+
             break;
+        }
 
         /*
          * Remember the current modifiers state.
          */
         window->State.Modifiers = 
-            (GetKeyState( VK_LSHIFT   ) || GetKeyState( VK_RSHIFT   )) ? GLUT_ACTIVE_SHIFT : 0 |
-            (GetKeyState( VK_LCONTROL ) || GetKeyState( VK_RCONTROL )) ? GLUT_ACTIVE_CTRL  : 0 |
-            (GetKeyState( VK_LMENU    ) || GetKeyState( VK_RMENU    )) ? GLUT_ACTIVE_ALT   : 0;
+            ( ( (GetKeyState( VK_LSHIFT   ) < 0 ) || ( GetKeyState( VK_RSHIFT   ) < 0 )) ? GLUT_ACTIVE_SHIFT : 0 ) |
+            ( ( (GetKeyState( VK_LCONTROL ) < 0 ) || ( GetKeyState( VK_RCONTROL ) < 0 )) ? GLUT_ACTIVE_CTRL  : 0 ) |
+            ( ( (GetKeyState( VK_LMENU    ) < 0 ) || ( GetKeyState( VK_RMENU    ) < 0 )) ? GLUT_ACTIVE_ALT   : 0 );
 
         /*
          * Check if any of the mouse buttons is pressed...
@@ -1123,12 +1368,6 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
         int button;
 
         /*
-         * A mouse button has been pressed *or* released. Again, break off
-         * if the message was not directed towards a freeglut window...
-         */
-        assert_window_registered;
-
-        /*
          * The mouse cursor has moved. Remember the new mouse cursor's position
          */
         window->State.MouseX = LOWORD( lParam );
@@ -1162,34 +1401,51 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
             return( DefWindowProc( hWnd, uMsg, lParam, wParam ) );
 
         /*
-         * Do not execute the callback if a menu is hooked to this key.
-         * In that case an appropriate private call should be generated
+         * Do not execute the application's mouse callback if a menu is hooked to this button.
+         * In that case an appropriate private call should be generated.
+         * Near as I can tell, this is the menu behaviour:
+         *  - Down-click the menu button, menu not active:  activate the menu with its upper left-hand corner at the mouse location.
+         *  - Down-click any button outside the menu, menu active:  deactivate the menu
+         *  - Down-click any button inside the menu, menu active:  select the menu entry and deactivate the menu
+         *  - Up-click the menu button, menu not active:  nothing happens
+         *  - Up-click the menu button outside the menu, menu active:  nothing happens
+         *  - Up-click the menu button inside the menu, menu active:  select the menu entry and deactivate the menu
+         */
+        if ( window->ActiveMenu != NULL )  /* Window has an active menu, it absorbs any mouse click */
+        {
+          if ( fgCheckActiveMenu ( window, window->ActiveMenu ) == TRUE )  /* Inside the menu, invoke the callback and deactivate the menu*/
+          {
+            fgExecuteMenuCallback ( window->ActiveMenu ) ;
+            fgDeactivateMenu ( window ) ;
+          }
+          else  /* Outside the menu, deactivate the menu if it's a downclick */
+          {
+            if ( pressed == TRUE ) fgDeactivateMenu ( window ) ;
+          }
+
+          /*
+           * Let's make the window redraw as a result of the mouse click and menu activity.
+           */
+          window->State.Redisplay = TRUE ;
+
+          break ;
+        }
+
+        /*
+         * No active menu, let's check whether we need to activate one.
          */
-        if( window->Menu[ button ] != NULL )
+        if ( ( window->Menu[ button ] != NULL ) && ( pressed == TRUE ) )
         {
             /*
-             * Set the current window
+             * Let's make the window redraw as a result of the mouse click.
              */
-            glutSetWindow( window->ID );
+            window->State.Redisplay = TRUE ;
+
+            /*
+             * Activate the appropriate menu structure...
+             */
+            fgActivateMenu( window, button );
 
-            if( pressed == TRUE )
-            {
-                /*
-                 * Activate the appropriate menu structure...
-                 */
-                fgActivateMenu( button );
-            }
-            else
-            {
-                /*
-                 * There are two general cases generated when a menu button
-                 * is released -- it can provoke a menu call (when released
-                 * over a menu area) or just deactivate the menu (when released
-                 * somewhere else). Unfortunately, both cases must be checked
-                 * recursively due to the submenu possibilities.
-                 */
-                fgDeactivateMenu( button );
-            }
             break;
         }
 
@@ -1208,9 +1464,9 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
          * Remember the current modifiers state.
          */
         window->State.Modifiers = 
-            (GetKeyState( VK_LSHIFT   ) || GetKeyState( VK_RSHIFT   )) ? GLUT_ACTIVE_SHIFT : 0 |
-            (GetKeyState( VK_LCONTROL ) || GetKeyState( VK_RCONTROL )) ? GLUT_ACTIVE_CTRL  : 0 |
-            (GetKeyState( VK_LMENU    ) || GetKeyState( VK_RMENU    )) ? GLUT_ACTIVE_ALT   : 0;
+            ( ( (GetKeyState( VK_LSHIFT   ) < 0 ) || ( GetKeyState( VK_RSHIFT   ) < 0 )) ? GLUT_ACTIVE_SHIFT : 0 ) |
+            ( ( (GetKeyState( VK_LCONTROL ) < 0 ) || ( GetKeyState( VK_RCONTROL ) < 0 )) ? GLUT_ACTIVE_CTRL  : 0 ) |
+            ( ( (GetKeyState( VK_LMENU    ) < 0 ) || ( GetKeyState( VK_RMENU    ) < 0 )) ? GLUT_ACTIVE_ALT   : 0 );
 
         /*
          * Finally execute the mouse callback
@@ -1235,24 +1491,24 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
         int keypress = -1;
 
         /*
-         * First of all, make sure that there is a window to be notified of this
-         */
-        assert_window_registered;
-
-        /*
          * Ignore the automatic key repetition if needed:
          */
         if( fgState.IgnoreKeyRepeat && (lParam & KF_REPEAT) )
             break;
 
         /*
+         * Set the current window
+         */
+        glutSetWindow( window->ID );
+
+        /*
          * Remember the current modifiers state. This is done here in order 
          * to make sure the VK_DELETE keyboard callback is executed properly.
          */
         window->State.Modifiers = 
-            (GetKeyState( VK_LSHIFT   ) || GetKeyState( VK_RSHIFT   )) ? GLUT_ACTIVE_SHIFT : 0 |
-            (GetKeyState( VK_LCONTROL ) || GetKeyState( VK_RCONTROL )) ? GLUT_ACTIVE_CTRL  : 0 |
-            (GetKeyState( VK_LMENU    ) || GetKeyState( VK_RMENU    )) ? GLUT_ACTIVE_ALT   : 0;
+            ( ( (GetKeyState( VK_LSHIFT   ) < 0 ) || ( GetKeyState( VK_RSHIFT   ) < 0 )) ? GLUT_ACTIVE_SHIFT : 0 ) |
+            ( ( (GetKeyState( VK_LCONTROL ) < 0 ) || ( GetKeyState( VK_RCONTROL ) < 0 )) ? GLUT_ACTIVE_CTRL  : 0 ) |
+            ( ( (GetKeyState( VK_LMENU    ) < 0 ) || ( GetKeyState( VK_RMENU    ) < 0 )) ? GLUT_ACTIVE_ALT   : 0 );
 
         /*
          * Convert the Win32 keystroke codes to GLUTtish way
@@ -1305,15 +1561,85 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
     }
     break;
 
-    case WM_SYSCHAR:
-    case WM_CHAR:
+    case WM_SYSKEYUP:
+    case WM_KEYUP:
     {
+        int keypress = -1;
+
         /*
-         * First of all, make sure that there is a window to be notified of this
+         * Set the current window
          */
-        assert_window_registered;
+        glutSetWindow( window->ID );
 
         /*
+         * Remember the current modifiers state. This is done here in order 
+         * to make sure the VK_DELETE keyboard callback is executed properly.
+         */
+        window->State.Modifiers = 
+            ( ( (GetKeyState( VK_LSHIFT   ) < 0 ) || ( GetKeyState( VK_RSHIFT   ) < 0 )) ? GLUT_ACTIVE_SHIFT : 0 ) |
+            ( ( (GetKeyState( VK_LCONTROL ) < 0 ) || ( GetKeyState( VK_RCONTROL ) < 0 )) ? GLUT_ACTIVE_CTRL  : 0 ) |
+            ( ( (GetKeyState( VK_LMENU    ) < 0 ) || ( GetKeyState( VK_RMENU    ) < 0 )) ? GLUT_ACTIVE_ALT   : 0 );
+
+        /*
+         * Convert the Win32 keystroke codes to GLUTtish way.  "KEY(a,b)" was defined under "WM_KEYDOWN"
+         */
+
+        switch( wParam )
+        {
+          /*
+           * Most of the special characters can be handled automagically...
+           */
+          KEY( VK_F1,     GLUT_KEY_F1        ); KEY( VK_F2,     GLUT_KEY_F2        );
+          KEY( VK_F3,     GLUT_KEY_F3        ); KEY( VK_F4,     GLUT_KEY_F4        );
+          KEY( VK_F5,     GLUT_KEY_F5        ); KEY( VK_F6,     GLUT_KEY_F6        );
+          KEY( VK_F7,     GLUT_KEY_F7        ); KEY( VK_F8,     GLUT_KEY_F8        );
+          KEY( VK_F9,     GLUT_KEY_F9        ); KEY( VK_F10,    GLUT_KEY_F10       );
+          KEY( VK_F11,    GLUT_KEY_F11       ); KEY( VK_F12,    GLUT_KEY_F12       );
+          KEY( VK_PRIOR,  GLUT_KEY_PAGE_UP   ); KEY( VK_NEXT,   GLUT_KEY_PAGE_DOWN );
+          KEY( VK_HOME,   GLUT_KEY_HOME      ); KEY( VK_END,    GLUT_KEY_END       );
+          KEY( VK_LEFT,   GLUT_KEY_LEFT      ); KEY( VK_UP,     GLUT_KEY_UP        );
+          KEY( VK_RIGHT,  GLUT_KEY_RIGHT     ); KEY( VK_DOWN,   GLUT_KEY_DOWN      );
+          KEY( VK_INSERT, GLUT_KEY_INSERT    );
+
+          /*
+           * ...yet there is a small exception we need to have handled...
+           */
+          case VK_DELETE:
+            /*
+             * The delete key should be treated as an ASCII keypress:
+             */
+            if( window->Callbacks.KeyboardUp != NULL )
+                window->Callbacks.KeyboardUp( 127, window->State.MouseX, window->State.MouseY );
+          default:
+            /*
+             * Call the KeyboardUp callback for a regular character if there is one.
+             */
+            if( window->Callbacks.KeyboardUp != NULL )
+                window->Callbacks.KeyboardUp( wParam, window->State.MouseX, window->State.MouseY );
+        }
+
+        /*
+         * Execute the special callback, if present, given the conversion was a success:
+         */
+        if( (keypress != -1) && (window->Callbacks.SpecialUp != NULL) )
+        {
+            /*
+             * Have the special callback executed:
+             */
+            window->Callbacks.SpecialUp( keypress, window->State.MouseX, window->State.MouseY );
+        }
+
+        /*
+         * Thrash the modifiers register now
+         */
+        window->State.Modifiers = 0xffffffff;
+    }
+    break;
+
+    case WM_SYSCHAR:
+    case WM_CHAR:
+    {
+        /*
          * Ignore the automatic key repetition if needed:
          */
         if( fgState.IgnoreKeyRepeat && (lParam & KF_REPEAT) )
@@ -1328,9 +1654,9 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
              * Remember the current modifiers state
              */
             window->State.Modifiers = 
-                (GetKeyState( VK_LSHIFT   ) || GetKeyState( VK_RSHIFT   )) ? GLUT_ACTIVE_SHIFT : 0 |
-                (GetKeyState( VK_LCONTROL ) || GetKeyState( VK_RCONTROL )) ? GLUT_ACTIVE_CTRL  : 0 |
-                (GetKeyState( VK_LMENU    ) || GetKeyState( VK_RMENU    )) ? GLUT_ACTIVE_ALT   : 0;
+                ( ( (GetKeyState( VK_LSHIFT   ) < 0 ) || ( GetKeyState( VK_RSHIFT   ) < 0 )) ? GLUT_ACTIVE_SHIFT : 0 ) |
+                ( ( (GetKeyState( VK_LCONTROL ) < 0 ) || ( GetKeyState( VK_RCONTROL ) < 0 )) ? GLUT_ACTIVE_CTRL  : 0 ) |
+                ( ( (GetKeyState( VK_LMENU    ) < 0 ) || ( GetKeyState( VK_RMENU    ) < 0 )) ? GLUT_ACTIVE_ALT   : 0 );
 
             /*
              * Have the special callback executed:
@@ -1345,6 +1671,13 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
     }
     break;
 
+    case WM_CAPTURECHANGED :  /* User has finished resizing the window, force a redraw */
+      if ( window->Callbacks.Display )
+        window->Callbacks.Display () ;
+
+//      lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ) ;
+      break ;
+
     default:
         /*
          * Handle unhandled messages
index e90b0ac..c50cea5 100644 (file)
@@ -49,6 +49,7 @@
  */
 #define  FREEGLUT_MENU_FONT    GLUT_BITMAP_8_BY_13
 #define  FREEGLUT_MENU_HEIGHT  15
+#define  FREEGLUT_MENU_BORDER   8
 
 
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
@@ -74,215 +75,247 @@ static SFG_MenuEntry *fghFindMenuEntry( SFG_Menu* menu, int index )
 /*
  * Private static function to check for the current menu/sub menu activity state
  */
-static GLboolean fghCheckMenuStatus( SFG_Menu* menu )
+static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu )
 {
-    SFG_Window* window = fgStructure.Window;
-    SFG_MenuEntry* menuEntry;
-    int x, y;
+  SFG_MenuEntry* menuEntry;
+  int x, y;
 
+  /*
+   * First of all check any of the active sub menus...
+   */
+  for( menuEntry = menu->Entries.First; menuEntry;
+       menuEntry = menuEntry->Node.Next )
+  {
     /*
-     * First of all check any of the active sub menus...
+     * Is that an active sub menu by any case?
      */
-    for( menuEntry = menu->Entries.First; menuEntry;
-         menuEntry = menuEntry->Node.Next )
+    if( menuEntry->SubMenu != NULL && menuEntry->IsActive == TRUE )
     {
-        /*
-         * Is that an active sub menu by any case?
-         */
-        if( menuEntry->SubMenu != NULL && menuEntry->IsActive == TRUE )
-        {
-            /*
-             * OKi, have the sub-menu checked, too. If it returns TRUE, it will mean
-             * that it caught the mouse cursor and we do not need to regenerate
-             * the activity list, and so our parents do...
-             */
-            if( fghCheckMenuStatus( menuEntry->SubMenu ) == TRUE )
-                return( TRUE );
-        }
+      /*
+       * OK, have the sub-menu checked, too. If it returns TRUE, it will mean
+       * that it caught the mouse cursor and we do not need to regenerate
+       * the activity list, and so our parents do...
+       */
+      if( fghCheckMenuStatus( window, menuEntry->SubMenu ) == TRUE )
+        return( TRUE );
     }
+  }
 
+  /*
+   * That much about our sub menus, let's get to checking the current menu:
+   */
+  x = window->State.MouseX - menu->X;
+  y = window->State.MouseY - menu->Y;
+
+  /*
+   * Mark all menu entries inactive...
+   */
+  for( menuEntry = menu->Entries.First; menuEntry;
+       menuEntry = menuEntry->Node.Next )
+  {
+    menuEntry->IsActive = FALSE;
+  }
+
+  menu->IsActive = FALSE;
+
+  /*
+   * Check if the mouse cursor is contained within the current menu box
+   */
+  if( x >= 0 && x < menu->Width && y >= 0 && y < menu->Height )
+  {
     /*
-     * That much about our sub menus, let's get to checking the current menu:
+     * Calculation of the highlighted menu item is easy enough now:
      */
-    x = window->State.MouseX - menu->X;
-    y = window->State.MouseY - menu->Y;
+    int menuID = y / FREEGLUT_MENU_HEIGHT;
 
     /*
-     * Mark all menu entries inactive...
+     * The mouse cursor is somewhere over our box, check it out.
      */
-    for( menuEntry = menu->Entries.First; menuEntry;
-         menuEntry = menuEntry->Node.Next )
-    {
-        menuEntry->IsActive = FALSE;
-    }
-
-    menu->IsActive = FALSE;
+    menuEntry = fghFindMenuEntry( menu, menuID + 1 );
+    assert( menuEntry != NULL );
 
     /*
-     * Check if the mouse cursor is contained within the current menu box
+     * Mark the menu as active...
      */
-    if( x >= 0 && x < menu->Width && y >= 0 && y < menu->Height )
-    {
-        /*
-         * Calculation of the highlighted menu item is easy enough now:
-         */
-        int menuID = y / FREEGLUT_MENU_HEIGHT;
-
-        /*
-         * The mouse cursor is somewhere over our box, check it out.
-         */
-        menuEntry = fghFindMenuEntry( menu, menuID + 1 );
-        assert( menuEntry != NULL );
+    menuEntry->IsActive = TRUE;
+    menuEntry->Ordinal = menuID;
 
-        /*
-         * Mark the menu as active...
-         */
-        menuEntry->IsActive = TRUE;
-        menuEntry->Ordinal = menuID;
-
-        /*
-         * Don't forget about marking the current menu as active, too:
-         */
-        menu->IsActive = TRUE;
-
-        /*
-         * OKi, we have marked that entry as active, but it would be also
-         * nice to have it's contents updated, in case it's a sub menu.
-         * Also, ignore the return value of the check function:
-         */
-        if( menuEntry->SubMenu != NULL )
-        {
-            int x = window->State.MouseX;
-            int y = window->State.MouseY;
-
-            /*
-             * Set up the initial menu position now...
-             */
-
-            if( x > 15 ) menuEntry->SubMenu->X = x - 15; else menuEntry->SubMenu->X = 15;
-            if( y > 15 ) menuEntry->SubMenu->Y = y - 15; else menuEntry->SubMenu->Y = 15;
-
-            if( x > (glutGet( GLUT_WINDOW_WIDTH  ) - menuEntry->SubMenu->Width  - 15) )
-                menuEntry->SubMenu->X = glutGet( GLUT_WINDOW_WIDTH  ) - menuEntry->SubMenu->Width  - 15;
-            if( y > (glutGet( GLUT_WINDOW_HEIGHT ) - menuEntry->SubMenu->Height - 15) )
-                menuEntry->SubMenu->Y = glutGet( GLUT_WINDOW_HEIGHT ) - menuEntry->SubMenu->Height - 15;
-
-            /*
-             * ...then check the submenu's state:
-             */
-            fghCheckMenuStatus( menuEntry->SubMenu );
-        }
+    /*
+     * Don't forget about marking the current menu as active, too:
+     */
+    menu->IsActive = TRUE;
 
-        /*
-         * Report back that we have caught the menu cursor
-         */
-        return( TRUE );
+    /*
+     * OKi, we have marked that entry as active, but it would be also
+     * nice to have its contents updated, in case it's a sub menu.
+     * Also, ignore the return value of the check function:
+     */
+    if( menuEntry->SubMenu != NULL )
+    {
+      /*
+       * Set up the initial menu position now...
+       */
+
+      menuEntry->SubMenu->X = menu->X + menu->Width ;
+      menuEntry->SubMenu->Y = menu->Y + menuEntry->Ordinal * FREEGLUT_MENU_HEIGHT ;
+
+      /*
+       * Make sure the submenu stays within the window
+       */
+      if ( menuEntry->SubMenu->X + menuEntry->SubMenu->Width > glutGet ( GLUT_WINDOW_WIDTH ) )
+      {
+        menuEntry->SubMenu->X = menu->X - menuEntry->SubMenu->Width ;
+        if ( menuEntry->SubMenu->X < 0 )
+          menuEntry->SubMenu->X = glutGet ( GLUT_WINDOW_WIDTH ) - menuEntry->SubMenu->Width ;
+      }
+
+      /*
+       * ...then check the submenu's state:
+       */
+      fghCheckMenuStatus( window, menuEntry->SubMenu );
+
+      /*
+       * Even if the submenu turned up inactive, activate it because its parent entry is active
+       */
+      menuEntry->SubMenu->IsActive = TRUE ;
     }
 
     /*
-     * Looks like the menu cursor is somewhere else...
+     * Report back that we have caught the menu cursor
      */
-    return( FALSE );
+    return( TRUE );
+  }
+
+  /*
+   * Looks like the menu cursor is somewhere else...
+   */
+  return( FALSE );
 }
 
 /*
- * Displays a menu box and all of it's submenus (if they are active)
+ * Displays a menu box and all of its submenus (if they are active)
  */
 static void fghDisplayMenuBox( SFG_Menu* menu )
 {
-    SFG_MenuEntry *menuEntry;
-    int i;
+  SFG_MenuEntry *menuEntry;
+  int i;
+
+  /*
+   * Have the menu box drawn first. The +- values are
+   * here just to make it more nice-looking...
+   */
+  glColor4f( 0.0, 0.0, 0.0, 1.0 );
+  glBegin( GL_QUADS );
+    glVertex2f( menu->X              , menu->Y - 1                );
+    glVertex2f( menu->X + menu->Width, menu->Y - 1                );
+    glVertex2f( menu->X + menu->Width, menu->Y + 4 + menu->Height );
+    glVertex2f( menu->X              , menu->Y + 4 + menu->Height );
+  glEnd();
+
+  glColor4f( 0.3, 0.4, 0.5, 1.0 );
+  glBegin( GL_QUADS );
+    glVertex2f( menu->X - 2              , menu->Y + 1                );
+    glVertex2f( menu->X - 2 + menu->Width, menu->Y + 1                );
+    glVertex2f( menu->X - 2 + menu->Width, menu->Y + 2 + menu->Height );
+    glVertex2f( menu->X - 2              , menu->Y + 2 + menu->Height );
+  glEnd();
+
+  /*
+   * Check if any of the submenus is currently active...
+   */
+  for( menuEntry = menu->Entries.First; menuEntry;
+       menuEntry = menuEntry->Node.Next )
+  {
+    /*
+     * Has the menu been marked as active, maybe?
+     */
+    if( menuEntry->IsActive == TRUE )
+    {
+      /*
+       * That's truly right, and we need to have it highlighted.
+       * There is an assumption that mouse cursor didn't move
+       * since the last check of menu activity state:
+       */
+      int menuID = menuEntry->Ordinal;
+
+      /*
+       * So have the highlight drawn...
+       */
+      glColor4f( 0.2, 0.3, 0.4, 1.0 );
+      glBegin( GL_QUADS );
+        glVertex2f( menu->X - 2              , menu->Y + (menuID + 0)*FREEGLUT_MENU_HEIGHT + 1 );
+        glVertex2f( menu->X - 2 + menu->Width, menu->Y + (menuID + 0)*FREEGLUT_MENU_HEIGHT + 1 );
+        glVertex2f( menu->X - 2 + menu->Width, menu->Y + (menuID + 1)*FREEGLUT_MENU_HEIGHT + 2 );
+        glVertex2f( menu->X - 2              , menu->Y + (menuID + 1)*FREEGLUT_MENU_HEIGHT + 2 );
+      glEnd();
+    }
+  }
 
+  /*
+   * Print the menu entries now...
+   */
+  glColor4f( 1, 1, 1, 1 );
+
+  for( menuEntry = menu->Entries.First, i=0; menuEntry;
+       menuEntry = menuEntry->Node.Next, ++i )
+  {
     /*
-     * Have the menu box drawn first. The +- values are
-     * here just to make it more nice-looking...
+     * Move the raster into position...
      */
-    glColor4f( 0.0, 0.0, 0.0, 1.0 );
-    glBegin( GL_QUADS );
-        glVertex2f( menu->X - 8              , menu->Y - 1                );
-        glVertex2f( menu->X + 8 + menu->Width, menu->Y - 1                );
-        glVertex2f( menu->X + 8 + menu->Width, menu->Y + 4 + menu->Height );
-        glVertex2f( menu->X - 8              , menu->Y + 4 + menu->Height );
-    glEnd();
-
-    glColor4f( 0.3, 0.4, 0.5, 1.0 );
-    glBegin( GL_QUADS );
-        glVertex2f( menu->X - 6              , menu->Y + 1                );
-        glVertex2f( menu->X + 6 + menu->Width, menu->Y + 1                );
-        glVertex2f( menu->X + 6 + menu->Width, menu->Y + 2 + menu->Height );
-        glVertex2f( menu->X - 6              , menu->Y + 2 + menu->Height );
-    glEnd();
+    glRasterPos2i(
+        menu->X + FREEGLUT_MENU_BORDER,
+        menu->Y + (i + 1)*FREEGLUT_MENU_HEIGHT
+    );
 
     /*
-     * Check if any of the submenus is currently active...
+     * Have the label drawn, character after character:
      */
-    for( menuEntry = menu->Entries.First; menuEntry;
-         menuEntry = menuEntry->Node.Next )
-    {
-        /*
-         * Has the menu been marked as active, maybe?
-         */
-        if( menuEntry->IsActive == TRUE )
-        {
-            /*
-             * That's truly right, and we need to have it highlighted.
-             * There is an assumption that mouse cursor didn't move
-             * since the last check of menu activity state:
-             */
-            int menuID = menuEntry->Ordinal;
-
-            /*
-             * So have the highlight drawn...
-             */
-            glColor4f( 0.2, 0.3, 0.4, 1.0 );
-            glBegin( GL_QUADS );
-                glVertex2f( menu->X - 6              , menu->Y + (menuID + 0)*FREEGLUT_MENU_HEIGHT + 1 );
-                glVertex2f( menu->X + 6 + menu->Width, menu->Y + (menuID + 0)*FREEGLUT_MENU_HEIGHT + 1 );
-                glVertex2f( menu->X + 6 + menu->Width, menu->Y + (menuID + 1)*FREEGLUT_MENU_HEIGHT + 2 );
-                glVertex2f( menu->X - 6              , menu->Y + (menuID + 1)*FREEGLUT_MENU_HEIGHT + 2 );
-            glEnd();
-        }
-    }
+    glutBitmapString( FREEGLUT_MENU_FONT, menuEntry->Text);
 
     /*
-     * Print the menu entries now...
+     * If it's a submenu, draw a right arrow
      */
-    glColor4f( 1, 1, 1, 1 );
-
-    for( menuEntry = menu->Entries.First, i=0; menuEntry;
-         menuEntry = menuEntry->Node.Next, ++i )
+    if ( menuEntry->SubMenu != NULL )
     {
-        /*
-         * Move the raster into position...
-         */
-        glRasterPos2i(
-            menu->X,
-            menu->Y + (i + 1)*FREEGLUT_MENU_HEIGHT
-        );
-
-        /*
-         * Have the label drawn, character after character:
-         */
-        glutBitmapString( FREEGLUT_MENU_FONT, menuEntry->Text);
+      GLubyte arrow_char [] = { 0, 0, 32, 48, 56, 60, 62, 63, 62, 60, 56, 48, 32, 0, 0 } ;
+      int width = glutBitmapWidth ( FREEGLUT_MENU_FONT, ' ' ) ;
+
+      glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
+
+      /*
+       * Set up the pixel unpacking ways
+       */
+      glPixelStorei( GL_UNPACK_SWAP_BYTES,  GL_FALSE );
+      glPixelStorei( GL_UNPACK_LSB_FIRST,   GL_FALSE );
+      glPixelStorei( GL_UNPACK_ROW_LENGTH,  0        );
+      glPixelStorei( GL_UNPACK_SKIP_ROWS,   0        );
+      glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0        );
+      glPixelStorei( GL_UNPACK_ALIGNMENT,   1        );
+
+      glRasterPos2i ( menu->X + menu->Width - 2 - width,
+                      menu->Y + (i + 1)*FREEGLUT_MENU_HEIGHT ) ;
+      glBitmap ( width, FREEGLUT_MENU_HEIGHT, 0, 0, 0.0, 0.0, arrow_char ) ;
+      glPopClientAttrib();
     }
+  }
 
+  /*
+   * Now we are ready to check if any of our children needs to be redrawn:
+   */
+  for( menuEntry = menu->Entries.First; menuEntry;
+       menuEntry = menuEntry->Node.Next )
+  {
     /*
-     * Now we are ready to check if any of our children needs to be redrawn:
+     * Is that an active sub menu by any case?
      */
-    for( menuEntry = menu->Entries.First; menuEntry;
-         menuEntry = menuEntry->Node.Next )
+    if( menuEntry->SubMenu != NULL && menuEntry->IsActive == TRUE )
     {
-        /*
-         * Is that an active sub menu by any case?
-         */
-        if( menuEntry->SubMenu != NULL && menuEntry->IsActive == TRUE )
-        {
-            /*
-             * Yeah, indeed. Have it redrawn now:
-             */
-            fghDisplayMenuBox( menuEntry->SubMenu );
-        }
+      /*
+       * Yeah, indeed. Have it redrawn now:
+       */
+      fghDisplayMenuBox( menuEntry->SubMenu );
     }
+  }
 }
 
 /*
@@ -292,7 +325,6 @@ void fgDisplayMenu( void )
 {
     SFG_Window* window = fgStructure.Window;
     SFG_Menu* menu = NULL;
-    int i;
 
     /*
      * Make sure there is a current window available
@@ -302,17 +334,12 @@ void fgDisplayMenu( void )
     /*
      * Check if there is an active menu attached to this window...
      */
-    for( i=0; i<FREEGLUT_MAX_MENUS; i++ )
-    {
-        if( window->Menu[ i ] != NULL && window->MenuActive[ i ] == TRUE )
-            menu = window->Menu[ i ];
-    };
+    menu = window->ActiveMenu;
 
     /*
      * Did we find an active window?
      */
     freeglut_return_if_fail( menu != NULL );
-
     /*
      * Prepare the OpenGL state to do the rendering first:
      */
@@ -345,7 +372,7 @@ void fgDisplayMenu( void )
     /*
      * First of all, have the exact menu status check:
      */
-    fghCheckMenuStatus( menu );
+    fghCheckMenuStatus( window, menu );
 
     /*
      * The status has been updated and we're ready to have the menu drawn now:
@@ -357,118 +384,119 @@ void fgDisplayMenu( void )
      */
     glPopAttrib();
 
-    glMatrixMode( GL_MODELVIEW );
-    glPopMatrix();
     glMatrixMode( GL_PROJECTION );
     glPopMatrix();
+    glMatrixMode( GL_MODELVIEW );
+    glPopMatrix();
 }
 
 /*
  * Activates a menu pointed by the function argument
  */
-void fgActivateMenu( int button )
+void fgActivateMenu( SFG_Window* window, int button )
 {
-    SFG_Window* window = fgStructure.Window;
-    SFG_Menu* menu = NULL;
-    int x, y;
-
-    freeglut_assert_window;
-
-    /*
-     * Mark the menu as active, so that it gets displayed:
-     */
-    window->MenuActive[ button ] = TRUE;
-
-    /*
-     * We'll be referencing this menu a lot, so remember it's address:
-     */
-    menu = window->Menu[ button ];
-
-    /*
-     * Grab the mouse cursor position respective to the current window
-     */
-    x = window->State.MouseX;
-    y = window->State.MouseY;
-
-    /*
-     * Set up the initial menu position now:
-     */
-    if( x > 10 ) menu->X = x - 10; else menu->X = 5;
-    if( y > 10 ) menu->Y = y - 10; else menu->Y = 5;
+  int x, y;
+
+  /*
+   * We'll be referencing this menu a lot, so remember its address:
+   */
+  SFG_Menu* menu = window->Menu[ button ];
+
+  /*
+   * Mark the menu as active, so that it gets displayed:
+   */
+  window->ActiveMenu = menu;
+  menu->IsActive = TRUE ;
+
+  /*
+   * Grab the mouse cursor position respective to the current window
+   */
+  x = window->State.MouseX;
+  y = window->State.MouseY;
+
+  /*
+   * Set up the initial menu position now:
+   */
+  menu->X = x ;
+  menu->Y = y ;
+
+  glutSetWindow ( window->ID ) ;
+
+  if( x > ( glutGet( GLUT_WINDOW_WIDTH ) - menu->Width ) )
+    menu->X = glutGet( GLUT_WINDOW_WIDTH ) - menu->Width;
+  if( y > ( glutGet( GLUT_WINDOW_HEIGHT ) - menu->Height) )
+    menu->Y = glutGet( GLUT_WINDOW_HEIGHT ) - menu->Height;
+}
 
-    if( x > (glutGet( GLUT_WINDOW_WIDTH  ) - menu->Width ) )
-        menu->X = glutGet( GLUT_WINDOW_WIDTH  ) - menu->Width;
-    if( y > (glutGet( GLUT_WINDOW_HEIGHT ) - menu->Height) )
-        menu->Y = glutGet( GLUT_WINDOW_HEIGHT ) - menu->Height;
+/*
+ * Check whether an active menu absorbs a mouse click
+ */
+GLboolean fgCheckActiveMenu ( SFG_Window *window, SFG_Menu *menu )
+{
+  /*
+   * Near as I can tell, this is the active menu behaviour:
+   *  - Down-click any button outside the menu, menu active:  deactivate the menu
+   *  - Down-click any button inside the menu, menu active:  select the menu entry and deactivate the menu
+   *  - Up-click the menu button outside the menu, menu active:  nothing happens
+   *  - Up-click the menu button inside the menu, menu active:  select the menu entry and deactivate the menu
+   * Since menus can have submenus, we need to check this recursively.
+   */
+  return fghCheckMenuStatus ( window, menu ) ;
 }
 
 /*
- * Private static function to check for menu entry selection on menu deactivation
+ * Function to check for menu entry selection on menu deactivation
  */
-static void fghCheckMenuSelect( SFG_Menu* menu )
+void fgExecuteMenuCallback( SFG_Menu* menu )
 {
-    SFG_MenuEntry *menuEntry;
+  SFG_MenuEntry *menuEntry;
 
+  /*
+   * First of all check any of the active sub menus...
+   */
+  for( menuEntry = menu->Entries.First; menuEntry; menuEntry = menuEntry->Node.Next)
+  {
     /*
-     * First of all check any of the active sub menus...
+     * Is this menu entry active?
      */
-    for( menuEntry = menu->Entries.First; menuEntry;
-         menuEntry = menuEntry->Node.Next)
+    if( menuEntry->IsActive == TRUE )
     {
+      /*
+       * If there is not a sub menu, execute the menu callback and return...
+       */
+      if( menuEntry->SubMenu == NULL )
+      {
         /*
-         * Is this menu entry active?
+         * ...certainly given that there is one...
          */
-        if( menuEntry->IsActive == TRUE )
-        {
-            /*
-             * If this is not a sub menu, execute the menu callback and return...
-             */
-            if( menuEntry->SubMenu == NULL )
-            {
-                /*
-                 * ...certainly given that there is one...
-                 */
-                if( menu->Callback != NULL )
-                    menu->Callback( menuEntry->ID );
-
-                return;
-            }
-
-            /*
-             * Otherwise recurse into the submenu.
-             */
-            fghCheckMenuSelect( menuEntry->SubMenu );
-
-            /*
-             * There is little sense in dwelling the search on
-             */
-            return;
-        }
+        if( menu->Callback != NULL )
+          menu->Callback( menuEntry->ID );
+
+        return;
+      }
+
+      /*
+       * Otherwise recurse into the submenu.
+       */
+      fgExecuteMenuCallback( menuEntry->SubMenu );
+
+      /*
+       * There is little sense in dwelling the search on
+       */
+      return;
     }
+  }
 }
 
 /*
  * Deactivates a menu pointed by the function argument.
  */
-void fgDeactivateMenu( int button )
+void fgDeactivateMenu( SFG_Window *window )
 {
-    SFG_Window* window = fgStructure.Window;
-    SFG_Menu* menu = NULL;
-    int i;
-
-    /*
-     * Make sure there is a current window available...
-     */
-    freeglut_assert_window;
-
     /*
      * Check if there is an active menu attached to this window...
      */
-    for( i=0; i<FREEGLUT_MAX_MENUS; i++ )
-    {
-        if( window->Menu[ i ] != NULL && window->MenuActive[ i ] == TRUE )
-            menu = window->Menu[ i ];
-    };
+    SFG_Menu* menu = window->ActiveMenu;
 
     /*
      * Did we find an active window?
@@ -476,15 +504,10 @@ void fgDeactivateMenu( int button )
     freeglut_return_if_fail( menu != NULL );
 
     /*
-     * Check if there was any menu entry active. This would
-     * mean the user has selected a menu entry...
-     */
-    fghCheckMenuSelect( menu );
-
-    /*
      * Forget about having that menu active anymore, now:
      */
-    fgStructure.Window->MenuActive[ button ] = FALSE;
+    window->ActiveMenu = NULL;
+    menu->IsActive = FALSE ;
 }
 
 /*
@@ -492,39 +515,39 @@ void fgDeactivateMenu( int button )
  */
 void fghCalculateMenuBoxSize( void )
 {
-    SFG_MenuEntry* menuEntry;
-    int width = 0, height = 0;
+  SFG_MenuEntry* menuEntry;
+  int width = 0, height = 0;
+
+  /*
+   * Make sure there is a current menu set
+   */
+  freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
 
+  /*
+   * The menu's box size depends on the menu entries:
+   */
+  for( menuEntry = fgStructure.Menu->Entries.First; menuEntry;
+       menuEntry = menuEntry->Node.Next)
+  {
     /*
-     * Make sure there is a current menu set
+     * Update the menu entry's width value
      */
-    freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
+    menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT, menuEntry->Text );
 
     /*
-     * The menu's box size depends on the menu entries:
+     * Check if it's the biggest we've found
      */
-    for( menuEntry = fgStructure.Menu->Entries.First; menuEntry;
-         menuEntry = menuEntry->Node.Next)
-    {
-        /*
-         * Update the menu entry's width value
-         */
-        menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT, menuEntry->Text );
-
-        /*
-         * Check if it's the biggest we've found
-         */
-        if( menuEntry->Width > width )
-            width = menuEntry->Width;
+    if( menuEntry->Width > width )
+      width = menuEntry->Width;
 
-        height += FREEGLUT_MENU_HEIGHT;
-    }
+    height += FREEGLUT_MENU_HEIGHT;
+  }
 
-    /*
-     * Store the menu's box size now:
-     */
-    fgStructure.Menu->Height = height; 
-    fgStructure.Menu->Width  = width;
+  /*
+   * Store the menu's box size now:
+   */
+  fgStructure.Menu->Height = height; 
+  fgStructure.Menu->Width  = width + 2 * FREEGLUT_MENU_BORDER ;
 }
 
 
@@ -581,7 +604,7 @@ int FGAPIENTRY glutGetMenu( void )
 }
 
 /*
- * Sets the current menu given it's menu ID
+ * Sets the current menu given its menu ID
  */
 void FGAPIENTRY glutSetMenu( int menuID )
 {
@@ -629,32 +652,32 @@ void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
  */
 void FGAPIENTRY glutAddSubMenu( const char* label, int subMenuID )
 {
-    SFG_MenuEntry* menuEntry = calloc( sizeof(SFG_MenuEntry), 1 );
-    SFG_Menu*      subMenu = fgMenuByID( subMenuID );
-
-    /*
-     * Make sure there is a current menu and the sub menu
-     * we want to attach actually exists...
-     */
-    freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
-    freeglut_return_if_fail( subMenu != NULL );
-
-    /*
-     * Fill in the appropriate values
-     */
-    menuEntry->Text    = strdup( label );
-    menuEntry->SubMenu = subMenu;
-    menuEntry->ID      = -1;
-
-    /*
-     * Have the new menu entry attached to the current menu
-     */
-    fgListAppend( &fgStructure.Menu->Entries, &menuEntry->Node );
-
-    /*
-     * Update the menu's dimensions now
-     */
-    fghCalculateMenuBoxSize();
+  SFG_MenuEntry* menuEntry = calloc( sizeof(SFG_MenuEntry), 1 );
+  SFG_Menu*      subMenu = fgMenuByID( subMenuID );
+
+  /*
+   * Make sure there is a current menu and the sub menu
+   * we want to attach actually exists...
+   */
+  freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
+  freeglut_return_if_fail( subMenu != NULL );
+
+  /*
+   * Fill in the appropriate values
+   */
+  menuEntry->Text    = strdup( label );
+  menuEntry->SubMenu = subMenu;
+  menuEntry->ID      = -1;
+
+  /*
+   * Have the new menu entry attached to the current menu
+   */
+  fgListAppend( &fgStructure.Menu->Entries, &menuEntry->Node );
+
+  /*
+   * Update the menu's dimensions now
+   */
+  fghCalculateMenuBoxSize();
 }
 
 /*
index 7aa85df..4dcfcea 100644 (file)
  */
 int FGAPIENTRY glutExtensionSupported( const char* extension )
 {
-    const char *extensions;
-    const char *ptr;
-    int i;
-
-    /*
-     * Make sure there is a current window, and thus -- a current context available
-     */
-    freeglut_assert_ready;
-    freeglut_return_val_if_fail( fgStructure.Window != NULL, 0 );
-
+  const char *extensions;
+  const char *ptr;
+  int len = strlen ( extension ) ;
+
+  /*
+   * Make sure there is a current window, and thus -- a current context available
+   */
+  freeglut_assert_ready;
+  freeglut_return_val_if_fail( fgStructure.Window != NULL, 0 );
+
+  /*
+   * Note it is safe to query the extensions
+   */
+  extensions = glGetString(GL_EXTENSIONS);
+
+  freeglut_return_val_if_fail( extensions != NULL, 0 );
+
+  /*
+   * Check if the extension itself looks valid
+   */
+  if ( strchr ( extension, ' ' ) != NULL )
+    return( 0 );
+
+  /*
+   * Look for our extension
+   */
+  for (ptr = extensions; *ptr;)
+  {
     /*
-     * Not it is safe to query the extenstions
+     * Is it the current extension?
      */
-    extensions = glGetString(GL_EXTENSIONS);
-
-    freeglut_return_val_if_fail( extensions != NULL, 0 );
+    if ( strncmp ( extension, extensions, len ) == 0 )
+      return 1 ;
 
     /*
-     * Check if the extension itself looks valid
+     * No, go find the next extension.  They are separated from each other by one or more blank spaces.
      */
-    for( i=0; i<strlen( extension ); i++ )
-        if( extension[ i ] == ' ' )
-            return( 0 );
+    ptr = strchr ( ptr + len, ' ' ) ;
 
     /*
-     * Look for our extension
+     * If we ran off the end of the "extensions" character string, we didn't find it.  Return failure.
      */
-    for (ptr = extensions; *ptr;)
-    {
-        const char *str = extension;
-        char c;
+    if ( !ptr ) return 0 ;
 
-        while ( (c = *(str++)) )
-        {
-            if (*ptr != c)
-                goto next;
-            ptr++;
-        }
-        if ( !(c = *ptr) || c == ' ' )
-            return 1;
-    next:
-        while ( (c = *ptr) && c != ' ' )
-            ptr++;
-        while (*ptr == ' ')
-            ptr++;
-    }
+    while ( *ptr == ' ' )
+      ptr++ ;
+  }
 
-    return 0;
+  return 0 ;
 }
 
 /*
- * This function reports all the errors that happened till now
+ * This function reports all the OpenGL errors that happened till now
  */
 void FGAPIENTRY glutReportErrors( void )
 {
@@ -133,10 +134,10 @@ void FGAPIENTRY glutReportErrors( void )
 /*
  * Turns the ignore key auto repeat feature on and off
  */
-void FGAPIENTRY glutIgnoreKeyRepeat( int ignore )
+void FGAPIENTRY glutIgnoreKeyRepeat( int ignore )  /* DEPRECATED 11/4/02 - Do not use */
 {
     /*
-     * This is simple and not demanging...
+     * This is simple and not damaging...
      */
     fgState.IgnoreKeyRepeat = ignore ? TRUE : FALSE;
 }
index b37c416..affa1ee 100644 (file)
 
 /* -- LOCAL DEFINITIONS ---------------------------------------------------- */
 
-/*
- * Those are definitions introduced to make the glutGet() more easy,
- * however they might introduce errors if someone ports GLX to Win32 :)
- *
- * Btw. this is not that a bad idea (wrapping WGL around GLX)...
- */
-#if TARGET_HOST_WIN32
-#      define GLX_RGBA                 0x01
-#      define GLX_DOUBLEBUFFER         0x02
-#      define GLX_BUFFER_SIZE          0x03
-#      define GLX_STENCIL_SIZE         0x04
-#      define GLX_DEPTH_SIZE           0x05
-#      define GLX_RED_SIZE             0x06
-#      define GLX_GREEN_SIZE           0x07
-#      define GLX_BLUE_SIZE            0x08
-#      define GLX_ALPHA_SIZE           0x09
-#      define GLX_ACCUM_RED_SIZE       0x0A
-#      define GLX_ACCUM_GREEN_SIZE     0x0B
-#      define GLX_ACCUM_BLUE_SIZE      0x0C
-#      define GLX_ACCUM_ALPHA_SIZE     0x0D
-#      define GLX_STEREO               0x0E
-#endif
-
-
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
 
+#if TARGET_HOST_UNIX_X11
 /*
  * Queries the GL context about some attributes
  */
 static int fghGetConfig( int attribute )
 {
-    int returnValue;
+  int returnValue ;
 
-    /*
-     * Return nothing if there is no current window set
-     */
-    if( fgStructure.Window == NULL )
-        return( 0 );
+  /*
+   * Return nothing if there is no current window set
+   */
+  if( fgStructure.Window == NULL )
+    return( 0 );
 
-#if TARGET_HOST_UNIX_X11
-    /*
-     * glXGetConfig should work fine
-     */
-    glXGetConfig( fgDisplay.Display, fgStructure.Window->Window.VisualInfo, attribute, &returnValue );
+  /*
+   * glXGetConfig should work fine
+   */
+  glXGetConfig( fgDisplay.Display, fgStructure.Window->Window.VisualInfo, attribute, &returnValue );
 
-#elif TARGET_HOST_WIN32
-    /*
-     * This is going to be a bit harder than the X11 version...
-     */
-#   pragma message( "freeglut_state.c::fghGetConfig() says hello world my name is not implemented!" )
-    switch( attribute )
-    {
-    case GLX_RGBA:
-    case GLX_DOUBLEBUFFER:
-    case GLX_BUFFER_SIZE:
-    case GLX_RED_SIZE:
-    case GLX_GREEN_SIZE:
-    case GLX_BLUE_SIZE:
-    case GLX_DEPTH_SIZE:
-        return( 1 );
-
-    case GLX_STENCIL_SIZE:
-    case GLX_ALPHA_SIZE:
-    case GLX_ACCUM_RED_SIZE:
-    case GLX_ACCUM_GREEN_SIZE:
-    case GLX_ACCUM_BLUE_SIZE:
-    case GLX_ACCUM_ALPHA_SIZE:
-    case GLX_STEREO:
-    default:
-        /*
-         * Well, this looks like not implemented to me :)
-         */
-        return( 0 );
-    }
 
-#endif
-
-    /*
-     * Have the query results returned
-     */
-    return( returnValue );
+  /*
+   * Have the query results returned
+   */
+  return ( returnValue ) ;
 }
+#endif
 
 /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
 
 /*
+ * General settings assignment method
+ */
+void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
+{
+  freeglut_assert_ready;
+
+  /*
+   * Check what is the caller querying for. In chronological code add order.
+   */
+  switch( eWhat )
+  {
+  case GLUT_INIT_WINDOW_X:          fgState.Position.X          = (GLint)value ;
+                                    break ;
+  case GLUT_INIT_WINDOW_Y:          fgState.Position.Y          = (GLint)value ;
+                                    break ;
+  case GLUT_INIT_WINDOW_WIDTH:      fgState.Size.X              = (GLint)value ;
+                                    break ;
+  case GLUT_INIT_WINDOW_HEIGHT:     fgState.Size.Y              = (GLint)value ;
+                                    break ;
+  case GLUT_INIT_DISPLAY_MODE:      fgState.DisplayMode         = (unsigned int)value ;
+                                    break ;
+
+  case GLUT_ACTION_ON_WINDOW_CLOSE: fgState.ActionOnWindowClose = value ;
+                                    break ;
+
+  case GLUT_WINDOW_CURSOR:
+      if( fgStructure.Window != NULL ) fgStructure.Window->State.Cursor = value ;
+      break ;
+
+  default:
+      /*
+       * Just have it reported, so that we can see what needs to be implemented
+       */
+      fgWarning( "glutSetOption(): missing enum handle %i\n", eWhat );
+      break;
+  }
+}
+
+/*
  * General settings query method
  */
 int FGAPIENTRY glutGet( GLenum eWhat )
 {
+  int returnValue ;
+  GLboolean boolValue ;
     freeglut_assert_ready;
 
     /*
@@ -172,8 +159,9 @@ int FGAPIENTRY glutGet( GLenum eWhat )
          */
         return( 0 );
 
+#if TARGET_HOST_UNIX_X11
     /*
-     * The rest of GLX queries is general enough to use a macro to check them
+     * The rest of GLX queries under X are general enough to use a macro to check them
      */
 #   define GLX_QUERY(a,b) case a: return( fghGetConfig( b ) );
 
@@ -194,7 +182,6 @@ int FGAPIENTRY glutGet( GLenum eWhat )
 
 #   undef GLX_QUERY
 
-#if TARGET_HOST_UNIX_X11
     /*
      * Colormap size is handled in a bit different way than all the rest
      */
@@ -314,6 +301,60 @@ int FGAPIENTRY glutGet( GLenum eWhat )
 
 #elif TARGET_HOST_WIN32
 
+    /*
+     * Handle the OpenGL inquiries
+     */
+    case GLUT_WINDOW_RGBA:
+      glGetBooleanv ( GL_RGBA_MODE, &boolValue ) ;         /* True if color buffers store RGBA */
+      returnValue = boolValue ? 1 : 0 ;
+      return ( returnValue ) ;
+    case GLUT_WINDOW_DOUBLEBUFFER:
+      glGetBooleanv ( GL_DOUBLEBUFFER, &boolValue ) ;      /* True if front and back buffers exist */
+      returnValue = boolValue ? 1 : 0 ;
+      return ( returnValue ) ;
+    case GLUT_WINDOW_STEREO:
+      glGetBooleanv ( GL_STEREO, &boolValue ) ;            /* True if left and right buffers exist */
+      returnValue = boolValue ? 1 : 0 ;
+      return ( returnValue ) ;
+
+    case GLUT_WINDOW_RED_SIZE:
+      glGetIntegerv ( GL_RED_BITS, &returnValue ) ;          /* Number of bits per red component in color buffers */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_GREEN_SIZE:
+      glGetIntegerv ( GL_GREEN_BITS, &returnValue ) ;        /* Number of bits per green component in color buffers */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_BLUE_SIZE:
+      glGetIntegerv ( GL_BLUE_BITS, &returnValue ) ;         /* Number of bits per blue component in color buffers */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_ALPHA_SIZE:
+      glGetIntegerv ( GL_ALPHA_BITS, &returnValue ) ;        /* Number of bits per alpha component in color buffers */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_ACCUM_RED_SIZE:
+      glGetIntegerv ( GL_ACCUM_RED_BITS, &returnValue ) ;    /* Number of bits per red component in the accumulation buffer */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_ACCUM_GREEN_SIZE:
+      glGetIntegerv ( GL_ACCUM_GREEN_BITS, &returnValue ) ;  /* Number of bits per green component in the accumulation buffer */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_ACCUM_BLUE_SIZE:
+      glGetIntegerv ( GL_ACCUM_BLUE_BITS, &returnValue ) ;   /* Number of bits per blue component in the accumulation buffer */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_ACCUM_ALPHA_SIZE:
+      glGetIntegerv ( GL_ACCUM_ALPHA_BITS, &returnValue ) ;  /* Number of bits per alpha component in the accumulation buffer */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_DEPTH_SIZE:
+      glGetIntegerv ( GL_DEPTH_BITS, &returnValue ) ;        /* Number of depth-buffer bitplanes */
+      return ( returnValue ) ;
+
+    case GLUT_WINDOW_BUFFER_SIZE:
+      returnValue = 1 ;                                      /* ????? */
+      return ( returnValue ) ;
+    case GLUT_WINDOW_STENCIL_SIZE:
+      returnValue = 0 ;                                      /* ????? */
+      return ( returnValue ) ;
+
+    /*
+     * Window position and size
+     */
     case GLUT_WINDOW_X:
     case GLUT_WINDOW_Y:
     case GLUT_WINDOW_WIDTH:
@@ -411,6 +452,8 @@ int FGAPIENTRY glutGet( GLenum eWhat )
 
         return( fgListLength( &fgStructure.Menu->Entries ) );
 
+    case GLUT_ACTION_ON_WINDOW_CLOSE: return ( fgState.ActionOnWindowClose ) ;
+
     default:
         /*
          * Just have it reported, so that we can see what needs to be implemented
index 35e5cff..a0b336b 100644 (file)
@@ -2,11 +2,14 @@
 /* This file has been automatically generated by the genstroke utility. */
 
 #include "../include/GL/freeglut_internal.h"
-
+#ifdef TARGET_HOST_WIN32
+#pragma warning ( once:4305 )
+#endif
 /* char: 0x20 */
 
 static const SFG_StrokeStrip ch32st[] =
 {
+  { 0, NULL }
 };
 
 static const SFG_StrokeChar ch32 = {104.762,0,ch32st};
index 432f63c..ca3b8df 100644 (file)
@@ -2,11 +2,15 @@
 /* This file has been automatically generated by the genstroke utility. */
 
 #include "../include/GL/freeglut_internal.h"
+#ifdef TARGET_HOST_WIN32
+#pragma warning ( once:4305 )
+#endif
 
 /* char: 0x20 */
 
 static const SFG_StrokeStrip ch32st[] =
 {
+  { 0, NULL }
 };
 
 static const SFG_StrokeChar ch32 = {104.762,0,ch32st};
index 2604f1d..d3696ba 100644 (file)
@@ -106,7 +106,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, int x, int y,
      * Open the window now. The fgOpenWindow() function is system
      * dependant, and resides in freeglut_window.c. Uses fgState.
      */
-    fgOpenWindow( window, title, x, y, w, h, gameMode );
+    fgOpenWindow( window, title, x, y, w, h, gameMode, (parent != NULL) ? TRUE : FALSE );
 
     /*
      * Return a pointer to the newly created window
@@ -160,7 +160,67 @@ SFG_Menu* fgCreateMenu( FGCBmenu menuCallback )
 }
 
 /*
- * This function destroys a window and all of it's subwindows. Actually,
+ * Linked list of windows to destroy ... this is so we don't destroy a window from the middle of
+ * its callback.  Some C compilers take an extremely dim view of this.
+ */
+
+static SFG_WindowList* WindowsToDestroy = (SFG_WindowList*)NULL ;
+
+/*
+ * Function to add a window to the linked list of windows to destroy.  Subwindows are automatically
+ * added because they hang from the window structure.
+ */
+void fgAddToWindowDestroyList ( SFG_Window* window, GLboolean needToClose )
+{
+  SFG_WindowList *new_list_entry = (SFG_WindowList*)malloc ( sizeof(SFG_WindowList) ) ;
+  new_list_entry->window = window ;
+  new_list_entry->needToClose = needToClose ;
+  new_list_entry->next = WindowsToDestroy ;
+  WindowsToDestroy = new_list_entry ;
+
+  /*
+   * Check the execution state.  If this has been called from "glutDestroyWindow",
+   * a statement in that function will reset the "ExecState" after this function returns.
+   */
+  if ( fgState.ActionOnWindowClose != GLUT_ACTION_CONTINUE_EXECUTION )
+  {
+    /*
+     * Set the execution state flag to drop out of the main loop.
+     */
+    if ( fgState.ActionOnWindowClose == GLUT_ACTION_EXIT )
+      fgState.ExecState = GLUT_EXEC_STATE_STOP ;
+  }
+}
+
+/*
+ * Function to close down all the windows in the "WindowsToDestroy" list
+ */
+void fgCloseWindows ()
+{
+  fgExecutionState ExecState = fgState.ExecState ;
+
+  SFG_WindowList *window_ptr = WindowsToDestroy ;
+  WindowsToDestroy = (SFG_WindowList*)NULL ;  // In case the destroy callbacks cause more windows to be closed
+
+  while ( window_ptr )
+  {
+    SFG_WindowList *next = window_ptr->next ;
+    fgDestroyWindow ( window_ptr->window, window_ptr->needToClose ) ;
+    free ( window_ptr ) ;
+    window_ptr = next ;
+
+    if ( !window_ptr ) window_ptr = WindowsToDestroy ;
+  }
+
+  /*
+   * Since the "fgDestroyWindow" function could easily have set the "ExecState" to stop,
+   * let's set it back to what it was.
+   */
+  fgState.ExecState = ExecState ;
+}
+
+/*
+ * This function destroys a window and all of its subwindows. Actually,
  * another function, defined in freeglut_window.c is called, but this is
  * a whole different story...
  */
@@ -174,19 +234,25 @@ void fgDestroyWindow( SFG_Window* window, GLboolean needToClose )
     /*
      * Does this window have any subwindows?
      */
-    if( (subWindow = window->Children.First) != NULL )
+    while ( (subWindow = window->Children.First) != NULL )
     {
         /*
          * Destroy the first window in the list (possibly destroying
-         * it's subwindows too). This is not very effective, but works
+         * its subwindows too). This is not very effective, but works
          */
-        fgDestroyWindow( subWindow, TRUE );
+        fgDestroyWindow( subWindow, needToClose );
     }
 
     /*
-     * Now we should remove the reference to this window from it's parent
+     * If the programmer defined a destroy callback, call it
+     */
+    if ( window->Callbacks.Destroy != NULL )
+      window->Callbacks.Destroy () ;
+
+    /*
+     * Now we should remove the reference to this window from its parent
      */
-    if( window->Parent != NULL )
+    if ( window->Parent != NULL )
         fgListRemove( &window->Parent->Children, &window->Node );
     else
         fgListRemove( &fgStructure.Windows, &window->Node );
@@ -212,7 +278,7 @@ void fgDestroyWindow( SFG_Window* window, GLboolean needToClose )
 }
 
 /*
- * This is a helper static function that removes a menu (given it's pointer)
+ * This is a helper static function that removes a menu (given its pointer)
  * from any windows that can be accessed from a given parent...
  */
 static void fghRemoveMenuFromWindow( SFG_Window* window, SFG_Menu* menu )
@@ -246,15 +312,15 @@ static void fghRemoveMenuFromWindow( SFG_Window* window, SFG_Menu* menu )
  */
 static void fghRemoveMenuFromMenu( SFG_Menu* from, SFG_Menu* menu )
 {
-    SFG_MenuEntry *entry;
+  SFG_MenuEntry *entry;
 
-    for( entry = from->Entries.First; entry; entry = entry->Node.Next )
+  for( entry = from->Entries.First; entry; entry = entry->Node.Next )
+  {
+    if (entry->SubMenu == menu)
     {
-        if (entry->SubMenu == menu)
-        {
-                entry->SubMenu = NULL;
-        }
+      entry->SubMenu = NULL;
     }
+  }
 }
 
 /*
@@ -263,64 +329,63 @@ static void fghRemoveMenuFromMenu( SFG_Menu* from, SFG_Menu* menu )
  */
 void fgDestroyMenu( SFG_Menu* menu )
 {
-    SFG_Window *window;
-    SFG_Menu *from;
-    SFG_MenuEntry *entry;
-
-    assert( menu != NULL );
-    freeglut_assert_ready;
-
-    /*
-     * First of all, have all references to this menu removed from all windows:
-     */
-    for( window = fgStructure.Windows.First; window;
-        window = window->Node.Next )
-    {
-        fghRemoveMenuFromWindow( window, menu );
-    }
-
-    /*
-     * Now proceed with removing menu entries that lead to this menu
-     */
-    for( from = fgStructure.Menus.First; from; from = from->Node.Next )
-    {
-        fghRemoveMenuFromMenu( from, menu );
-    }
-
-    /*
-     * Now we are pretty sure the menu is not used anywhere
-     * and that we can remove all of it's entries
-     */
-    while( (entry = menu->Entries.First) != NULL )
-    {
-       fgListRemove(&menu->Entries, &entry->Node);
-
-        /*
-         * There might be a string allocated, have it freed:
-         */
-        free( entry->Text );
-
-        /*
-         * Deallocate the entry itself:
-         */
-        free( entry );
-    }
-
-    /*
-     * Remove the menu from the menus list
-     */
-    fgListRemove( &fgStructure.Menus, &menu->Node );
-
-    /*
-     * If that menu was the current one...
-     */
-    if( fgStructure.Menu == menu )
-        fgStructure.Menu = NULL;
-
-    /*
-     * Have the menu structure freed
-     */
-    free( menu );
+  SFG_Window *window;
+  SFG_Menu *from;
+  SFG_MenuEntry *entry;
+
+  assert( menu != NULL );
+  freeglut_assert_ready;
+
+  /*
+   * First of all, have all references to this menu removed from all windows:
+   */
+  for( window = fgStructure.Windows.First; window; window = window->Node.Next )
+  {
+    fghRemoveMenuFromWindow( window, menu );
+  }
+
+  /*
+   * Now proceed with removing menu entries that lead to this menu
+   */
+  for( from = fgStructure.Menus.First; from; from = from->Node.Next )
+  {
+    fghRemoveMenuFromMenu( from, menu );
+  }
+
+  /*
+   * Now we are pretty sure the menu is not used anywhere
+   * and that we can remove all of its entries
+   */
+  while( (entry = menu->Entries.First) != NULL )
+  {
+    fgListRemove(&menu->Entries, &entry->Node);
+
+    /*
+     * There might be a string allocated, have it freed:
+     */
+    free( entry->Text );
+
+    /*
+     * Deallocate the entry itself:
+     */
+    free( entry );
+  }
+
+  /*
+   * Remove the menu from the menus list
+   */
+  fgListRemove( &fgStructure.Menus, &menu->Node );
+
+  /*
+   * If that menu was the current one...
+   */
+  if( fgStructure.Menu == menu )
+    fgStructure.Menu = NULL;
+
+  /*
+   * Have the menu structure freed
+   */
+  free( menu );
 }
 
 /*
@@ -331,14 +396,14 @@ void fgDestroyMenu( SFG_Menu* menu )
  */
 void fgCreateStructure( void )
 {
-    /*
-     * We will be needing two lists: the first containing windows,
-     * and the second containing the user-defined menus.
-     * Also, no current window/menu is set, as none has been created yet.
-     */
-
-   fgListInit(&fgStructure.Windows);
-   fgListInit(&fgStructure.Menus);
+  /*
+   * We will be needing two lists: the first containing windows,
+   * and the second containing the user-defined menus.
+   * Also, no current window/menu is set, as none has been created yet.
+   */
+
+  fgListInit(&fgStructure.Windows);
+  fgListInit(&fgStructure.Menus);
 }
 
 /*
@@ -347,22 +412,22 @@ void fgCreateStructure( void )
  */
 void fgDestroyStructure( void )
 {
-    SFG_Window *window;
-    SFG_Menu *menu;
-
-    /*
-     * Just make sure we are not called in vain...
-     */
-    freeglut_assert_ready;
-
-    /*
-     * Make sure all windows and menus have been deallocated
-     */
-    while( (window = fgStructure.Windows.First) != NULL )
-        fgDestroyWindow( window, TRUE );
-
-    while( (menu = fgStructure.Menus.First) != NULL )
-        fgDestroyMenu( menu );
+  SFG_Window *window;
+  SFG_Menu *menu;
+
+  /*
+   * Just make sure we are not called in vain...
+   */
+  freeglut_assert_ready;
+
+  /*
+   * Make sure all windows and menus have been deallocated
+   */
+  while( (window = fgStructure.Windows.First) != NULL )
+    fgDestroyWindow( window, TRUE );
+
+  while( (menu = fgStructure.Menus.First) != NULL )
+    fgDestroyMenu( menu );
 }
 
 /*
@@ -370,28 +435,28 @@ void fgDestroyStructure( void )
  */
 void fgEnumWindows( FGCBenumerator enumCallback, SFG_Enumerator* enumerator )
 {
-    SFG_Window *window;
+  SFG_Window *window;
 
-    assert( (enumCallback != NULL) && (enumerator != NULL) );
-    freeglut_assert_ready;
+  assert( (enumCallback != NULL) && (enumerator != NULL) );
+  freeglut_assert_ready;
 
+  /*
+   * Check every of the top-level windows
+   */
+  for( window = fgStructure.Windows.First; window;
+       window = window->Node.Next )
+  {
     /*
-     * Check every of the top-level windows
+     * Execute the callback...
      */
-    for( window = fgStructure.Windows.First; window;
-         window = window->Node.Next )
-    {
-        /*
-         * Execute the callback...
-         */
-        enumCallback( window, enumerator );
+    enumCallback( window, enumerator );
 
-        /*
-         * If it has been marked as 'found', stop searching
-         */
-        if( enumerator->found == TRUE )
-            return;
-    }
+    /*
+     * If it has been marked as 'found', stop searching
+     */
+    if( enumerator->found == TRUE )
+      return;
+  }
 }
 
 /*
@@ -399,31 +464,31 @@ void fgEnumWindows( FGCBenumerator enumCallback, SFG_Enumerator* enumerator )
  */
 void fgEnumSubWindows( SFG_Window* window, FGCBenumerator enumCallback, SFG_Enumerator* enumerator )
 {
-    SFG_Window *child;
+  SFG_Window *child;
 
-    assert( (enumCallback != NULL) && (enumerator != NULL) );
-    freeglut_assert_ready;
+  assert( (enumCallback != NULL) && (enumerator != NULL) );
+  freeglut_assert_ready;
 
+  /*
+   * Check every of the window's children:
+   */
+  for( child = window->Children.First; child; child = child->Node.Next )
+  {
     /*
-     * Check every of the window's children:
+     * Execute the callback...
      */
-    for( child = window->Children.First; child; child = child->Node.Next )
-    {
-        /*
-         * Execute the callback...
-         */
-        enumCallback( child, enumerator );
+    enumCallback( child, enumerator );
 
-        /*
-         * If it has been marked as 'found', stop searching
-         */
-        if( enumerator->found == TRUE )
-            return;
-    }
+    /*
+     * If it has been marked as 'found', stop searching
+     */
+    if( enumerator->found == TRUE )
+      return;
+  }
 }
 
 /*
- * A static helper function to look for a window given it's handle
+ * A static helper function to look for a window given its handle
  */
 static void fghcbWindowByHandle( SFG_Window *window, SFG_Enumerator *enumerator )
 {
@@ -495,7 +560,7 @@ SFG_Window* fgWindowByHandle
 }
 
 /*
- * A static helper function to look for a window given it's ID
+ * A static helper function to look for a window given its ID
  */
 static void fghcbWindowByID( SFG_Window *window, SFG_Enumerator *enumerator )
 {
@@ -554,7 +619,7 @@ SFG_Window* fgWindowByID( int windowID )
 }
 
 /*
- * Looks up a menu given it's ID. This is easier that fgWindowByXXX
+ * Looks up a menu given its ID. This is easier that fgWindowByXXX
  * as all menus are placed in a single doubly linked list...
  */
 SFG_Menu* fgMenuByID( int menuID )
index 943b027..28e19f1 100644 (file)
@@ -258,8 +258,13 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly )
     pfd.cAccumGreenBits                = 0;
     pfd.cAccumBlueBits         = 0;
     pfd.cAccumAlphaBits                = 0;
+#if 0
     pfd.cDepthBits                     = 32;
     pfd.cStencilBits           = 0;
+#else
+    pfd.cDepthBits                     = 24;
+    pfd.cStencilBits           = 8;
+#endif
     pfd.cAuxBuffers                    = 0;
     pfd.iLayerType                     = PFD_MAIN_PLANE;
     pfd.bReserved                      = 0;
@@ -300,7 +305,7 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly )
  * Opens a window. Requires a SFG_Window object created and attached
  * to the freeglut structure. OpenGL context is created here.
  */
-void fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, int h, GLboolean gameMode )
+void fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, int h, GLboolean gameMode, int isSubWindow )
 {
 #if TARGET_HOST_UNIX_X11
     XSetWindowAttributes winAttr;
@@ -471,7 +476,6 @@ void fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, i
        WNDCLASS wc;
        int flags;
        ATOM atom;
-       HWND hWnd;
 
     freeglut_assert_ready;
 
@@ -483,15 +487,20 @@ void fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, i
 
     if( gameMode == FALSE )
     {
+      if ( !isSubWindow )
+      {
         /*
          * Update the window position and dimensions, taking account of window decorations
          */
-               x -= (GetSystemMetrics( SM_CXSIZEFRAME ) - 1); 
-               y -= (GetSystemMetrics( SM_CYSIZEFRAME ) - 1);
-               w += (GetSystemMetrics( SM_CXSIZEFRAME ) - 1)*2;
-               h += (GetSystemMetrics( SM_CYSIZEFRAME ) - 1)*2 + GetSystemMetrics( SM_CYCAPTION );
 
-        /*
+                   x -= (GetSystemMetrics( SM_CXSIZEFRAME ) ); 
+               y -= (GetSystemMetrics( SM_CYSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION ) );
+        if ( y < 0 ) y = 0 ;
+               w += (GetSystemMetrics( SM_CXSIZEFRAME ) )*2;
+               h += (GetSystemMetrics( SM_CYSIZEFRAME ) )*2 + GetSystemMetrics( SM_CYCAPTION );
+      }
+
+      /*
             * Check if the user wants us to use the default position/size
             */
            if( fgState.Position.Use == FALSE ) { x = CW_USEDEFAULT; y = CW_USEDEFAULT; }
@@ -600,7 +609,7 @@ void fgCloseWindow( SFG_Window* window )
 int FGAPIENTRY glutCreateWindow( const char* title )
 {
     /*
-     * Create a new window and return it's unique ID number
+     * Create a new window and return its unique ID number
      */
     return( fgCreateWindow( NULL, title, fgState.Position.X, fgState.Position.Y,
                             fgState.Size.X, fgState.Size.Y, FALSE )->ID );
@@ -638,7 +647,7 @@ int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
 }
 
 /*
- * Destroys a window and all of it's subwindows
+ * Destroys a window and all of its subwindows
  */
 void FGAPIENTRY glutDestroyWindow( int windowID )
 {
@@ -652,7 +661,7 @@ void FGAPIENTRY glutDestroyWindow( int windowID )
      * There is a function that performs all needed steps
      * defined in freeglut_structure.c. Let's use it:
      */
-    fgDestroyWindow( window, TRUE );
+    fgAddToWindowDestroyList( window, TRUE );
 }
 
 /*
@@ -955,19 +964,37 @@ void FGAPIENTRY glutReshapeWindow( int width, int height )
 #elif TARGET_HOST_WIN32
        {
                RECT winRect;
+    int x, y ;
 
                /*
                 * First off, grab the current window's position
                 */
                GetWindowRect( fgStructure.Window->Window.Handle, &winRect );
+    x = winRect.left ;
+    y = winRect.top ;
+
+    if ( fgStructure.Window->Parent == NULL )  /* If this is not a subwindow ... */
+    {
+      /*
+       * Adjust the size of the window to allow for the size of the frame
+       */
+               width += (GetSystemMetrics( SM_CXSIZEFRAME ) - 1)*2;
+               height += (GetSystemMetrics( SM_CYSIZEFRAME ) - 1)*2 + GetSystemMetrics( SM_CYCAPTION );
+    }
+    else  /* This is a subwindow, get the parent window's position and subtract it off */
+    {
+      GetWindowRect ( fgStructure.Window->Parent->Window.Handle, &winRect ) ;
+      x -= winRect.left + GetSystemMetrics( SM_CXSIZEFRAME ) ;
+      y -= winRect.top + GetSystemMetrics( SM_CXSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION ) ;
+    }
 
                /*
                 * Resize the window, forcing a redraw to happen
                 */
                MoveWindow(
                        fgStructure.Window->Window.Handle,
-                       winRect.left,
-                       winRect.top,
+                       x,
+                       y,
                        width,
                        height,
                        TRUE
@@ -999,7 +1026,17 @@ void FGAPIENTRY glutPositionWindow( int x, int y )
                 */
                GetWindowRect( fgStructure.Window->Window.Handle, &winRect );
 
-               /*
+    if ( fgStructure.Window->Parent == NULL )  /* If this is not a subwindow ... */
+    {
+      /*
+       * Adjust the position of the window to allow for the size of the frame
+       */
+               x -= (GetSystemMetrics( SM_CXSIZEFRAME ) - 1); 
+               y -= (GetSystemMetrics( SM_CYSIZEFRAME ) - 1 + GetSystemMetrics( SM_CYCAPTION ));
+      if ( y < 0 ) y = 0 ;
+    }
+
+    /*
                 * Reposition the window, forcing a redraw to happen
                 */
                MoveWindow(