From: Jan D. Behrens Date: Thu, 30 Aug 2012 11:38:32 +0000 (+0200) Subject: Fixed display of some characters in playernick (e.g. . : |) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=545985fa53419aaf7ee5c64e7ce60ae0c8f3aab0;p=xonotic%2Fxonstat.git Fixed display of some characters in playernick (e.g. . : |) --- diff --git a/xonstat/batch/badges/skin.py b/xonstat/batch/badges/skin.py index 40ae0eb..56bc1d0 100644 --- a/xonstat/batch/badges/skin.py +++ b/xonstat/batch/badges/skin.py @@ -310,12 +310,12 @@ class Skin: r,g,b = _dec_colors[int(tag[0])] else: r,g,b = _dec_colors[7] - + + xoff, yoff, tw, th = ctx.text_extents(txt)[:4] ctx.set_source_rgb(r, g, b) - ctx.move_to(self.nick_pos[0] + xoffset, self.nick_pos[1]) + ctx.move_to(self.nick_pos[0] + xoffset - xoff, self.nick_pos[1]) ctx.show_text(txt) - xoff, yoff, tw, th = ctx.text_extents(txt)[:4] tw += (len(txt)-len(txt.strip())) * space_w # account for lost whitespaces xoffset += tw + 2