Heh.
[freeglut] / src / freeglut_glutfont_definitions.c
1 /*
2  * freeglut_glutfont_definitions.c
3  *
4  * Bitmap and stroke fonts displaying.
5  *
6  * Copyright (c) 2003 Stephen J. Baker (whether he wants it or not). All Rights Reserved.
7  * Written by John F. Fay <fayjf@sourceforge.net>, who releases the copyright over to the
8  * "freeglut" project lead.
9  * Creation date: Mon July 21 2003
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
24  * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
25  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27  */
28
29 /*
30  * This file is necessary for the *nix version of "freeglut" because the original GLUT
31  * defined its font variables in rather an unusual way.  Publicly, in "glut.h", they were
32  * defined as "void *".  Privately, in one of the source code files, they were defined as
33  * pointers to a structure.  Most compilers and linkers are satisfied with the "void *"
34  * and don't go any farther, but some of them balked.  In particular, when compiling with
35  * "freeglut" and then trying to run using the GLUT ".so" library, some of them would give
36  * an error.  So we are having to create this file to define the variables as pointers
37  * to an unusual structure to match GLUT.
38  */
39
40 #include "freeglut_internal.h"
41
42 #if TARGET_HOST_UNIX_X11
43
44 #define  G_LOG_DOMAIN  "freeglut-glutfont-definitions"
45
46 struct freeglutStrokeFont
47
48   const char *name ; 
49   int num_chars ; 
50   void *ch ; 
51   float top ; 
52   float bottom ; 
53 } ; 
54
55 struct freeglutBitmapFont
56
57   const char *name ; 
58   const int num_chars ; 
59   const int first ; 
60   const void *ch ; 
61 } ; 
62
63
64 struct freeglutStrokeFont glutStrokeRoman ;
65 struct freeglutStrokeFont glutStrokeMonoRoman ;
66
67 struct freeglutBitmapFont glutBitmap9By15 ;
68 struct freeglutBitmapFont glutBitmap8By13 ;
69 struct freeglutBitmapFont glutBitmapTimesRoman10 ;
70 struct freeglutBitmapFont glutBitmapTimesRoman24 ;
71 struct freeglutBitmapFont glutBitmapHelvetica10 ;
72 struct freeglutBitmapFont glutBitmapHelvetica12 ;
73 struct freeglutBitmapFont glutBitmapHelvetica18 ;
74
75 #endif
76