1 #include "SDLWrap_Font.hpp"
5 int Font::FontCount
= 0;
7 Font::Font(const std::string TTFFilePath
, const int FontSize
)
11 if (!TTF_WasInit() && TTF_Init() == -1)
14 if ( (this->me
= TTF_OpenFont(TTFFilePath
.c_str(), FontSize
)) == NULL
)
17 this->FilePath
= TTFFilePath
;
22 std::string Error
= "Font::Font(char*) constructor threw a TTFError! ";
24 Error
+= "The TTF core was initialized.\n";
26 Error
+= "The TTF core was not initialized.\n";
28 ErrorHandler::OutputError(ErrorHandler::FATAL_CONSTRUCTOR_ERROR
, Error
);
33 TTF_CloseFont(this->me
);
43 // I dunno, do something useful <_<
44 // Maybe leave it to the ErrorHandler to report the error somehow?