From: Christopher John Purnell Date: Fri, 11 Jul 2003 17:50:22 +0000 (+0000) Subject: Fix for the font binary compatibility problem. X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=14d79028cc56ade3c5988b66178bc8fbb77e5d6f;p=freeglut Fix for the font binary compatibility problem. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@132 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/include/GL/glut.h b/include/GL/glut.h index de16dcf..06ceae8 100644 --- a/include/GL/glut.h +++ b/include/GL/glut.h @@ -164,15 +164,15 @@ /* * I don't really know if it's a good idea... But here it goes: */ - extern void* glutStrokeRoman; - extern void* glutStrokeMonoRoman; - extern void* glutBitmap9By15; - extern void* glutBitmap8By13; - extern void* glutBitmapTimesRoman10; - extern void* glutBitmapTimesRoman24; - extern void* glutBitmapHelvetica10; - extern void* glutBitmapHelvetica12; - extern void* glutBitmapHelvetica18; + extern struct _GLUTstrokeFont glutStrokeRoman; + extern struct _GLUTstrokeFont glutStrokeMonoRoman; + extern struct _GLUTbitmapFont glutBitmap9By15; + extern struct _GLUTbitmapFont glutBitmap8By13; + extern struct _GLUTbitmapFont glutBitmapTimesRoman10; + extern struct _GLUTbitmapFont glutBitmapTimesRoman24; + extern struct _GLUTbitmapFont glutBitmapHelvetica10; + extern struct _GLUTbitmapFont glutBitmapHelvetica12; + extern struct _GLUTbitmapFont glutBitmapHelvetica18; /* * Those pointers will be used by following definitions: diff --git a/src/freeglut_font.c b/src/freeglut_font.c index 46e2219..3fe559a 100644 --- a/src/freeglut_font.c +++ b/src/freeglut_font.c @@ -59,15 +59,30 @@ 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; + 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