1 /*
2  * Copyright 2009 Paul Wise
3  *
4  * "Chromium B.S.U." is free software; you can redistribute
5  * it and/or use it and/or modify it under the terms of the
6  * "Clarified Artistic License"
7  */
8 #ifndef TextFTGL_h
9 #define TextFTGL_h
10 
11 #ifdef HAVE_CONFIG_H
12 #include <chromium-bsu-config.h>
13 #endif
14 
15 #ifdef TEXT_FTGL
16 
17 #include <FTGL/ftgl.h>
18 
19 #include "Text.h"
20 
21 /**
22  * Use FTGL for rendering text in OpenGL
23  */
24 //====================================================================
25 class TextFTGL : public Text
26 {
27 public:
28 
29 	TextFTGL();
30 	virtual ~TextFTGL();
31 
32 	virtual void Render(const char*, const int = -1);
33 	virtual float Advance(const char*, const int = -1);
34 
35 	virtual float LineHeight(const char*, const int = -1);
36 
37 private:
38 	FTFont *ftFont;
39 	const char* fontFile;
40 
41 	const char* findFont();
42 
43 };
44 
45 #endif // TEXT_FTGL
46 
47 #endif // TextFTGL_h
48