Simplified Chinese Solaris User's Guide

Using Simplified Chinese PostScript Fonts and DPS Facilities

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.

The preceding context describes the graphic.

Creating Composite Roman and Simplified Chinese Fonts

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

Using Simplified Chinese Fonts in DPS Programming

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.

Window shows the text Hello World in English and in Simplified Chinese characters.

The Simplified Chinese Solaris software provides TrueType support in DPS.