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.