fshake3d  0.0.1
FreeformDensity3DSurfaceEditor
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
ui_fonts.hpp
Go to the documentation of this file.
00001 #ifndef UI_FONTS_HPP
00002 #define UI_FONTS_HPP
00003 
00004 #if defined(WIN32) 
00005 #include <windows.h>
00006 #endif
00007 #include "FTGLPixmapFont.h"
00008 
00009 class Font
00010 {
00011 public:
00012   Font();
00013   void draw(const char* text);
00014   double computeWidth(const char* text);
00015   double getAscender() const; 
00016   double getDescender() const;
00017 private:
00018   FTGLPixmapFont* mpFTGLPixmapFont;
00019 };
00020 
00021 #if 0
00022 struct FontInfo
00023 {
00024   FontInfo(const char* family) : mFamily(family), mPath(0), mSize(12) { }
00025   const char* mFamily;
00026   const char* mPath;
00027   int         mSize;
00028 };
00029 
00030 class FontCache
00031 {
00032 public:
00033   Font* getFont(const FontInfo& info);
00034 private:
00035   std::map<FontInfo, Font*> mFontMap;
00036 };
00037 #endif
00038 
00039 #endif // UI_FONTS_HPP
00040