Simplified Chinese Solaris User's Guide

Creating Characters With sdtudctool

You can create new characters using the drawing tools in the sdtudctool utility. (For information on modifying a font, see Editing Fonts With fontedit on page 83.) Following is the user defined characters code range for different SCH locales:

Table 7-2 Code Points for locales

zh 

0xD7FA-0xD7FE 

zh.GBK 

0xAAA1-0xAFFE 

zh_CN.GB18030 

0xAAA1-0xAFFE 

zh.UTF-8 

0xAAA1 - 0xAFFE 

The sdtudctool utility supports bitmap, Type 1, and CID fonts. You can also specify a font size for the new characters. This section contains procedures for using sdtudctool.

Using sdtudctool

This section contains instructions for creating, inputing and printing new characters with the sdtudctool utility and other tools. For example inzh locale, use the following procedure.

  1. To start the utility, type the following command:


    system% sdtudctool
    

    The following window appears.

    Graphic
  2. Click the Character button.

    The following dialog box appears:

    Graphic
  3. Specify the code position of the new character.

  4. Create the outline or bitmap for the character using the drawing tools.

  5. Click Save to save the character.

  6. Continue creating new characters.

  7. When you are finished, choose Save from the File menu to save the changes to your environment.

    The new character(s) are saved in $HOME/.Xlocale/{locale}/fonts/UDC.. .

Specifying Options
  1. Choose Options from the File menu.

    The Options dialog box appears.

    Graphic
  2. Turn on Append Font Path to append the UDC font aliases to your font path.

  3. Turn on Save Font Path to add the font files to the system font path.

    The new font files (located in $HOME/.Xlocale/{locale}/fonts/UDC) will be listed in the $HOME/.OWfontpath file and made available to the X server the next time you log in.

    If Save Font Path is off, the font files will still be saved in $HOME/.Xlocale/{locale}/fonts/UDC, but will not be added to the system fontpath the next time you log in.

  4. Choose one or more of the following font sizes (in points) for the bitmap fonts: 12, 14, 16, 20, 24.

Viewing the Character Reference
  1. To view the character reference, click the icon below the Help menu.

    The following window appears.

    Graphic
  2. To close the window, click the icon again.

Register the UDC to NewPinYin input method
  1. Choose Save from the File menu or choose "Open dictionary tool" from the File menu. The sdtudc_register tool will be invoked.

    Graphic
  2. Input the pinyin in "reading" column. Please note that the only the valid pinyin can be registered to NewPinyin input method.

    Graphic
  3. Click "Confirm" button

    Following dialog is displayed.

    Graphic
  4. The UDC and its pinyin will be registered in /var/tmp/newpyudc.txt. Click "OK" in the dialog to confirm

Typing the New Characters

To type the characters you created, use the NewPinyin input method with the UDC's pinyin or use Neima input method.

  1. Type "shan" in NewPinyin mode.

    Graphic
  2. Type "D7FA" in GB Neima mode.

    Graphic
Printing the New Characters

You can use "mp" utility to print the characters you created.

  1. Set the fontpath for "mp" utility. system% setenv UDC_BASE $HOME/.Xlocale/zh

  2. Print a text file which contains UDC(s) by specifying the configuration file for UDC.

    system% /usr/openwin/bin/mp -u/usr/lib/lp/locale/zh/mp/mp.conf.U udc.txt > udc.ps