# HG changeset patch # User ib # Date 1297345828 0 # Node ID 31ce0bd110d57b7dfef3a737047e646c79a0377e # Parent ece4313fbf159062699bc3e07a29d690db2d0119 Only replace non-existing font character by space if space itself exists. diff -r ece4313fbf15 -r 31ce0bd110d5 gui/skin/font.c --- a/gui/skin/font.c Thu Feb 10 13:26:18 2011 +0000 +++ b/gui/skin/font.c Thu Feb 10 13:50:28 2011 +0000 @@ -196,7 +196,7 @@ { int c = fntGetCharIndex( id, &p, utf8, 1 ); if ( c == -1 || Fonts[id]->Fnt[c].sx == -1 ) c = ' '; - size+= Fonts[id]->Fnt[ c ].sx; + if ( Fonts[id]->Fnt[c].sx != -1 ) size += Fonts[id]->Fnt[c].sx; } return size; } @@ -278,6 +278,8 @@ if ( c == -1 || fw == -1 ) { c=' '; fw=Fonts[id]->Fnt[c].sx; } + if ( fw == -1 ) continue; + fh=Fonts[id]->Fnt[c].sy; fyc=Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x; yc=dx; @@ -306,6 +308,8 @@ if ( c == -1 || fw == -1 ) { c=' '; fw=Fonts[id]->Fnt[c].sx; } + if ( fw == -1 ) continue; + fh=Fonts[id]->Fnt[c].sy; fyc=Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x;