00001 /* FontManager - Interface for loading and releasing fonts. */ 00002 00003 #ifndef FONTMANAGER_H 00004 #define FONTMANAGER_H 00005 00006 class Font; 00007 class Game; 00008 00009 class FontManager 00010 { 00011 public: 00012 FontManager(); 00013 ~FontManager(); 00014 00015 Font* LoadFont( const CString &sFontOrTextureFilePath, CString sChars = "" ); 00016 void UnloadFont( Font *fp ); 00017 00018 /* Warning: This reloads fonts completely, so all BitmapTexts need to be 00019 * reset, too. If this isn't done, best case they end up with old font 00020 * metrics; worst case, they get left with stale pointers to RageTextures 00021 * that'll get freed eventually and crash. This is only used for realtime 00022 * adjustment of fonts in ScreenTestFonts at the moment. */ 00023 void ReloadFonts(); 00024 }; 00025 00026 extern FontManager* FONT; // global and accessable from anywhere in our program 00027 00028 00029 #endif 00030 00031 /* 00032 * (c) 2001-2003 Chris Danford, Glenn Maynard 00033 * All rights reserved. 00034 * 00035 * Permission is hereby granted, free of charge, to any person obtaining a 00036 * copy of this software and associated documentation files (the 00037 * "Software"), to deal in the Software without restriction, including 00038 * without limitation the rights to use, copy, modify, merge, publish, 00039 * distribute, and/or sell copies of the Software, and to permit persons to 00040 * whom the Software is furnished to do so, provided that the above 00041 * copyright notice(s) and this permission notice appear in all copies of 00042 * the Software and that both the above copyright notice(s) and this 00043 * permission notice appear in supporting documentation. 00044 * 00045 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00046 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00047 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00048 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00049 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00050 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00051 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00052 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00053 * PERFORMANCE OF THIS SOFTWARE. 00054 */