Commit 3d3a4852d7b7db29085fab0ecb63e49859cf27f8

henry 2004-10-08T11:37:28

Changed a couple of variable names.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
diff --git a/include/FTFace.h b/include/FTFace.h
index 0a985e0..356abd5 100755
--- a/include/FTFace.h
+++ b/include/FTFace.h
@@ -21,9 +21,9 @@ class FTGL_EXPORT FTFace
         /**
          * Opens and reads a face file. Error is set.
          *
-         * @param filename  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTFace( const char* filename);
+        FTFace( const char* fontFilePath);
 
         /**
          * Read face data from an in-memory buffer. Error is set.
@@ -43,11 +43,11 @@ class FTGL_EXPORT FTFace
         /**
          * Attach auxilliary file to font (e.g., font metrics).
          *
-         * @param filename  auxilliary font file name.
+         * @param fontFilePath  auxilliary font file path.
          * @return          <code>true</code> if file has opened
          *                  successfully.
          */
-        bool Attach( const char* filename);
+        bool Attach( const char* fontFilePath);
 
         /**
          * Attach auxilliary data to font (e.g., font metrics) from memory
diff --git a/include/FTFont.h b/include/FTFont.h
index 372a1e7..946bf80 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -35,9 +35,9 @@ class FTGL_EXPORT FTFont
         /**
          * Open and read a font file. Sets Error flag.
          *
-         * @param fontname  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTFont( const char* fontname);
+        FTFont( const char* fontFilePath);
         
         /**
          * Open and read a font from a buffer in memory. Sets Error flag.
@@ -59,11 +59,11 @@ class FTGL_EXPORT FTFont
          *
          * Note: not all font formats implement this function.
          *
-         * @param filename  auxilliary font file name.
+         * @param fontFilePath  auxilliary font file path.
          * @return          <code>true</code> if file has been attached
          *                  successfully.
          */
-        bool Attach( const char* filename);
+        bool Attach( const char* fontFilePath);
 
         /**
          * Attach auxilliary data to font e.g font metrics, from memory
diff --git a/include/FTGLBitmapFont.h b/include/FTGLBitmapFont.h
index 12feae0..3e6aa32 100755
--- a/include/FTGLBitmapFont.h
+++ b/include/FTGLBitmapFont.h
@@ -19,9 +19,9 @@ class FTGL_EXPORT FTGLBitmapFont : public FTFont
         /**
          * Open and read a font file. Sets Error flag.
          *
-         * @param fontname  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTGLBitmapFont( const char* fontname);
+        FTGLBitmapFont( const char* fontFilePath);
 
         /**
          * Open and read a font from a buffer in memory. Sets Error flag.
diff --git a/include/FTGLExtrdFont.h b/include/FTGLExtrdFont.h
index f175e79..d234461 100644
--- a/include/FTGLExtrdFont.h
+++ b/include/FTGLExtrdFont.h
@@ -19,9 +19,9 @@ class FTGL_EXPORT FTGLExtrdFont : public FTFont
         /**
          * Open and read a font file. Sets Error flag.
          *
-         * @param fontname  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTGLExtrdFont( const char* fontname);
+        FTGLExtrdFont( const char* fontFilePath);
 
         /**
          * Open and read a font from a buffer in memory. Sets Error flag.
diff --git a/include/FTGLOutlineFont.h b/include/FTGLOutlineFont.h
index a7f4b23..fce7cf5 100755
--- a/include/FTGLOutlineFont.h
+++ b/include/FTGLOutlineFont.h
@@ -20,9 +20,9 @@ class FTGL_EXPORT FTGLOutlineFont : public FTFont
         /**
          * Open and read a font file. Sets Error flag.
          *
-         * @param fontname  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTGLOutlineFont( const char* fontname);
+        FTGLOutlineFont( const char* fontFilePath);
         
         /**
          * Open and read a font from a buffer in memory. Sets Error flag.
diff --git a/include/FTGLPixmapFont.h b/include/FTGLPixmapFont.h
index f781ddf..053427b 100755
--- a/include/FTGLPixmapFont.h
+++ b/include/FTGLPixmapFont.h
@@ -21,9 +21,9 @@ class FTGL_EXPORT FTGLPixmapFont : public FTFont
         /**
          * Open and read a font file. Sets Error flag.
          *
-         * @param fontname  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTGLPixmapFont( const char* fontname);
+        FTGLPixmapFont( const char* fontFilePath);
         
         /**
          * Open and read a font from a buffer in memory. Sets Error flag.
diff --git a/include/FTGLPolygonFont.h b/include/FTGLPolygonFont.h
index 54e624a..3a07de1 100755
--- a/include/FTGLPolygonFont.h
+++ b/include/FTGLPolygonFont.h
@@ -20,9 +20,9 @@ class FTGL_EXPORT FTGLPolygonFont : public FTFont
         /**
          * Open and read a font file. Sets Error flag.
          *
-         * @param fontname  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTGLPolygonFont( const char* fontname);
+        FTGLPolygonFont( const char* fontFilePath);
         
         /**
          * Open and read a font from a buffer in memory. Sets Error flag.
diff --git a/include/FTGLTextureFont.h b/include/FTGLTextureFont.h
index 2065e1e..7e97d6c 100755
--- a/include/FTGLTextureFont.h
+++ b/include/FTGLTextureFont.h
@@ -20,9 +20,9 @@ class  FTGL_EXPORT FTGLTextureFont : public FTFont
         /**
          * Open and read a font file. Sets Error flag.
          *
-         * @param fontname  font file name.
+         * @param fontFilePath  font file path.
          */
-        FTGLTextureFont( const char* fontname);
+        FTGLTextureFont( const char* fontFilePath);
         
         /**
          * Open and read a font from a buffer in memory. Sets Error flag.
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index 2eb3b26..2f081c0 100755
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -3,7 +3,7 @@
 
 #include FT_TRUETYPE_TABLES_H
 
-FTFace::FTFace( const char* filename)
+FTFace::FTFace( const char* fontFilePath)
 :   numGlyphs(0),
     fontEncodingList(0),
     err(0)
@@ -11,7 +11,7 @@ FTFace::FTFace( const char* filename)
     const FT_Long DEFAULT_FACE_INDEX = 0;
     ftFace = new FT_Face;
 
-    err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), filename, DEFAULT_FACE_INDEX, ftFace);
+    err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), fontFilePath, DEFAULT_FACE_INDEX, ftFace);
 
     if( err)
     {
@@ -58,9 +58,9 @@ FTFace::~FTFace()
 }
 
 
-bool FTFace::Attach( const char* filename)
+bool FTFace::Attach( const char* fontFilePath)
 {
-    err = FT_Attach_File( *ftFace, filename);
+    err = FT_Attach_File( *ftFace, fontFilePath);
     return !err;
 }
 
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 78c724d..d65d75d 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -4,8 +4,8 @@
 #include    "FTBBox.h"
 
 
-FTFont::FTFont( const char* fontname)
-:   face( fontname),
+FTFont::FTFont( const char* fontFilePath)
+:   face( fontFilePath),
     useDisplayLists(true),
     glyphList(0)
 {
@@ -35,9 +35,9 @@ FTFont::~FTFont()
 }
 
 
-bool FTFont::Attach( const char* filename)
+bool FTFont::Attach( const char* fontFilePath)
 {
-    if( face.Attach( filename))
+    if( face.Attach( fontFilePath))
     {
         err = 0;
         return true;
diff --git a/src/FTGLBitmapFont.cpp b/src/FTGLBitmapFont.cpp
index 7e982a6..5844427 100755
--- a/src/FTGLBitmapFont.cpp
+++ b/src/FTGLBitmapFont.cpp
@@ -2,8 +2,8 @@
 #include "FTBitmapGlyph.h"
 
 
-FTGLBitmapFont::FTGLBitmapFont( const char* fontname)
-:   FTFont( fontname)
+FTGLBitmapFont::FTGLBitmapFont( const char* fontFilePath)
+:   FTFont( fontFilePath)
 {}
 
 
diff --git a/src/FTGLExtrdFont.cpp b/src/FTGLExtrdFont.cpp
index 347eea5..7bd0ff7 100644
--- a/src/FTGLExtrdFont.cpp
+++ b/src/FTGLExtrdFont.cpp
@@ -2,8 +2,8 @@
 #include    "FTExtrdGlyph.h"
 
 
-FTGLExtrdFont::FTGLExtrdFont( const char* fontname)
-:   FTFont( fontname),
+FTGLExtrdFont::FTGLExtrdFont( const char* fontFilePath)
+:   FTFont( fontFilePath),
     depth( 0.0f)
 {}
 
diff --git a/src/FTGLOutlineFont.cpp b/src/FTGLOutlineFont.cpp
index cca63bd..182eca0 100755
--- a/src/FTGLOutlineFont.cpp
+++ b/src/FTGLOutlineFont.cpp
@@ -2,8 +2,8 @@
 #include    "FTOutlineGlyph.h"
 
 
-FTGLOutlineFont::FTGLOutlineFont( const char* fontname)
-:   FTFont( fontname)
+FTGLOutlineFont::FTGLOutlineFont( const char* fontFilePath)
+:   FTFont( fontFilePath)
 {}
 
 
diff --git a/src/FTGLPixmapFont.cpp b/src/FTGLPixmapFont.cpp
index b287951..e4d041b 100755
--- a/src/FTGLPixmapFont.cpp
+++ b/src/FTGLPixmapFont.cpp
@@ -2,8 +2,8 @@
 #include    "FTPixmapGlyph.h"
 
 
-FTGLPixmapFont::FTGLPixmapFont( const char* fontname)
-:   FTFont( fontname)
+FTGLPixmapFont::FTGLPixmapFont( const char* fontFilePath)
+:   FTFont( fontFilePath)
 {}
 
 
diff --git a/src/FTGLPolygonFont.cpp b/src/FTGLPolygonFont.cpp
index 47a1de1..47a8af4 100755
--- a/src/FTGLPolygonFont.cpp
+++ b/src/FTGLPolygonFont.cpp
@@ -2,8 +2,8 @@
 #include    "FTPolyGlyph.h"
 
 
-FTGLPolygonFont::FTGLPolygonFont( const char* fontname)
-:   FTFont( fontname)
+FTGLPolygonFont::FTGLPolygonFont( const char* fontFilePath)
+:   FTFont( fontFilePath)
 {}
 
 
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index 0b9e98e..16dd58f 100755
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -18,8 +18,8 @@ inline GLuint NextPowerOf2( GLuint in)
 }
 
 
-FTGLTextureFont::FTGLTextureFont( const char* fontname)
-:   FTFont( fontname),
+FTGLTextureFont::FTGLTextureFont( const char* fontFilePath)
+:   FTFont( fontFilePath),
     maximumGLTextureSize(0),
     textureWidth(0),
     textureHeight(0),
diff --git a/test/FTFont-Test.cpp b/test/FTFont-Test.cpp
index 2c54918..d11852f 100755
--- a/test/FTFont-Test.cpp
+++ b/test/FTFont-Test.cpp
@@ -22,8 +22,8 @@ class TestGlyph : public FTGlyph
 class TestFont : public FTFont
 {
     public:
-        TestFont( const char* fontname)
-        :   FTFont( fontname)
+        TestFont( const char* fontFilePath)
+        :   FTFont( fontFilePath)
         {}
         
         TestFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
@@ -49,8 +49,8 @@ class TestFont : public FTFont
 class BadGlyphTestFont : public FTFont
 {
     public:
-        BadGlyphTestFont( const char* fontname)
-        :   FTFont( fontname)
+        BadGlyphTestFont( const char* fontFilePath)
+        :   FTFont( fontFilePath)
         {}
         
         FTGlyph* MakeGlyph( unsigned int g)
diff --git a/test/FTPoint-Test.cpp b/test/FTPoint-Test.cpp
index 50f46e4..65be71a 100755
--- a/test/FTPoint-Test.cpp
+++ b/test/FTPoint-Test.cpp
@@ -13,6 +13,7 @@ class FTPointTest : public CppUnit::TestCase
         CPPUNIT_TEST( testOperatorEqual);
         CPPUNIT_TEST( testOperatorNotEqual);
         CPPUNIT_TEST( testOperatorPlusEquals);
+        CPPUNIT_TEST( testOperatorStar);
     CPPUNIT_TEST_SUITE_END();
         
     public:
@@ -83,6 +84,14 @@ class FTPointTest : public CppUnit::TestCase
         }
         
         
+        void testOperatorStar()
+        {
+            FTPoint point1(  1.0f, 2.0f, 3.0f);
+        
+//            double* pointer = point1;
+        }
+        
+        
         void setUp() 
         {}
         
diff --git a/test/demo.cpp b/test/demo.cpp
index 0448431..6e9239a 100644
--- a/test/demo.cpp
+++ b/test/demo.cpp
@@ -251,9 +251,9 @@ my_idle()
 }
 
 int 
-file_exists( const char * filename )
+file_exists( const char * fontFilePath )
 {
-	FILE * fp = fopen( filename, "r" );
+	FILE * fp = fopen( fontFilePath, "r" );
 
 	if ( fp == NULL )
 	{
@@ -268,13 +268,13 @@ file_exists( const char * filename )
 void
 usage( const char * program )
 {
-	std::cerr << "Usage: " << program << " <filename.ttf>\n" << std::endl;
+	std::cerr << "Usage: " << program << " <fontFilePath.ttf>\n" << std::endl;
 }
 
 int
 main(int argc, char **argv)
 {
-	char * filename;
+	char * fontFilePath;
 
 	glutInitWindowSize(600, 600);
 	glutInit(&argc, argv);
@@ -290,22 +290,22 @@ main(int argc, char **argv)
 			std::cerr << "Couldn't open file '" << argv[ 1 ] << "'" << std::endl;
 			exit( -1 );
 		}
-		filename = argv[ 1 ];
+		fontFilePath = argv[ 1 ];
 	}
 	else 
 	{
 		// try a default font
-		filename = DEFAULT_FONT;
+		fontFilePath = DEFAULT_FONT;
 
-		if ( !file_exists( filename ))
+		if ( !file_exists( fontFilePath ))
 		{
 			usage( argv[ 0 ]);
-			std::cerr << "Couldn't open default file '" << filename << "'" << std::endl;
+			std::cerr << "Couldn't open default file '" << fontFilePath << "'" << std::endl;
 			exit( -1 );
 		}
 	}
 
-	my_init( filename );
+	my_init( fontFilePath );
 
 	glutDisplayFunc(my_display);
 	glutReshapeFunc(my_reshape);