* src/FontScale.py: try to handle non-ASCII characters
svn: r2127
This commit is contained in:
parent
fdea34896e
commit
7c847b176f
@ -256,5 +256,8 @@ def string_width(font,text):
|
||||
l = _font_array[i][j]
|
||||
r = 0
|
||||
for c in text:
|
||||
try:
|
||||
r = r + l[ord(c)]
|
||||
except:
|
||||
r = r + l[ord('n')]
|
||||
return (r+1)*s
|
||||
|
Loading…
Reference in New Issue
Block a user