_contrast_threshold = 0.5
-def qfont_decode(qstr='', for_html=False):
+def qfont_decode(qstr='', glyph_translation=False):
""" Convert the qfont characters in a string to ascii.
- for_html - determines whether to convert the unicode characters to
+ glyph_translation - determines whether to convert the unicode characters to
their ascii counterparts (if False, the default) or to
the mapped glyph in the Xolonium font (if True).
"""
chars = []
for c in qstr:
if u'\ue000' <= c <= u'\ue0ff':
- if for_html:
+ if glyph_translation:
c = _qfont_unicode_glyphs[ord(c) - 0xe000]
else:
c = _qfont_ascii_table[ord(c) - 0xe000]
def html_colors(qstr='', limit=None):
- qstr = html_escape(qfont_decode(qstr, for_html=True))
+ qstr = html_escape(qfont_decode(qstr, glyph_translation=True))
qstr = qstr.replace('^^', '^')
if limit is not None and limit > 0: