1 /***************************************************************************
2                         guifont.h -- Interface file for guifont
3                              -------------------
4     created              : Fri Aug 13 22:20:04 CEST 1999
5     copyright            : (C) 1999 by Eric Espie
6     email                : torcs@free.fr
7     version              : $Id: guifont.h,v 1.2 2003/06/24 21:02:25 torcs Exp $
8  ***************************************************************************/
9 
10 /***************************************************************************
11  *                                                                         *
12  *   This program is free software; you can redistribute it and/or modify  *
13  *   it under the terms of the GNU General Public License as published by  *
14  *   the Free Software Foundation; either version 2 of the License, or     *
15  *   (at your option) any later version.                                   *
16  *                                                                         *
17  ***************************************************************************/
18 
19 #ifndef _GUIFONT_H_
20 #define _GUIFONT_H_
21 
22 //glFont character structure (DO NOT MODIFY)
23 typedef struct
24 {
25     float dx, dy;
26     float tx1, ty1;
27     float tx2, ty2;
28 } GLFONTCHAR;
29 
30 //glFont structure (DO NOT MODIFY)
31 typedef struct
32 {
33     uint Tex;
34     int TexWidth, TexHeight;
35     int IntStart, IntEnd;
36     GLFONTCHAR *Char;
37 } GLFONT;
38 
39 class GfuiFontClass
40 {
41 protected:
42     GLFONT	*font;
43     float	size;
44 
45 public:
46   GfuiFontClass(char *font);
47 
48   ~GfuiFontClass();
49 
50   void create(int point_size);
51 
52   void output(int x, int y, const char* text);
53 
54   int getWidth(const char* text);
55   int getHeight() const;
56   int getDescender() const;
57 };
58 
59 extern GfuiFontClass	*gfuiFont[];
60 
61 #endif /* _GUIFONT_H_ */
62 
63 
64 
65