00001 /* 00002 Copyright (C) 1999-2003 Carsten Winkelholz, Malte Weiß 00003 00004 Malte Weiß, 08.04.2003: Font manager now uses the Win32GL (FreeTypeGL). 00005 09.04.2003: All metric functions have moved to CybFontManagerC. 00006 CybWin32GLFontManagerC only creates the Win32GL font object. 00007 00008 Address: FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V. 00009 Neuenahrer Str. 20 00010 D - 53343 Wachtberg 00011 00012 Email: winkelholz@fgan.de 00013 00014 This program is free software; you can redistribute it and/or 00015 modify it under the terms of the GNU General Public License 00016 as published by the Free Software Foundation; either version 2 00017 of the License, or (at your option) any later version. 00018 00019 This program is distributed in the hope that it will be useful, 00020 but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 GNU General Public License for more details. 00023 00024 You should have received a copy of the GNU General Public License 00025 along with this program; if not, write to the Free Software 00026 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00027 */ 00028 00029 #ifndef CybWin32GLFontManagerC_H 00030 #define CybWin32GLFontManagerC_H 00031 00032 #include "../oawconfig.h" 00033 #include "oaw/ctk/cybfontmanagerc.h" 00034 #include "oaw/misc/mapc.h" 00035 00036 00037 OAW_BEGIN_NAMESPACE 00038 00039 class Win32GL3DFont: public _3DFont{ 00040 public: 00041 Win32GL3DFont(const char*, const char*); 00042 ~Win32GL3DFont(); 00043 void Render(const char*,long); 00044 long glCreateFontPolygonList(const char* fontName); 00045 protected: 00046 ArrayC<GLint> m_lid; 00047 ArrayC<StringC> m_glFonts; 00048 ArrayC<long> m_glFontsBase; 00049 OAW::StringC m_font; 00050 OAW::StringC m_style; 00051 }; 00052 00053 00054 class OAW_DLLMAPPING CybWin32GLFontManagerC : public CybFontManagerC { 00055 00056 public: 00057 CybWin32GLFontManagerC(); 00058 virtual ~CybWin32GLFontManagerC(); 00059 00060 virtual _3DFont* RetrieveFont(const char* pFontName, const char* pStyle); 00061 00062 protected: 00063 struct FontType{ 00064 OAW::StringC fontName; 00065 OAW::StringC style; 00066 bool operator == (const FontType& t) const{ 00067 return ((fontName==t.fontName) && (style==t.style)); 00068 } 00069 }; 00070 MapC<FontType,Win32GL3DFont*> m_fontMap; 00071 }; 00072 00073 OAW_END_NAMESPACE 00074 00075 #endif
1.3-rc2