Opened 17 years ago

Closed 17 years ago

Last modified 7 months ago

#530 closed defect (fixed)

GUI: german umlauts

Reported by: SF/sir_kill_a_lot Owned by: fingolfin
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

ScummVM 0.2.7 CVS, Built on Oct 31 2002 07:14:27

NewGUI doesn't draw german umlauts properly.
For example: DOTT German should display the
string "Pause. Leertaste für weiter." in the pause dialog.

This character 'ü' (ue) has an ASCII code of 0x81, in
NewGui::drawChar and NewGui::getCharWidth are
signed chars used, so the fix would be probably to just
cast them to unsigned before adding them to the guifont
pointer.

Ticket imported from: #633087. Ticket imported from: bugs/530.

Attachments (2)

dott_german_paused.png (29.2 KB) - added by SF/sir_kill_a_lot 17 years ago.
Screenshot: DOTT Paused
dott_german_paused_fixed.png (29.6 KB) - added by SF/sir_kill_a_lot 17 years ago.
Screenshot: DOTT: fixed Paused Msg

Download all attachments as: .zip

Change History (15)

comment:1 Changed 17 years ago by fingolfin

Note that the example you gave actually doesn't contain any umlauts :-)

The games I have in german are MonkeyVGA and FOA, in neither of
them can I find a place in the GUI where umlauts occur, so it's kinda
hard for me to look into this.

But in fact I am not even sure if the font we are using contains characte
data for umlauts; I rather doubt it.

comment:2 Changed 17 years ago by fingolfin

Owner: set to fingolfin
Summary: NewGUI: german umlautsGUI: german umlauts

Changed 17 years ago by SF/sir_kill_a_lot

Attachment: dott_german_paused.png added

Screenshot: DOTT Paused

Changed 17 years ago by SF/sir_kill_a_lot

Screenshot: DOTT: fixed Paused Msg

comment:3 Changed 17 years ago by SF/sir_kill_a_lot

Other german versions of games like MI and FOA have other
pause strings without any umlauts, thats right, but DOTT
does have.

I attached two screenshots, the first one shows the pause
dialog with the messed up umlaut and the second one shows
the right character (see my bugfix below).

I just cast the signed char to unsigned before adding it to the
guifont pointer, that are the changes i did: (all in newgui.cpp)

NewGui::drawChar
old: tmp = guifont + 224 + (chr + 1) * 8;
new: tmp = guifont + 224 + ((unsigned char)chr + 1) * 8;

NewGui::getCharWidth
old: return guifont[c+6];
new: return guifont[(unsigned char)c+6];

comment:4 Changed 17 years ago by SF/sir_kill_a_lot

Other german versions of games like MI and FOA have other
pause strings without any umlauts, thats right, but DOTT
does have.

I attached two screenshots, the first one shows the pause
dialog with the messed up umlaut and the second one shows
the right character (see my bugfix below).

I just cast the signed char to unsigned before adding it to the
guifont pointer, that are the changes i did: (all in newgui.cpp)

NewGui::drawChar
old: tmp = guifont + 224 + (chr + 1) * 8;
new: tmp = guifont + 224 + ((unsigned char)chr + 1) * 8;

NewGui::getCharWidth
old: return guifont[c+6];
new: return guifont[(unsigned char)c+6];

comment:5 Changed 17 years ago by SF/madshi

Perhaps this fix would also fix the Simon1 german umlaut
problem?

See: https://sourceforge.net/tracker/index.php?
func=detail&aid=574638&group_id=37116&atid=418820

comment:6 Changed 17 years ago by SF/madshi

P.S: Of course I know that this fix won't fix the Simon1
problem. I meant, perhaps Simon1 doesn't show the u umlaut
for the same signed/unsigned reason.

comment:7 Changed 17 years ago by SF/sir_kill_a_lot

Oops, pressing back in the browser and refreshing the page
wasn't a good idea, sorry for double post.

comment:8 Changed 17 years ago by SF/sir_kill_a_lot

I looked a little bit into the simon code... well, it confused me
much more then the scumm code already did...

I found SimonState::render_string in simon.cpp, which is
(perhaps) responsible for the text. But the const char is
converted into a byte, so the signed/unsigned issue seems
not to be the problem here.

comment:9 Changed 17 years ago by SF/madshi

Thank you nevertheless for looking into this...

comment:10 Changed 17 years ago by fingolfin

OK, can you please verify whether my fix works for you correctly (i.e. try
current CVS)?

comment:11 Changed 17 years ago by SF/sir_kill_a_lot

ScummVM 0.2.7 CVS Built on Nov 6 2002 04:00:55
Yep, now it's fixed, I also tried other umlauts and all were
shown. Thx for fixing that.

comment:12 Changed 17 years ago by fingolfin

Resolution: fixed
Status: newclosed

comment:13 Changed 7 months ago by digitall

Component: --Unset--GUI
Note: See TracTickets for help on using tickets.