X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Fbatch%2Fbadges%2Fskin.py;h=3b5b13b3286f491da07b8cc351f4ff56f4c27d25;hb=ff89011c335c752e464413eb9abc9dac5c4199fd;hp=edcb2eb4acde76cff706f71b9008abac03d05e73;hpb=85a79f54c76addc5ee68a0e3612c00a21c71695b;p=xonotic%2Fxonstat.git diff --git a/xonstat/batch/badges/skin.py b/xonstat/batch/badges/skin.py index edcb2eb..3b5b13b 100644 --- a/xonstat/batch/badges/skin.py +++ b/xonstat/batch/badges/skin.py @@ -223,6 +223,13 @@ class Skin: self.ctx = ctx ctx.set_antialias(C.ANTIALIAS_GRAY) + # set font hinting options + fo = C.FontOptions() + fo.set_antialias(C.ANTIALIAS_GRAY) + fo.set_hint_style(C.HINT_STYLE_FULL) + fo.set_hint_metrics(C.HINT_METRICS_ON) + ctx.set_font_options(fo) + # draw background if self.bg == None: if self.bgcolor != None: @@ -269,7 +276,9 @@ class Skin: ## draw player's nickname with fancy colors # deocde nick, strip all weird-looking characters - qstr = qfont_decode(player.nick).replace('^^', '^').replace(u'\x00', '') + qstr = qfont_decode(qstr=player.nick, glyph_translation=True).\ + replace('^^', '^').\ + replace(u'\x00', '') #chars = [] #for c in qstr: # # replace weird characters that make problems - TODO