bool GlFont::LoadEmbeddedFont() { char* str = new char[font_xml_data.size()]; strcpy( str, font_xml_data.c_str() ); const bool success = LoadFontFromText(str); delete[] str; return success; }
bool GlFont::LoadFontFromFile( const std::string& filename ) { try{ rapidxml::file<> xmlFile(filename.c_str()); return LoadFontFromText( xmlFile.data() ); }catch(std::exception) { return false; } }
bool GlFont::LoadEmbeddedFont() { // Include an extra byte for the terminating NULL char* str = new char[font_xml_data.size() + 1]; strcpy( str, font_xml_data.c_str() ); const bool success = LoadFontFromText(str); delete[] str; return success; }