00001 #ifndef GLT_FONT_H
00002 #define GLT_FONT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00039 #include <glt/config.h>
00040 #include <glt/gl.h>
00041
00042 #include <misc/string.h>
00043
00044 class GltFont;
00045
00051 class GltFont
00052 {
00053 public:
00054
00055
00056
00057
00058
00060 GltFont();
00062 virtual ~GltFont();
00063
00064 private:
00066 GltFont(const GltFont &);
00068 GltFont &operator=(const GltFont &);
00069
00070 public:
00071
00073 virtual void init(void *) = 0;
00075 virtual void clear() = 0;
00076
00078 virtual bool print(const wchar_t ch) const = 0;
00080 virtual bool print(const std::wstring &str) const = 0;
00081
00083 virtual void size(int &width,int &height,const std::wstring &str) const;
00085 virtual int width(const wchar_t ch) const;
00086
00088 const int hStep() const;
00090 const int vStep() const;
00091
00092 protected:
00093
00094 int _hStep;
00095 int _vStep;
00096 bool _init;
00097 };
00098
00099 #endif