Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#530 closed defect (fixed)

GUI: german umlauts

Reported by: SF/sir_kill_a_lot Owned by: fingolfin
Priority: normal Component: GUI
Version: 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 22 years ago.
Screenshot: DOTT Paused
dott_german_paused_fixed.png (29.6 KB ) - added by SF/sir_kill_a_lot 22 years ago.
Screenshot: DOTT: fixed Paused Msg

Download all attachments as: .zip

Change History (15)

comment:1 by fingolfin, 22 years ago

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 by fingolfin, 22 years ago

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

by SF/sir_kill_a_lot, 22 years ago

Attachment: dott_german_paused.png added

Screenshot: DOTT Paused

by SF/sir_kill_a_lot, 22 years ago

Screenshot: DOTT: fixed Paused Msg

comment:3 by SF/sir_kill_a_lot, 22 years ago

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 by SF/sir_kill_a_lot, 22 years ago

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 by SF/madshi, 22 years ago

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 by SF/madshi, 22 years ago

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 by SF/sir_kill_a_lot, 22 years ago

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

comment:8 by SF/sir_kill_a_lot, 22 years ago

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 by SF/madshi, 22 years ago

Thank you nevertheless for looking into this...

comment:10 by fingolfin, 22 years ago

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

comment:11 by SF/sir_kill_a_lot, 22 years ago

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 by fingolfin, 22 years ago

Resolution: fixed
Status: newclosed

comment:13 by digitall, 6 years ago

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