Several updates from John and myself.
[freeglut] / src / freeglut_font.c
index 46e2219..596a491 100644 (file)
@@ -55,21 +55,6 @@ extern SFG_Font fgFontTimesRoman24;
 extern SFG_StrokeFont fgStrokeRoman;
 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;
-#endif
-
 
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
 
@@ -136,7 +121,7 @@ void FGAPIENTRY glutBitmapCharacter( void* fontID, int character )
   /*
    * Make sure the character we want to output is valid
    */
-  freeglut_return_if_fail( character >= 0 && character < 256 );
+  freeglut_return_if_fail( character >= 1 && character < 256 );
 
   /*
    * Then find the character we want to draw
@@ -174,7 +159,7 @@ void FGAPIENTRY glutBitmapCharacter( void* fontID, int character )
   glPopClientAttrib();
 }
 
-void FGAPIENTRY glutBitmapString( void* fontID, const char *string )
+void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string )
 {
   int c;
   int numchar = strlen ( string ) ;
@@ -260,7 +245,7 @@ int FGAPIENTRY glutBitmapWidth( void* fontID, int character )
 /*
  * Return the width of a string drawn using a bitmap font
  */
-int FGAPIENTRY glutBitmapLength( void* fontID, const char* string )
+int FGAPIENTRY glutBitmapLength( void* fontID, const unsigned char* string )
 {
   int c, length = 0, this_line_length = 0;
 
@@ -345,7 +330,7 @@ void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
   glTranslatef(schar->Right, 0.0, 0.0);
 }
 
-void FGAPIENTRY glutStrokeString( void* fontID, const char *string )
+void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string )
 {
   int c, i, j;
   int numchar = strlen ( string ) ;
@@ -363,7 +348,7 @@ void FGAPIENTRY glutStrokeString( void* fontID, const char *string )
    */
   for( c = 0; c < numchar; c++ )
   {
-    if ( ( string[ c ] >= 0 ) && ( string[ c ] < font->Quantity ) )
+    if ( string[ c ] < font->Quantity )
     {
       if ( string[c] == '\n' )
       {
@@ -420,7 +405,7 @@ int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
 /*
  * Return the width of a string drawn using a stroke font
  */
-int FGAPIENTRY glutStrokeLength( void* fontID, const char* string )
+int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string )
 {
   int c;
   float length = 0.0;
@@ -437,7 +422,7 @@ int FGAPIENTRY glutStrokeLength( void* fontID, const char* string )
   int numchar = strlen ( string ) ;
   for( c = 0; c < numchar; c++ )
   {
-    if ( ( string[ c ] >= 0 ) && ( string[ c ] < font->Quantity ) )
+    if ( string[ c ] < font->Quantity )
     {
       if ( string[ c ] == '\n' )  /* Carriage return, reset the length of this line */
       {