5,389
edits
(general copy-edit and wiki touch-up) |
(disambiguated/corrected all I could) |
||
Line 1: | Line 1: | ||
{{TOCfloat|side=right}} | {{TOCfloat|side=right}} | ||
Originally created in English, Oni has been translated into the following [[seven]] languages: French, Italian, Spanish, German, Russian, Japanese and Chinese. | |||
:(An overview of the known language versions can be found [[OBD:Versions|HERE]], whereas localized content is detailed [[OBD:Localization|HERE]].) | |||
Depending on the language version, vanilla Oni uses one of the following five encodings to render text: | |||
*The original US version uses a trimmed-down [[wp:Mac_OS_Roman|Mac OS Roman]] code page that is effectively limited to US-ASCII (96 code points). | *The original US version uses a trimmed-down [[wp:Mac_OS_Roman|Mac OS Roman]] code page that is effectively limited to US-ASCII (96 code points). | ||
*European localizations (UK English, French, Italian, Spanish, German) use a custom version of Mac OS Roman (192 code points). | *European localizations (UK English, French, Italian, Spanish, German) use a custom version of Mac OS Roman (192 code points). | ||
Line 7: | Line 9: | ||
*The Japanese localization uses 1,357 code points mostly conforming to the [[wp:Shift_JIS|Shift JIS]] implementation of [[wp:JIS_X_0208|JIS X 0208]]. | *The Japanese localization uses 1,357 code points mostly conforming to the [[wp:Shift_JIS|Shift JIS]] implementation of [[wp:JIS_X_0208|JIS X 0208]]. | ||
Properties of the fonts that are eventually used to render the text (via the encoding) are briefly described throughout the page. | Properties of the fonts that are eventually used to render the text (via the encoding) are briefly described throughout the page. | ||
:(A more thorough overview of the glyphs can be found [[/Fonts|HERE]].) | |||
==Encodings== | ==Encodings== | ||
===US English=== | ===US English=== | ||
Below is the code page implemented by [[TSFF]]Tahoma in the US English version of Oni. It is based on Mac OS Roman ("MacRoman"), but with two differences: | Below is the code page implemented by [[TSFF]]Tahoma in the US English version of Oni. It is based on [[wp:Mac_OS_Roman|Mac OS Roman]] ("MacRoman" for short), but with two differences: | ||
*Of the 223 printable glyphs provided by MacRoman, 42 | *Of the 223 printable glyphs provided by MacRoman, 42 are not implemented in TSFFTahoma (shown as grey-on-black). | ||
*Control point 0x7F (a typically non-printable "delete" character) | *Control point 0x7F (a typically non-printable "delete" character) has a visible box-like glyph (◻) in this implementation. | ||
{|border=1 cellpadding=3 cellspacing=0 | {|border=1 cellpadding=3 cellspacing=0 | ||
|-bgcolor=silver | |-bgcolor=silver | ||
Line 20: | Line 22: | ||
|- | |- | ||
!bgcolor=silver|0x2... | !bgcolor=silver|0x2... | ||
!<span style="color:silver;font-size: | !<span style="color:silver;font-size:80%"><sup>S</sup><sub>P</sub></span>!!!!!"!!#!!$!!%!!&!!'!!(!!)!!*!!+!!,!!-!!.!!/ | ||
|- | |- | ||
!bgcolor=silver|0x3... | !bgcolor=silver|0x3... | ||
Line 36: | Line 38: | ||
!bgcolor=silver|0x7... | !bgcolor=silver|0x7... | ||
!p!!q!!r!!s!!t!!u!!v!!w!!x!!y!!z!!{!!|!!}!!~!!◻ | !p!!q!!r!!s!!t!!u!!v!!w!!x!!y!!z!!{!!|!!}!!~!!◻ | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0x8... | !bgcolor=silver|0x8... | ||
!Ä | !Ä | ||
!bgcolor=black|<span style="color:darkslategray">Å</span> | !bgcolor=black|<span style="color:darkslategray">Å</span> | ||
!Ç!!É!!Ñ!!Ö!!Ü!!á!!à!!â!!ä!!ã!!å!!ç!!é!!è | !Ç!!É!!Ñ!!Ö!!Ü!!á!!à!!â!!ä!!ã!!å!!ç!!é!!è | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0x9... | !bgcolor=silver|0x9... | ||
!ê!!ë!!í!!ì!!î!!ï!!ñ!!ó!!ò!!ô!!ö | !ê!!ë!!í!!ì!!î!!ï!!ñ!!ó!!ò!!ô!!ö | ||
Line 49: | Line 51: | ||
!bgcolor=black|<span style="color:darkslategray">û</span> | !bgcolor=black|<span style="color:darkslategray">û</span> | ||
!ü | !ü | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0xA... | !bgcolor=silver|0xA... | ||
!† | !† | ||
Line 64: | Line 66: | ||
!bgcolor=black|<span style="color:darkslategray">Æ</span> | !bgcolor=black|<span style="color:darkslategray">Æ</span> | ||
!Ø | !Ø | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0xB... | !bgcolor=silver|0xB... | ||
!bgcolor=black|<span style="color:darkslategray">∞</span> | !bgcolor=black|<span style="color:darkslategray">∞</span> | ||
Line 81: | Line 83: | ||
!bgcolor=black|<span style="color:darkslategray">Ω</span> | !bgcolor=black|<span style="color:darkslategray">Ω</span> | ||
!æ!!ø | !æ!!ø | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0xC... | !bgcolor=silver|0xC... | ||
!¿!!¡!!¬ | !¿!!¡!!¬ | ||
Line 89: | Line 91: | ||
!bgcolor=black|<span style="color:darkslategray">∆</span> | !bgcolor=black|<span style="color:darkslategray">∆</span> | ||
!«!!»!!… | !«!!»!!… | ||
!bgcolor=black|< | !bgcolor=black|<div style="color:darkslategray;font-size:70%;line-height:0.8em">NB<br />SP</div> | ||
!À | !À | ||
!bgcolor=black|<span style="color:darkslategray">Ã</span> | !bgcolor=black|<span style="color:darkslategray">Ã</span> | ||
!Õ | !Õ | ||
!Œ!!œ | !Œ!!œ | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0xD... | !bgcolor=silver|0xD... | ||
!–!!—!!‟!!”!!‛!!’!!÷ | !–!!—!!‟!!”!!‛!!’!!÷ | ||
Line 104: | Line 106: | ||
!bgcolor=black|<span style="color:darkslategray">fi</span> | !bgcolor=black|<span style="color:darkslategray">fi</span> | ||
!bgcolor=black|<span style="color:darkslategray">fl</span> | !bgcolor=black|<span style="color:darkslategray">fl</span> | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0xE... | !bgcolor=silver|0xE... | ||
!‡ | !‡ | ||
Line 111: | Line 113: | ||
!bgcolor=black|<span style="color:darkslategray">Ê</span> | !bgcolor=black|<span style="color:darkslategray">Ê</span> | ||
!Á!!Ë!!È!!Í!!Î!!Ï!!Ì!!Ó!!Ô | !Á!!Ë!!È!!Í!!Î!!Ï!!Ì!!Ó!!Ô | ||
|-bgcolor= | |-bgcolor=orange | ||
!bgcolor=silver|0xF... | !bgcolor=silver|0xF... | ||
!bgcolor=black|[[File:Platform-Mac.png|12px]] | !bgcolor=black|[[File:Platform-Mac.png|12px]] | ||
Line 128: | Line 130: | ||
|} | |} | ||
;Minor notes | ;Minor notes | ||
*The layout was apparently "borrowed" before Mac OS 8.5 came out | *The MacRoman layout was apparently "borrowed" before 1998, when Mac OS 8.5 came out and the [[wp:Currency sign (typography)|international currency sign]] a.k.a. scarab (¤), at 0xDB, was replaced with the euro symbol (€). | ||
*The Yen/Yuan symbol | *The actual font (see [[/Fonts|HERE]]) has some unusual typographical features, such as a single-stroke Yen/Yuan symbol (Ұ) and a vertical-stroke cent symbol (¢). | ||
;Major notes | ;Major notes | ||
*Some of the removed glyphs (most importantly ß | *Some of the removed glyphs (most importantly ß, ù and û, but also Ê, Ú and ú) occur in [[wp:Languages of the European Union#Knowledge|common European languages]]. This made the US TSFFTahoma unsuitable for [[wikt:EFIGS|EFIGS]] localizations, requiring the creation of a new version (see below). | ||
*The US engine cannot interpret any code points beyond the US-ASCII range (first 6 rows, white background), | *The US engine actually cannot interpret any code points beyond the US-ASCII range (first 6 rows, white background), notably failing on "…" (see [[#Ellipsis_issue|"Ellipsis issue"]] below). This is because of a provision for Asian encoding systems (EUC-CN and Shift JIS), which use two-byte sequences starting with a high-bit byte. | ||
---- | ---- | ||
===European=== | ===European=== | ||
The code page used by the five Western European versions (UK English, French, German, Spanish and Italian) is slightly different from the trimmed-down Mac OS Roman. | The code page used by the five Western European versions (UK English, French, German, Spanish and Italian) is slightly different from the trimmed-down Mac OS Roman. | ||
*It tends to the needs of European localizations by adding back the following characters: | *It tends to the needs of European localizations by adding back the following characters:<br>German ß; French Ê and û; French/Italian ù; Spanish/Italian Ú and ú (relatively rare). | ||
:'''N.B.''' The characters Æ and ÿ are not reinstated, despite their (very rare) occurrence in French script. | :'''N.B.''' The characters Æ and ÿ are not reinstated, despite their (very rare) occurrence in French script. | ||
*Awkwardly enough, the six characters are not restored in their original positions (grey-on-black), but take the place of math symbols. Four more "math" positions are inexplicably filled with three duplicate characters (œ, ¡ and ª) and | *Awkwardly enough, the six characters are not restored in their original positions (grey-on-black), but take the place of math symbols.<br/>Four more "math" positions are inexplicably filled with three duplicate characters (œ, ¡ and ª) and a truly enigmatic ʖ̇ , which doesn't seem to occur in any known language and has no dedicated code point in Unicode. | ||
:'''N.B.''' The broken italic font variants do not fully implement the 10 new glyphs and use a regular question mark instead of the ʖ̇. | :'''N.B.''' The broken italic font variants (see [[/Fonts#Italic|HERE]]) do not fully implement the 10 new glyphs and use a regular question mark instead of the ʖ̇. | ||
{|border=1 cellpadding=3 cellspacing=0 | {|border=1 cellpadding=3 cellspacing=0 | ||
|-bgcolor=silver | |-bgcolor=silver | ||
Line 146: | Line 149: | ||
|- | |- | ||
!bgcolor=silver|0x2... | !bgcolor=silver|0x2... | ||
!<span style="color:silver;font-size: | !<span style="color:silver;font-size:80%"><sup>S</sup><sub>P</sub></span>!!!!!"!!#!!$!!%!!&!!'!!(!!)!!*!!+!!,!!-!!.!!/ | ||
|- | |- | ||
!bgcolor=silver|0x3... | !bgcolor=silver|0x3... | ||
Line 254: | Line 257: | ||
Coincidentally, with the 10 new glyphs, the European code page has exactly 96 glyphs in the US-ASCII half and 96 in the extension half (blue). | Coincidentally, with the 10 new glyphs, the European code page has exactly 96 glyphs in the US-ASCII half and 96 in the extension half (blue). | ||
:'''N.B.''' Unlike the US version, all five Western European versions (including UK English) are able to render the full extended ASCII set. | :'''N.B.''' Unlike the US version, all five Western European versions (including UK English) are able to render the full extended ASCII set. | ||
---- | ---- | ||
===Cyrillic=== | ===Cyrillic=== | ||
In the Russian version of Oni, TSFFTahoma | In the Russian version of Oni, TSFFTahoma implements the [[wp:Windows-1251|Windows-1251]] (Cyrillic) code page, with some deviations. | ||
*The character 0x98, normally non-printable, is implemented as a visible box glyph (☐), slightly larger than 0x7F. | |||
*The character 0x98 | *The character 0x81, normally a "Ѓ" glyph, is replaced with a thin space of inconsistent size (2px wide for all fonts, 3px for 13pt regular and 16pt regular). | ||
* | *The character 0xA0, normally a [[wp:Non-breaking space|non-breaking space]], is a space of not-so-consistent size (anywhere from single to triple width, depending on the font). | ||
*The character 0xAD, normally a [[wp:Soft hyphen|soft hyphen]], is a visible hyphen (similar to the [[wp:Hyphen-minus|hyphen-minus]], 0x2D) for 7pt fonts, and an inconsistently sized space for other fonts.<br/>(Oni's engine could in theory reserve a special treatment for soft hyphens and non-breaking spaces, specified in [[TSFL]]Roman, but in practice there is no such functionality.) | |||
{|border=1 cellpadding=3 cellspacing=0 | {|border=1 cellpadding=3 cellspacing=0 | ||
|-bgcolor=silver | |-bgcolor=silver | ||
Line 266: | Line 271: | ||
|- | |- | ||
!bgcolor=silver|0x2... | !bgcolor=silver|0x2... | ||
!<span style="color:silver;font-size: | !<span style="color:silver;font-size:80%"><sup>S</sup><sub>P</sub></span>!!!!!"!!#!!$!!%!!&!!'!!(!!)!!*!!+!!,!!-!!.!!/ | ||
|- | |- | ||
!bgcolor=silver|0x3... | !bgcolor=silver|0x3... | ||
Line 284: | Line 289: | ||
|-bgcolor=cyan | |-bgcolor=cyan | ||
!bgcolor=silver|0x8... | !bgcolor=silver|0x8... | ||
!Ђ| | !Ђ | ||
!bgcolor=yellow|<div style="color:gray;font-size:70%;line-height:0.8em">S <br /> P</div> | |||
!‚||ѓ||„||…||†||‡||€||‰||Љ||‹||Њ||Ќ||Ћ||Џ | |||
|-bgcolor=cyan | |-bgcolor=cyan | ||
!bgcolor=silver|0x9... | !bgcolor=silver|0x9... | ||
Line 290: | Line 297: | ||
|-bgcolor=cyan | |-bgcolor=cyan | ||
!bgcolor=silver|0xA... | !bgcolor=silver|0xA... | ||
!< | !bgcolor=orange|<div style="color:gray;font-size:70%;line-height:0.8em">NB<br />SP</div> | ||
!Ў||ў||Ј||¤||Ґ||¦||§||bgcolor=fuchsia|Ё||©||Є||«||¬ | |||
!bgcolor=orange|– | |||
!®||Ї | |||
|-bgcolor=cyan | |-bgcolor=cyan | ||
!bgcolor=silver|0xB... | !bgcolor=silver|0xB... | ||
Line 307: | Line 317: | ||
!р||с||т||у||ф||х||ц||ч||ш||щ||ъ||ы||ь||э||ю||я | !р||с||т||у||ф||х||ц||ч||ш||щ||ъ||ы||ь||э||ю||я | ||
|} | |} | ||
;Italic fonts | |||
:The Russian version only provides an implementation of Windows-1251 for regular and bold fonts. The five italic fonts (7pt, 9pt, 10pt, 12pt and 14pt) have exactly the same data (pixels and glyph descriptors) as for the European iteration of Mac OS Roman. This makes sense because italic fonts are inherently broken (see [[/Fonts#Italic|HERE]]) and thus not used by any text in vanilla Oni. | |||
;Bold 14 font | |||
:Somewhat surprisingly, the size-14 TSFT in the Russian version of TSFFTahoma does not have a complete Windows-1251 code page either. Instead it is limited to the US-ASCII character set (including the "printable delete" box at code point 0x7F), i.e., the upper section of the above table (white background). This causes no issue in vanilla Oni, but only because there is no text that uses bold 14. | |||
;Incomplete transparency | |||
:A unique "feature" of the Russian/Cyrillic TSFFTahoma is that all the characters in the extended ASCII range (0x80-0xFF) have a slightly opaque background (about 3% opacity) in the regular (non-bold) font variant. This isn't visible ingame, but only because the engine (re)posterizes all the glyphs into 4-bit grayscale when rendering (so that only opacities above 6% are visible). | |||
;Glyph alignment and spacing | |||
:Last but not least, some fonts in the Russian TSFFTahoma have inconsistent vertical alignment, the most blatant example being 12 bold: some glyphs are one pixel shorter or taller than the full line height (ascender+descender), without a properly compensated vertical glyph offset; others simply have pixels that are not properly aligned within a glyph's rectangle. Besides, many glyphs have excessive padding to the left and/or right of a character, which affects readability.<br />'''N.B.''' There are other examples of poor alignment, e.g. for 12 bold, the character 0x9C (њ) has its right side cut off and is thus unusable (luckily it doesn't occur in Russian script). | |||
---- | ---- | ||
===Chinese=== | ===Chinese=== | ||
The Chinese version of Oni has the same TSFFTahoma as the original US version (trimmed-down Mac OS Roman), but the engine cannot interpret the extended ASCII range, and in fact does not use TSFFTahoma at all. Instead the user launches a wrapper mini-app called '''oni.exe''' which | The Chinese version of Oni has the same TSFFTahoma as the original US version (trimmed-down Mac OS Roman), but the engine cannot interpret the extended ASCII range, and in fact does not use TSFFTahoma at all. Instead the user launches a wrapper mini-app called '''oni.exe''' which executes the main game code in '''Oni.dat''' (a renamed copy of the original Oni.exe from the US version) with text logic injected from '''xfhsm_oni.dll''' and font data loaded from '''xf_font.dat'''. Text strings that Oni intends to display are then intercepted by xfhsm_oni.dll and the resulting pixel data from xf_font.dat is injected into Oni's OpenGL context. | ||
Unlike other versions of Oni, the Chinese font doesn't have a table listing the valid code points along with their "glyph descriptors" (i.e., instructions on how to extract a glyph from the raw pixel data). Instead all the glyphs have a standard size of 16x16 pixels and there are exactly 94x94=8,836 glyphs, filling up a standard [[wp:GB_2312|GB 2312]] plane (''qūwèi''), indexed through a compact numbering scheme known as [[wp:Extended_Unix_Code#EUC-CN|EUC-CN]]: each of the 94x94 code points is indexed by a pair of bytes that are both in the 0xA1-0xFE range. Code points that are not assigned under GB 2312 (e.g. rows 10-15 and 90-94) simply have blank pixel data in the corresponding regions of xf_font.dat. | Unlike other versions of Oni, the Chinese font doesn't have a table listing the valid code points along with their "glyph descriptors" (i.e., instructions on how to extract a glyph from the raw pixel data). Instead all the glyphs have a standard size of 16x16 pixels and there are exactly 94x94=8,836 glyphs, filling up a standard [[wp:GB_2312|GB 2312]] plane (''qūwèi''), indexed through a compact numbering scheme known as [[wp:Extended_Unix_Code#EUC-CN|EUC-CN]]: each of the 94x94 code points is indexed by a pair of bytes that are both in the 0xA1-0xFE range. Code points that are not assigned under GB 2312 (e.g., rows 10-15 and 90-94) simply have blank pixel data in the corresponding regions of xf_font.dat. | ||
The pixel packing used by xf_font.dat is 1-bit black-and-white (i.e., without antialiasing), which is much more space-efficient than the 8-bit grayscale storage used in Oni's [[TSFT]]. Another gain comes from not having any glyph descriptors ([[TSGA]]s). Both a regular and a bold typeface are available (but in one size only, fixed-width 16x16). | The pixel packing used by xf_font.dat is 1-bit black-and-white (i.e., without antialiasing), which is much more space-efficient than the 8-bit grayscale storage used in Oni's [[TSFT]]. Another gain comes from not having any glyph descriptors ([[TSGA]]s). Both a regular and a bold typeface are available (but in one size only, fixed-width 16x16). | ||
Line 318: | Line 338: | ||
In theory, EUC-CN allows for single-byte control codes, which would be interpreted as US-ASCII and rendered using Oni's own TSFFTahoma. In practice, all of the strings in the Chinese game data use only two-byte control sequences. | In theory, EUC-CN allows for single-byte control codes, which would be interpreted as US-ASCII and rendered using Oni's own TSFFTahoma. In practice, all of the strings in the Chinese game data use only two-byte control sequences. | ||
---- | ---- | ||
===Japanese=== | ===Japanese=== | ||
Line 835: | Line 857: | ||
{{divhide|end}} | {{divhide|end}} | ||
As for the first code page of the Japanese TSFFTahoma, it implements only the 0x20-0x7F range of characters, i.e., is limited to [[wp:US-ASCII|US-ASCII]]. This is consistent with the simplified logic used by the Japanese engine, where any high-bit byte (in the 0x80-0xFF range) is treated as the start of a two-byte sequence ( | As for the first code page of the Japanese TSFFTahoma, it implements only the 0x20-0x7F range of characters, i.e., is limited to [[wp:US-ASCII|US-ASCII]]. This is consistent with the simplified logic used by the Japanese engine, where any high-bit byte (in the 0x80-0xFF range) is treated as the start of a two-byte sequence. (In actual Shift JIS some high-bit bytes are interpreted as half-width kana, a feature that isn't supported by Oni's engine.) | ||
It must be noted that, as compared to the separate .fnt files, TSFFTahoma provides a very rudimentary implementation of JIS X 0208 (only coding for 154 double-byte glyphs, whereas the .fnt files implement 1,357) and is essentially useless/unusable. | It must be noted that, as compared to the separate .fnt files, the Japanese TSFFTahoma provides a very rudimentary implementation of JIS X 0208 (only coding for 154 double-byte glyphs, whereas the .fnt files implement 1,357) and is essentially useless/unusable. | ||
*The Japanese engine requires all four .fnt files to be present (bails out if any of them are missing) and uses them for all of the vanilla text strings, which only contain double-byte control codes. Thus, under normal conditions, TSFFTahoma remains completely unused in the Japanese version. | *The Japanese engine requires all four .fnt files to be present (bails out if any of them are missing) and uses them for all of the vanilla text strings, which only contain double-byte control codes. Thus, under normal conditions, TSFFTahoma remains completely unused in the Japanese version. | ||
*If the US engine is used on the Japanese game data, then the .fnt files are ignored (obviously), and the incomplete TSFFTahoma is used to render the Japanese text strings as well as the few English strings supplied by the EXE. Due to the limited character set, many strings end up broken. | *If the US engine is used on the Japanese game data, then the .fnt files are ignored (obviously), and the incomplete TSFFTahoma is used to render the Japanese text strings as well as the few English strings supplied by the EXE. Due to the limited character set, many strings end up broken. | ||
It appears that the Japanese localization team initially tried to put Oni's code page system to use, and to fill in all the required JIS glyphs into TSFT and TSGA. As the number of kanji increased, supposedly, the TSFT grew prohibitively large due to the use of 8-bit grayscale storage for the pixel data, and the size taken up by the sparsely populated TSGA also increased out of proportion with the rest of the game data. At some point the engine switched to separate .fnt files, and somehow no one bothered to clean up the incomplete code pages in TSFFTahoma. | |||
At the time of writing, the code points and pixel data in the Japanese .fnt files have not been thoroughly analyzed and compared with JIS X 0208. We know that 1,357 glyphs are implemented, across 27 "lead bytes" (roughly 50 ''kuten'' rows). This is much smaller than the full ''kuten'' plane, and makes sense in terms of space efficiency. We also know that some code points are non-standard (rearranged) as compared to regular Shift JIS, although we do not yet know if this rearrangement is consistent with any common variation of Shift JIS. As long as Japanese game data contains text strings that match the game's encoding, non-standard code points are not a problem (but should be kept in mind). | At the time of writing, the code points and pixel data in the Japanese .fnt files have not been thoroughly analyzed and compared with JIS X 0208. We know that 1,357 glyphs are implemented, across 27 "lead bytes" (roughly 50 ''kuten'' rows). This is much smaller than the full ''kuten'' plane, and makes sense in terms of space efficiency. We also know that some code points are non-standard (rearranged) as compared to regular Shift JIS, although we do not yet know if this rearrangement is consistent with any common variation of Shift JIS. As long as Japanese game data contains text strings that match the game's encoding, non-standard code points are not a problem (but should be kept in mind). | ||
==Text anomalies== | ==Text anomalies== | ||
===Ellipsis issue=== | ===Ellipsis issue=== | ||
Unlike other Western versions (UK English, French, German, Italian, Spanish, Russian), the US engine treats high-bit characters as part of a two-byte control sequence (a provision for Asian encodings), and therefore fails to render any character from the extended ASCII range. This happens twice in English Oni, because the ellipsis (…), encoded | Unlike other Western versions (UK English, French, German, Italian, Spanish, Russian), the US engine treats high-bit characters as part of a two-byte control sequence (a provision for Asian encodings), and therefore fails to render any character from the extended ASCII range. This happens twice in English Oni, because the ellipsis character (…), encoded as 0xC9, was accidentally used in [[Quotes/Consoles/level_19d|These]] [[Quotes/Consoles/level_19e|Two]] text consoles in place of three consecutive dots (probably auto-substituted by a text editor). The result is that the two lines using a "…" are cut off at the offending character. | ||
===(A1,A0) issue=== | ===(A1,A0) issue=== | ||
Unlike the Japanese version, where non-standard Shift JIS sequences are explicitly allowed in the .fnt files, the Chinese version does not have a code table and relies on a standard EUC-CN encoding, with exactly 8,836 code points (94x94). A proper EUC-CN control sequence consists of two bytes that are both in the range 0xA1-0xFE (single US-ASCII characters are also allowed in theory). | Unlike the Japanese version, where non-standard Shift JIS sequences are explicitly allowed in the .fnt files, the Chinese version does not have a code table and relies on a standard EUC-CN encoding, with exactly 8,836 code points (94x94). A proper EUC-CN control sequence consists of two bytes that are both in the range 0xA1-0xFE (single US-ASCII characters are also allowed in theory). | ||
The text strings in | The text strings in the Chinese version mostly conform to the EUC-CN scheme, except for the rare occurrence of the (A1,A0) sequence. This is not a valid control sequence under any common extension of EUC-CN, and in any case it does not correspond to any pixel data within xf_font.dat, which only covers the standard 94x94 ''quwei'' plane, corresponding to a strict 0xA1-0xFE range for the two encoding bytes. Any text string including the (A1,A0) sequence is broken off at the offending character: this is known to occur for | ||
Another illegal sequence is (0xA3,0x89), which occurs only in the SUBTmessages entry xdash1 (five identical glyphs at the end of the string). | |||
===Over-tall text=== | ===Over-tall text=== | ||
Although not strictly speaking a font issue, some of Oni's text fails to render because it doesn't fit vertically into a fixed-size frame (such as a [[:File:DATA_CONSOLE.png|text console]]). This is known to happen for [[Quotes/Consoles/level_1e| | Although not strictly speaking a font issue, some of Oni's text fails to render because it doesn't fit vertically into a fixed-size frame (such as a [[:File:DATA_CONSOLE.png|text console]]). This is known to happen for [[Quotes/Consoles/level_1e|These]] [[Quotes/Consoles/level_8b|Two]] consoles in the English version, and possibly for other screens in other language versions. | ||
===Over-long text=== | ===Over-long text=== | ||
Chinese | Although Chinese text strings typically have a much smaller number of glyphs than English originals, this is not always the case. The Chinese glyphs are also much wider on average, with each glyph taking up 16x16 pixels, and so there are situations where the rendered Chinese line is much wider than the English original, no longer fitting on one line as intended by the context. | ||
This is only known to cause a problem for the "resolution" item in the Options menu (a WMM_ generated at runtime). The actual dropdown list is wide enough to accommodate even the longest resolution strings, but the currently selected resolution appears in a small window that is only 150 pixels wide, too narrow even for the shortest resolution string "640×480×16位" (which needs 176 pixels). As a result the active resolution is always displayed on two lines, no longer fitting into the frame vertically and thus unreadable. | |||
===Chinese SUBT issues=== | |||
The Chinese (Windows) version of Oni is unique in that no game content was actually localized except for text. Because of the relative simplicity of the task, the Chinese team did not build a new set of game data files, and merely modified the original .dat and .raw from the US version. [[OBD:WMDD|WMDD]], [[OBD:WMM_|WMM_]] and [[OBD:IGSt|IGSt]] instances were patched inside each level's .dat, whereas the two [[OBD:SUBT|SUBT]] files were patched in level0_Final.raw. In the case of an IGSt, text is stored in a fixed-size array (384 bytes), which has more than enough space for any translated text. WMDD and WMM_ also have fixed-size arrays (256 and 64 bytes, respectively) with at least some spare space. SUBT files, however, have a much more compact storage. | |||
The text strings of a SUBT file (stores in level0_Final.raw and indexed from the .dat part of the SUBT) are typically packed right next to each other, separated only by a single null char. Chinese text typically uses fewer glyphs, but each glyph is taking up two bytes instead of one, including punctuation and the trailing null. Thus for short sentences or interjections it is possible for a Chinese translation to completely fill up the space used by the original string and even extend into the next entry. | |||
None of the Chinese translations in SUBTmessages or SUBTsubtitles are actually longer than the original English text, and it is only the extra null byte that intrudes on the next entry's handle on several occasions. The affected handle essentially becomes a null string, and the corresponding subtitle is never found and displayed. | |||
In SUBTmessages this happens only once (the message corresponding to "xf1" overwrites the first character of "xreload", so Konoko is never prompted to reload her gun in the last training room). In SUBTsubtitles there are as many as 29 anomalies, summed up in the following table. | |||
{| | |||
| | |||
{{divhide| List of corrupt subtitle handles in the Chinese version|align=left}} | |||
{|border=1 cellspacing=0 | |||
!Culprit handle | |||
!Original of culprit text (null char ° included) | |||
!Victim handle | |||
|- | |||
!01_01_11 | |||
|Kerr: Good luck Konoko.° | |||
!<strike>0</strike>1_02_01 | |||
|- | |||
!01_03_07 | |||
|Griffin: All right Konoko. I'm giving you a shot at this.° | |||
!<strike>0</strike>1_03_07 | |||
|- | |||
!02_05_04 | |||
|Muro: Let me know when things start to get messy.° | |||
!<strike>0</strike>2_05_05 | |||
|- | |||
!02_06_02 | |||
|Griffin: Explain.° | |||
!<strike>0</strike>2_06_03 | |||
|- | |||
!02_09_03 | |||
|Griffin: So she's still stable?° | |||
!<strike>0</strike>2_09_04 | |||
|- | |||
!03_10_01 | |||
|Barabas: Let's get it on!° | |||
!<strike>0</strike>3_10_02 | |||
|- | |||
!03_11_01 | |||
|Barabas: She's with them.° | |||
!<strike>0</strike>3_11_02 | |||
|- | |||
!04_17_03 | |||
|Muro: I can't allow that.° | |||
!<strike>0</strike>4_17_04 | |||
|- | |||
!07_22_01 | |||
|Konoko: Showtime...° | |||
!<strike>0</strike>7_23_01 | |||
|- | |||
!07_26_15 | |||
|Konoko: Thanks.° | |||
!<strike>0</strike>7_26_16 | |||
|- | |||
!07_26_17 | |||
|Cop: No, we haven't secured a single area -- not even our armory.° | |||
!<strike>0</strike>7_26_18 | |||
|- | |||
!08_27_03 | |||
|Konoko: This is personal.° | |||
!<strike>0</strike>8_27_04 | |||
|- | |||
!09_31_02 | |||
|Shinatama: You are not who you think you are.° | |||
!<strike>0</strike>9_31_03 | |||
|- | |||
!09_31_03 | |||
|Konoko: What?° | |||
!<strike>0</strike>9_31_04 | |||
|- | |||
!09_31_24 | |||
|Konoko: No!° | |||
!<strike>0</strike>9_31_25 | |||
|- | |||
!11_40_07 | |||
|Mukade: We shall see...° | |||
!<strike>c</strike>11_41_01konoko | |||
|- | |||
!12_46_02 | |||
|Konoko: What?° | |||
!<strike>1</strike>2_46_03 | |||
|- | |||
!12_46_06 | |||
|Konoko: Leave me alone...° | |||
!<strike>1</strike>2_46_07 | |||
|- | |||
!13_65_05 | |||
|Kerr: This may sting a bit...° | |||
!<strike>1</strike>3_65_06 | |||
|- | |||
!13_65_20 | |||
|Konoko: Griffin? But why?° | |||
!<strike>1</strike>3_65_21 | |||
|- | |||
!13_65_25 | |||
|Kerr: Muro.° | |||
!<strike>1</strike>3_65_26 | |||
|- | |||
!13_65_36 | |||
|Konoko: What?° | |||
!<strike>1</strike>3_65_37 | |||
|- | |||
!13_66_03 | |||
|Konoko: The crane controls...° | |||
!<strike>1</strike>3_66_04 | |||
|- | |||
!14_52_02 | |||
|Konoko: Gotcha.° | |||
!<strike>1</strike>4_52_03 | |||
|- | |||
!14_52_06 | |||
|Konoko: For you? Badly?° | |||
!<strike>1</strike>4_52_07 | |||
|- | |||
!00_01_09 | |||
|Shinatama: Super!° | |||
!<strike>c</strike>00_01_10Shinatama | |||
|- | |||
!c00_01_10Shinatama | |||
|Shinatama: Great!° | |||
!<strike>0</strike>0_01_11 | |||
|- | |||
!civmale3_trigger | |||
|Civilian: Hi there!° | |||
!<strike>c</strike>00_01_100shinatama | |||
|- | |||
!c00_01_101shinatama | |||
|Shinatama: I'm sorry...so sorry! ° | |||
!<strike>c</strike>00_01_102shinatama | |||
|} | |||
{{divhide|end}} | |||
|} | |||
The systematic nature of this anomaly suggests that the Chinese team were careful not to exceed the string length of the original, and merely overlooked the extra null char (and of course didn't check the ingame rendition of the subtitles all that thoroughly). | |||
{{OBD}} | {{OBD}} |