Jump to content

OBD:Text encoding: Difference between revisions

→‎Over-long text: the more i study the Chinese Oni, the more I like Japanese ^_^
(→‎Japanese: actually there is a lot of ASCII in Japanese text)
(→‎Over-long text: the more i study the Chinese Oni, the more I like Japanese ^_^)
Line 1,284: Line 1,284:
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.
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.
This is 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.


====Long subtitles in Asian Oni====
The Japanese version displays screen resolutions as US-ASCII using TSFFTahoma (variable-width).
Another "over-long" issue is for Japanese or Chinese subtitles that are too long to fit on the screen horizontally. In such situations the engine displays the subtitle on multiple lines, placing line breaks at arbitrary positions instead of at ideographic spaces or after punctuation (if any), and aligning the ''end'' of the over-long string to the right of the screen, rather than vice-versa. This looks especially awkward when a subtitle is only slightly over-long and the automatic line break occurs near the ''start'' of the string, in the middle of a speaker's name (subtitles practically always have a colon ''and'' space after the speaker's name, and an arbitrary word break intuitively makes no sense in the vicinity of a space). For Western languages, the space character is registered as a line-breaking character in [[TSFL]]Roman, and allows for sensible display of long text, seeing as spaces occur both between words and after punctuation. Asian languages should supposedly do the same by specifying the ideographic space (a two-byte code point) as a line-breaking character, and possibly by setting up some rules for ideographic punctuation as well. In practice there is no such thing, hence the over-long subtitle issue.


(For the Japanese Oni, a possible workaround would be to insert an ASCII space character, or a narrow variant thereof, after punctuation. Chinese Oni doesn't support ASCII characters in text at all.)
====Long subtitles in Chinese Oni====
Some of Oni's subtitles are tirades that are too long to fit on the screen horizontally. In such situations the Chinese engine will displays the subtitle on multiple lines, placing line breaks at arbitrary positions instead of at ideographic spaces or after punctuation (if any). For not-so-clear reasons, automatic line breaks will often appear near the ''start'' of a long subtitle string, right in the middle of a speaker's name, which looks particularly awkward since there is usually a space nearby (after the colon).
 
The Japanese Oni displays long subtitles with arbitrary breaks as well, but consistently aligns the beginning of the string to the left of the screen, achieving an ordinary/intuitive paragraph-like look. (Since the Japanese engine has support for US-ASCII, an ASCII space could theoretically be inserted into Japanese text, allowing for line breaks at specific positions, e.g., after punctuation or between semantic groups.)
 
====Long UI text in Chinese Oni====
Oni's ingame UI is stylized as a futuristic computer screen (it is supposed to be Konoko's "Data Comlink") and has fixed-width frames reserved for text display. Large amounts of text can appear in the text console frame, or in the upper and lower sections of the Help menu (F1). It turns out that these frames have enough width to accommodate 26.5 16x16 glyphs (text console frame) or 19.5 glyphs (Help menu frame), therefor one would expect the Chinese text renderer to wrap lines around at 26 or 19 characters, respectively. Unfortunately the lines are wrapped around at 27 and 20, so the right half of the last glyph on every long line is cut off.
 
The Japanese Oni consistently adjusts the carriage return depending on the glyph dimensions (font size), so that the last glyph in a wrapped-around line always fits into the frame and is displayed completely. (The Japanese engine also allows for variable-width US-ASCII characters, and seems to correctly handle the carriage return for any mix of JIS and ASCII.)


===Chinese SUBT issues===
===Chinese SUBT issues===