{"id":15,"date":"2008-04-17T08:09:04","date_gmt":"2008-04-17T08:09:04","guid":{"rendered":"https:\/\/blogs.scummvm.org\/sev\/?p=15"},"modified":"2022-05-26T09:03:38","modified_gmt":"2022-05-26T09:03:38","slug":"kanji-struggle","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/sev\/2008\/04\/17\/kanji-struggle\/","title":{"rendered":"Kanji struggle"},"content":{"rendered":"<p>For the last several days I was trying to add support for Japanese DIG. It was reported in\u00a0<a href=\"https:\/\/sourceforge.net\/tracker\/?func=detail&amp;atid=418820&amp;aid=1937515&amp;group_id=37116\">this<\/a> bug report.<\/p>\n<p>For some reason there is a bug with Kanji processing in our code. You may see it in these two screenshots (on\u00a0the\u00a0left\u00a0is original and ScummVM is on the right):<\/p>\n<div id='gallery-1' class='gallery galleryid-15 gallery-columns-2 gallery-size-full'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/dig_000.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"200\" src=\"https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/dig_000.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/dig_000.jpg 320w, https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/dig_000-300x188.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/scummvm00000.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"200\" src=\"https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/scummvm00000.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/scummvm00000.jpg 320w, https:\/\/blogs.scummvm.org\/sev\/wp-content\/uploads\/sites\/37\/2012\/04\/scummvm00000-300x188.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n\n<p>As you may see, Kanji \u51fa (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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the last several days I was trying to add support for Japanese DIG. It was reported in\u00a0this bug report. For some reason there is a bug with Kanji processing in our code. You may see it in these two screenshots (on\u00a0the\u00a0left\u00a0is original and ScummVM is on the right): As you may see, Kanji \u51fa [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/posts\/15\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sev\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}