OS/2 tricks: How to set up DBCS environment on SBCS OS/2 #2 Display DBCS characters

Displaying DBCS characters on SBCS requires at least two things.

First is a font driver supporting UNICODE fonts correctly, second is fonts themselves for DBCS. Other than these, there are some other things needed.

1. Font Driver

Nowadays, most of fonts are True Type Font. OS/2 also supports it. However, default true type font driver does not support unicode fonts correctly. Especially, DBCS fonts. So if you want to use DBCS fonts, you should install another font driver for a true type font. It's <FreeType/2>.

FreeType/2 has several versions. 1.0.x and 1.1.x released by Michael Necasek, 1.2.x released by me, 1.3.x and 2.x released by Alex Taylor. Out of these, you should use 1.2.x or later. You can get them here.


For installations, see their README.

2. Font

IBM provided fonts containing CJK glyphs by default. They are <Times New Roman WT> family. Out of these, <Times New Roman WT J> is shipped with eComStation. Although 'J' means 'Japan', it contains China and Korean glyphs, too. As well as, <Times New Roman MT 30> in TTF may be used if you have. These are variable-width fonts. Where as, <Monotype Sans Duospace WT J> is a fixed-width font.

It's possible to use any public true type fonts, of course. Or I think, it woud be a good way to use fonts of Windows.

If you got them, install with [Font Palette], which is in [Local System] - [System Setup] - [Apperance] on eComStation.

Even if you installed DBCS fonts, to see DBCS characters with these fonts you should execute a program in a DBCS code page and select a proper font with its font selection option.

3. Font Association

It's very annoying that setting DBCS fonts on every program on which DBCS characters should be displayed is required.

Fortunately, OS/2 provides [Font Association] to avoid this annoyance. Font association is to associate a specific DBCS font to SBCS fonts. OS/2 finds a glyph in the DBCS font unless a glyph is not found in a SBCS font specified by a program. That is, it's a kind of fall-back font. In this way, it is possible to see DBCS characters without selecting a DBCS font in programs.

To enable font association, it is needed to create a new key, [PM_AssociateFont], in a [HINI_USER_PROFILE] - [PM_SystemFonts].

Let's do that like this.

  1. Execute <regedit2.exe>
  2. Expand [HINI_USER_PROFILE]
  3. Expand [PM_SystemFonts]
  4. Check [PM_AssociateFont] key if it is there
  5. If it is there, go to Step 9
  6. Click Right-Mouse-Button
  7. Click [New]
  8. Click [String Value]
  9. Enter [PM_AssociateFont] in [Name] field
  10. Click Right-Mouse-Button on [PM_AssociateFont] key
  11. Click [Modify]
  12. Enter a registered font name such as <Times New Roman WT J> in [Data] field

To have an effect of font association, it is required to reboot the system.

4. VIO

Now, normal PM programs will show you DBCS characters. However, you cannot still see DBCS characters on VIO windows. On VIO windows, a fixed-width system font which is a bitmap font not a true type font is used.

On DBCS OS/2, bitmap fonts such as MINCHO for DBCS characters are provided. Those fonts seem to require a special font driver not available on SBCS OS/2. So, another strategy is needed. That is, emulation of VIO window. For this, I've made <KShell>.

<KShell> redirects outputs of a VIO program to a PM window, and passes inputs on a PM window to a VIO program. For this, <KShell> uses a full screen session. Because of this, a size of VIO window is restricted to the size of the full screen. In other words, the full screen session is 80x25 in text mode, a VIO window is restricted to 80x25 in text mode. It's not possible to resize a VIO window to arbitrary size.

You can get [KShell] here.


For details, see documents of [KShell].


Unforutnatley, however, it is not known to see DBCS characters on a full screen session.

Next, let's find the way to input DBCS characters.

댓글

이 블로그의 인기 게시물

토렌트: < 왕좌의 게임 > 시즌 1 ~ 시즌 8 완결편 마그넷

토렌트: NGC < 코스모스 > 우리말 더빙 전편(1편~13편) 마그넷

토렌트: < 스타워즈 > Ep.1 ~ Ep.6 마그넷