From: Ingo Ruhnke Date: Tue, 26 Aug 2014 10:54:08 +0000 (+0200) Subject: Handle all numeric characters as fixed width, even in variable spaced fonts X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9fa5429bfea6e22da442832c8ea55ea9988dcd07;p=supertux.git Handle all numeric characters as fixed width, even in variable spaced fonts This reduces jitter when numeric values change, such as in the download status dialog. --- diff --git a/src/video/font.cpp b/src/video/font.cpp index 41854451f..aeb2e2011 100644 --- a/src/video/font.cpp +++ b/src/video/font.cpp @@ -202,7 +202,7 @@ Font::loadFontSurface( Glyph glyph; glyph.surface_idx = surface_idx; - if( glyph_width_ == FIXED ) + if( glyph_width_ == FIXED || isdigit(*chr) ) { glyph.rect = Rectf(x, y, x + char_width, y + char_height); glyph.offset = Vector(0, 0);