glLineWidth(1);
- int size = int(font.get_default_size()+0.5);
+ int size = int(font.get_native_size()+0.5);
float spacing = round(size*1.1)/size;
float baseline = round((0.5-font.get_ascent()*0.5-font.get_descent()*0.5)*size)/size;
const Icon &icon = *i->second;
- Vector node = i->first->get_node();
- GL::Vector3 p = renderer.get_camera()->project(GL::Vector3(node.x, node.y, node.z));
+ GL::Vector3 p = renderer.get_camera()->project(i->first->get_node());
p.x = int(p.x*0.5*fb_width-icon.width*size/2);
p.y = int(p.y*0.5*fb_height);
{
DataFile::load(*grf, (FS::Path("icons")/(name+".mesh")).str());
}
- catch(const Exception &e)
+ catch(const exception &e)
{
IO::print("Error loading overlay graphic '%s': %s\n", name, e.what());
delete grf;
{
GL::MeshBuilder bld(icon.text);
bld.color(0.0f, 1.0f, 0.0f);
- font.draw_string(icon.label, bld);
+ font.build_string(icon.label, bld);
}
}