[fofix-gcode-issuetracker] Issue 1263 in fofix: FoFiX doesn't work completely with utf-8. It goes around 3.x and 4.x ver. of game.
fofix at googlecode.com
fofix at googlecode.com
Fri Aug 19 19:22:17 UTC 2011
Status: New
Owner: ----
Labels: Priority-Low
New issue 1263 by ul0... at gmail.com: FoFiX doesn't work completely with
utf-8. It goes around 3.x and 4.x ver. of game.
http://code.google.com/p/fofix/issues/detail?id=1263
I have an exception after I set-up "encoding=utf-8" in fofix.ini and then
play some new song(any song)... When must appear's 2nd screen (with
high-scores) FoFiX freeze(almost freeze). Actually I've seen this :
AttributeError: 'int' object has no attribute 'split'
Debugger say to me :
Find them >> "Dialogs.pyo", line 118, in wrapText
I've found it:
<code>
def wrapText(font, pos, text, rightMargin = 0.9, scale = 0.002, visibility
= 0.0):
"""
Wrap a piece of text inside given margins.
@param pos: (x, y) tuple, x defines the left margin
@param text: Text to wrap
@param rightMargin: Right margin
@param scale: Text scale
@param visibility: Visibility factor [0..1], 0 is fully visible
"""
x, y = pos
w = h = 0
space = font.getStringSize(" ", scale = scale)[0]
# evilynux - No longer requires "\n" to be in between spaces
for text, sentence in enumerate(text.split("\n")): #<< this line!
y += h
x = pos[0]
if text == 0:
y = pos[1]
for text, word in enumerate(sentence.strip().split(" ")):
w, h = font.getStringSize(word, scale = scale)
if x + w > rightMargin:
x = pos[0]
y += h
glPushMatrix()
glRotate(visibility * (text + 1) * -45, 0, 0, 1)
font.render(word, (x, y + visibility * text), scale = scale)
glPopMatrix()
x += w + space
return (x - space, y)
</code>
Why I set-up utf-8 coding? Simply, For my language need's utf-8 or
iso8895-5 (ru_RU).
Also, I think game cannot sum score. Cause can't read "text" variable.
I attached all log files for FoFiX 3.120 final version.(fofix.ini they have
common)
(archive include 2 folders before and after. in after settings with problam)
My OS - Windows Seven(7) x86 Ultimate
python doesn't used.
Attachments:
FoFiX 3.120 final_logs.zip 8.8 KB
More information about the fofix-gcode-issuetracker
mailing list