From 545985fa53419aaf7ee5c64e7ce60ae0c8f3aab0 Mon Sep 17 00:00:00 2001 From: "Jan D. Behrens" Date: Thu, 30 Aug 2012 13:38:32 +0200 Subject: [PATCH] Fixed display of some characters in playernick (e.g. . : |) --- xonstat/batch/badges/skin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.2