Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Corrupted font display on Japanese OS/2 systems | ||
---|---|---|---|
Product: | General | Reporter: | Alex Taylor <altsank> |
Component: | ui | Assignee: | AOO issues mailing list <issues> |
Status: | UNCONFIRMED --- | QA Contact: | |
Severity: | Major | ||
Priority: | P3 | CC: | ydario |
Version: | 4.1.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | OS/2 | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- | ||
Issue Depends on: | |||
Issue Blocks: | 126518 |
Description
Alex Taylor
2014-08-21 13:08:43 UTC
A correction to the above: I have re-tested using several different Japanese/CJK fonts. In fact, Japanese text does display correctly if a Unicode-capable TrueType font (such as Arial Unicode MS or Droid Sans Fallback) is used. The confusion was caused by attempting to change the font AFTER pasting by highlighting the text (this was apparently failing because text selection seems unreliable when attempting to highlight the corrupted text). However, setting the font and THEN pasting the text demonstrates that it does work with those fonts. The problem appears to occur when using a font with a native CJK cmap, such as MS Mincho. (Again, however, this ONLY occurs when running on the Japanese OS version.) To be more specific, it appears that the font handler (FT2LIB) is treating these fonts differently. I suspect that it detects when the font has a Shift-JIS cmap, notes that the primary OS codepage is also Shift-JIS, and accordingly fails to use the Unicode cmap as it should. After some more testing... The 1993 versions of MSMINCHO.TTF and MSGOTHIC.TTF which are included in OS/2 Japanese (and other DBCS versions) exhibit this problem. The problem MIGHT be related to the fact that they include non-Latin Japanese names (MS明朝 and MSゴシック) which are (only) used on DBCS OS/2 systems. Since they in fact contain only Unicode cmaps, this is the only factor I can identify which might explain the different behaviour on DBCS vs non-DBCS systems. If newer versions (MSMINCHO.TTC and MSGOTHIC.TTC) from e.g. Windows 7 are installed instead, those ones seem to work perfectly well. These ones have English-only names which are used on DBCS and non-DBCS systems alike. Of the other default Japanese system fonts, Heisei Mincho and Heisei Kaku-Gothic (both versions) do not work, even though they have English names. (However, I have checked the TTFs and they do not have Unicode cmaps.) So, the workaround seems to be: avoid the use of all the DBCS outline fonts included with OS/2. This is pretty cumbersome, of course, since users are required to hunt down other DBCS fonts to use in their place. This is almost certainly (yet another) bug in the Innotek Font Engine. This really has to be replaced, it is causing too many problems at this point! A more immediate problem, which may be easier to address, is that the OS/2 OpenOffice port for some reason uses "GOTHIC" and "MINCHO" as the default for Asian fonts when run on DBCS systems. "GOTHIC" and "MINCHO" are aliases which are implemented through a special font driver which isn't even supported by OpenOffice (or FreeType), and which point to bitmap fonts in any case. This certainly isn't going to work. So, the defaults for Asian fonts should be changed to something else; I suggest "Times New Roman WT J", which is at least fairly likely to be installed on most OS/2 systems, and is a TrueType font that works. CORRECTION regarding 'MS Mincho' and 'MS Gothic'. After more tests, it turns out that the problem isn't in their cmaps at all. It is entirely due to the handling of the font names. Normally I use a FreeType-based system font driver (FT2IFI), which reports the English font names of MS Mincho and MS Gothic to the OS (which in turn is picked up by OpenOffice). However, if I revert to the default IBM TrueType driver, its name reporting behaviour is different - on DBCS systems it defaults to using the Japanese font names. Although OpenOffice doesn't use the system font driver for rendering, it does rely on it to report the names of installed fonts, and it evidently cannot cope with the Japanese font names. So, the workaround in the case of MS Mincho and MS Gothic is to BOTH replace the default versions with the newer (Windows XP/Vista/7) versions, AND install the FreeType IFI driver (either FREETYPE.DLL or FT2IFI.DLL) in OS/2. This does not help with the other default OS/2 Japanese fonts, as they either lack English names entirely, do not have Unicode cmaps, or both. |