Thursday, April 17, 2008

Kanji struggle

For the last several days I was trying to add support for Japanese DIG. It was reported in this bug report.

For some reason there is a bug with Kanji processing in our code. You may see it in these two screenshots (on the left is original and ScummVM is on the right):

As you may see, Kanji 出 (de) is rendered as garbage. Basically it looks like all Kanji is rendered bad. Investigations and test runs showed that computation of offset in font file (SJIStoFMTchunk() function) is correct, but the function produces value behind the font file end. Probalbly there is some preprocessing on font load. Need to clarify that too.


sanguinehearts said...

Its great to see someone working on support for Japanese language games.

is this using the FM Towns font? and will more games benefit?

sev said...

No, it uses font supplied with the game. FT, DIG and COMI can benefit from it. I.e. all three are broken now, though I still need someone with Japanese FT and COMI to test my changes.