Console::init_graphics()
{
font.reset(new Font(Font::FIXED,
- "images/engine/fonts/white-small.png",
- "images/engine/fonts/shadow-small.png", 8, 9, 1));
+ "images/engine/fonts/console2.png",
+ "images/engine/fonts/console2-shadow.png", 8, 14, 1));
fontheight = font->get_height();
background.reset(new Surface("images/engine/console.png"));
background2.reset(new Surface("images/engine/console2.png"));
if (focused) {
lineNo++;
- float py = height-4-1*9;
+ float py = height-4-1 * font->get_height();
context.draw_text(font.get(), "> "+inputBuffer.str()+"_", Vector(4, py), ALIGN_LEFT, layer);
}
for (std::list<std::string>::iterator i = lines.begin(); i != lines.end(); i++) {
if (skipLines-- > 0) continue;
lineNo++;
- float py = height-4-lineNo*9;
- if (py < -9) break;
+ float py = height - 4 - lineNo*font->get_height();
+ if (py < -font->get_height()) break;
context.draw_text(font.get(), *i, Vector(4, py), ALIGN_LEFT, layer);
}
context.pop_transform();
else // glyph is completly transparent
glyph.rect = Rect(x, y, x + char_width, y + char_height);
- glyph.advance = glyph.rect.get_width();
+ glyph.advance = glyph.rect.get_width() + 1; // FIXME: might be usefull to make spacing configurable
glyphs.push_back(glyph);
shadow_glyphs.push_back(glyph);