X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_font.c;h=c1e1db68df077d9359d2884472ecd17c8806ddca;hb=dd6c1d0a828e629798bed459c2e020abe8c1dab9;hp=3fe559a75b08ea1a71ac356a7cfc2934377183ec;hpb=14d79028cc56ade3c5988b66178bc8fbb77e5d6f;p=freeglut diff --git a/src/freeglut_font.c b/src/freeglut_font.c index 3fe559a..c1e1db6 100644 --- a/src/freeglut_font.c +++ b/src/freeglut_font.c @@ -55,36 +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 - struct _GLUTstrokeFont { - const char *name; - int num_chars; - void *ch; - float top; - float bottom; - }; - - struct _GLUTbitmapFont { - const char *name; - const int num_chars; - const int first; - const void *ch; - }; - - struct _GLUTstrokeFont glutStrokeRoman; - struct _GLUTstrokeFont glutStrokeMonoRoman; - struct _GLUTbitmapFont glutBitmap9By15; - struct _GLUTbitmapFont glutBitmap8By13; - struct _GLUTbitmapFont glutBitmapTimesRoman10; - struct _GLUTbitmapFont glutBitmapTimesRoman24; - struct _GLUTbitmapFont glutBitmapHelvetica10; - struct _GLUTbitmapFont glutBitmapHelvetica12; - struct _GLUTbitmapFont glutBitmapHelvetica18; -#endif - /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ @@ -189,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 ) ; @@ -275,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; @@ -360,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 ) ; @@ -378,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' ) { @@ -435,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; @@ -452,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 */ {