Example #1
0
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;
}
Example #2
0
bool GlFont::LoadFontFromFile( const std::string& filename )
{
    try{
        rapidxml::file<> xmlFile(filename.c_str());
        return LoadFontFromText( xmlFile.data() );
    }catch(std::exception) {
        return false;
    }
}
Example #3
0
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;
}