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:
## 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