5,389
edits
m (→Japanese) |
m (→Chinese) |
||
Line 322: | Line 322: | ||
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 wrapper mini-app called "oni.exe" loads "Oni.dat" (the game itself, a duplicate of the original Oni.exe from the US version), along with a custom "text engine" '''xfhsm_oni.dll''' and a font file '''xf_font.dat'''. Text strings loaded by "Oni.dat" are then intercepted by '''xfhsm_oni.dll''', interpreted/rendered using pixel data from '''xf_font.dat''', and injected into Oni.dat's OpenGL context. | 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 wrapper mini-app called "oni.exe" loads "Oni.dat" (the game itself, a duplicate of the original Oni.exe from the US version), along with a custom "text engine" '''xfhsm_oni.dll''' and a font file '''xf_font.dat'''. Text strings loaded by "Oni.dat" are then intercepted by '''xfhsm_oni.dll''', interpreted/rendered using pixel data from '''xf_font.dat''', and injected into Oni.dat's OpenGL context. | ||
Unlike for 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=8836 glyphs, filling up a standard [[wp:GB_2312|GB 2312]] plane (kuten), 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 for 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=8836 glyphs, filling up a standard [[wp:GB_2312|GB 2312]] plane (kuten), 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. kuten 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). |