X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fvideo%2Ffont.cpp;h=f3ce6353d64cd369e19f4def1880ccda9c7c6907;hb=8fc619c1560d238cbf22fb666847642a130516c6;hp=00b7ec1e149e6dfde51a701291e55fda4b182d39;hpb=24cbc2eb14f4fc0e45e221e67900656940effd31;p=supertux.git diff --git a/src/video/font.cpp b/src/video/font.cpp index 00b7ec1e1..f3ce6353d 100644 --- a/src/video/font.cpp +++ b/src/video/font.cpp @@ -62,6 +62,7 @@ Font::Font(GlyphWidth glyph_width_, shadow_surfaces(), char_height(), shadowsize(shadowsize_), + border(0), glyphs(65536) { for(unsigned int i=0; i<65536;i++) glyphs[i].surface_idx = -1; @@ -106,6 +107,8 @@ Font::loadFontFile(const std::string &filename) throw std::runtime_error(msg.str()); } + config_l->get("glyph-border", border); + lisp::ListIterator iter(config_l); while(iter.next()) { const std::string& token = iter.item(); @@ -190,8 +193,8 @@ Font::loadFontSurface( for( unsigned int i = 0; i < chars.size(); i++) { for(UTF8Iterator chr(chars[i]); !chr.done(); ++chr) { - int y = row * char_height; - int x = col * char_width; + int y = row * (char_height + 2*border) + border; + int x = col * (char_width + 2*border) + border; if( ++col == wrap ) { col=0; row++; } if( *chr == 0x0020 && glyphs[0x20].surface_idx != -1) continue;