#pragma once #include "globalincs/pstypes.h" #include namespace font { /** * @struct TrueTypeFontData * * @brief True type font data to save data for already read fonts. * * Used to store the data of a true type font which can be used by multiple FTFont objects which are all using the same data. * * @author m!m * @date 24.11.2011 */ struct TrueTypeFontData { size_t size; // data; // loadNVGFont(const SCP_string& fileName, float fontSize = 12.0f); /** * @brief Loads an old VFNT font * * Loads the VFNT font with the specified @c fileName and returns it in form of a VFNTFont pointer * * @param fileName The name of the font file * @return The font pointer or @c null on error, paired with the font's index */ static std::pair loadVFNTFont(const SCP_string& fileName); /** * @brief Loads old volition font data */ static font *loadFontOld(const SCP_string& name); /** * @brief Initializes the font system */ static void init(); /** * @brief Disposes the fonts saved in the class * * Cleans up the memory used by the font system and sets the current font to @c NULL */ static void close(); private: FontManager() { }; FontManager(const FontManager &) { }; ~FontManager() { } static SCP_map allocatedData; static SCP_map> vfntFontData; static SCP_vector> fonts; static int currentFontIndex; }; }