This chapter describes the PostScript, TrueType and bitmap fonts supported for use in the Simplified Chinese Solaris Operating System. The following sections discuss how to use and to edit the fonts.
The Simplified Chinese Solaris Operating System provides PostScript fonts in the Display PostScript System (DPS). This section describes the fonts and the DPS facilities. For further details, see Programming the Display PostScript System with X, published by Adobe® Systems.
The Simplified Chinese Solaris Operating System includes the fonts listed in the following table.
Table 9–1 Simplified Chinese Solaris Operating System PostScript Fonts
Font Name |
Description |
---|---|
Song-Medium |
Alias of Song-Medium-EUC; can be used like a Roman font. |
Song-Medium-EUC |
Song-Medium font, EUC encoding, horizontal display; can be used like a Roman font. |
Kai-Medium |
Alias of Kai-Medium-EUC; can be used like a Roman font. |
Kai-Medium-EUC |
Kai-Medium font, EUC encoding, horizontal display; can be used like a Roman font. |
FangSong-Medium |
Alias of FangSong-Medium-EUC; can be used like a Roman font. |
FangSong-Medium-EUC |
FangSong-Medium font, EUC encoding, horizontal display; can be used like a Roman font. |
Hei-Medium |
Alias of Hei-Medium-EUC; can be used like a Roman font. |
Hei-Medium-EUC |
Hei-Medium font, EUC encoding, horizontal display; can be used like a Roman font. |
The following figure shows a sample of the Song-Medium font.
You can create composite fonts using any a Roman font and any of the Simplified Chinese fonts. For example, the following PostScript code defines a composite font, Times-Italic+Kai-Medium. The Times-Italic is used for the ASCII characters and Kai-Medium font is used for the Simplified Chinese characters.
/makeEUCfont { /AsianFont exch def /WestFont exch def /NewFont exch def /CIDInit /ProcSet findresource begin NewFont [ AsianFont WestFont ] beginrearrangedfont 1 usefont 1 beginbfrange <00> <7e> <00> endbfrange endrearrangedfont end } bind def /LC_Times-Roman /Times-Roman /Kai-Medium makeEUCfont
You can use Simplified Chinese fonts just as you use Roman fonts in DPS wrap definitions. The following code sample creates the display in the Hello World figure.
defineps PSWDisplayText(char *text) /pointSize 50 def /Helvetica pointSize selectfont (Hello World) stringwidth pop 2 div neg 0 moveto (Hello World) show /cpSize 40 def /Song-Medium cpSize selectfont (text) stringwidth pop 2 div neg pointSize neg moveto (text) show endps
You can call PSWDisplayText(Chinese text) in a C program to display the designated Chinese text.
The Simplified Chinese Solaris software provides TrueType support in DPS.
You must convert BDF fonts to PCF format to make the fonts usable in Simplified Chinese Solaris applications.
Use the bdftopcf command to convert a BDF font to PCF format.
system% bdftopcf -o myfont14.pcf myfont14.bdf |
Replace the BDF file in the following directory with the converted PCF file: $OPENWINHOME/lib/locale/locale-name/fonts
Compress the .pcf font file and move it to your font directory.
system% compress myfont14.pcf |
Run the following commands in your font directory.
The .bdf file should not be in the font directory.
system% cat >> fonts.alias -new-myfont-medium-r-normal--16-140-75-75-c-140-gb2312.1980-0 Myfont-Medium14 ^D system% mkfontdir system% xset +fp `pwd` |
Use a command line such as the following to view your font.
system% xfd -fn Myfont-Medium14 |
All Simplified Chinese fonts have XLFD font names. You can use the xlsfonts utility to display the font names.
system% xlsfonts | grep gb2312 |
The sdtudctool utility supports bitmap, Type 1, and CID fonts. This section contains instructions for using the sdtudctool to create, input, and print new characters for the Simplified Chinese locales in the following code ranges.
Table 9–2 Code Points for Locales
Locale |
Code Ranges |
---|---|
zh |
0xD7FA-0xD7FE |
zh.GBK |
0xA140-0xA7A0 0xAAA1-0xAFFE 0xF8A1-0xFEFE |
zh_CN.GB18030 |
0xA140-0xA7A0 0xAAA1-0xAFFE 0xF8A1-0xFEFE |
You can use the following procedure to create characters in the zh locale.
To start the utility, type the following command:
system% sdtudctool |
The following window appears.
Click the Character button.
The following dialog box appears:
Specify the code position of the new character.
Create the outline or bitmap for the character using the drawing tools.
Click save from the file menu to save the character.
The new character(s) are saved in $HOME/.Xlocale/{locale}/fonts/UDC..
Choose options from the file menu.
The options dialog box appears.
Turn on the append font path option to append the UDC font aliases to your font path.
Turn on save font path option 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.
Choose one or more of the following point sizes for the bitmap fonts: 12, 14, 16, 20, 24.
To view the character reference, click the icon below the help menu.
The following window appears.
To close the window, click the icon again.
Choose save from the file menu or choose the open dictionary tool option from the file menu. The sdtudc_register tool panel appears.
Input the PinYin in the reading column.
The only the valid PinYin can be registered to NewPinyin input method.
Click Confirm button
The following dialog box appears.
The UDC and its PinYin will be registered in /var/tmp/newpyudc.txt. Click OK in the dialog to confirm
Use the NewPinyin or NeiMa input method to type the UDC's PinYin spelling for the characters you create.
Set the fontpath for mp utility.
system% setenv UDC_BASE $HOME/.Xlocale/zh |
Print a text file which contains UDCs 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 |
The Xsession script in the /usr/dt/bin directory includes the following font path: /usr/openwin/lib/locale/locale/X11/fonts, where locale is either zh, zh.GBK, or zh_CN.GB18030. To dynamically add a different font directory path, type the following commands.
system% xset +fp font_directory-path system% xset fp rehash |
Before using the xset command, ensure that the fonts.dir file exists in the specified font directory. If fonts.dir does not exist, use mkfontdir to create the fonts.dir for the Bitmap font.
Type the following commands to dynamically add a different font directory path.
system% xset +fp font_directory-path system% xset fp rehash |
The tables in this section list the TrueType and bitmap fonts that are available for the zh_CN.EUC, the zh_CN.GBK, and the zh_CN.GB18030 locales.
The following table shows the TrueType fonts for the zhlocale.
Table 9–3 TrueType Fonts for the zh_CN.EUC Locale
Full Family Name |
Subfamily |
Format |
Vendor |
Encoding |
---|---|---|---|---|
Fangsong | R | TrueType | Hanyi | GB2312.1980 |
Hei | R | TrueType | Monotype | GB2312.1980 |
Kai | R | TrueType | Monotype | GB2312.1980 |
Song | R | TrueType | Monotype | GB2312.1980 |
The following table shows the bitmap fonts for the zh locale.
Table 9–4 Bitmap Fonts for the zh_CN.EUC Locale
Full Family Name |
Subfamily |
Format |
Encoding |
---|---|---|---|
Song | B | PCF (14,16) | GB2312.1980 |
Song | R | PCF (12,14,16,20,24) | GB2312.1980 |
Table 9–5 TrueType Fonts for the zh_CN.GBK Locale
Full Family Name |
Subfamily |
Format |
Vendor |
Encoding |
---|---|---|---|---|
Fangsong | R | TrueType | Zhongyi | GBK |
Hei | R | TrueType | Zhongyi | GBK |
Kai | R | TrueType | Zhongyi | GBK |
Song | R | TrueType | Zhongyi | GBK |
The following table shows the bitmap fonts for the zh_CN.GBK locale.
Table 9–6 Bitmap Fonts for the zh_CN.GBK Locale
Full Family Name |
Subfamily |
Format |
Encoding |
---|---|---|---|
Song | R | PCF (12,14,16,20,24) | GBK |
The following table shows the TrueType fonts for the zh_CN.GB18030 locale.
Table 9–7 TrueType Fonts for the zh_CN.GB18030 Locale
Family Name |
Subfamily |
Format |
Vendor |
Encoding |
---|---|---|---|---|
FangSong |
R |
TrueType |
FangZheng |
GB18030–2000 |
Song |
R |
TrueType |
FangZheng |
GB18030–2000 |
Hei |
R |
TrueType |
FangZheng |
GB18030–2000 |
Kai |
R |
TrueType |
FangZheng |
GB18030–2000 |
The following table shows bitmap fonts for the zh_CN.GB18030 locale.
Table 9–8 Bitmap Fonts for the zh_CN.GB18030 Locale
Family Name |
Subfamily |
Format |
Encoding |
---|---|---|---|
Song |
R |
PCF(12,14,16,20,24) |
GB18030–2000 |