Asian Application Developer's Guide

Using Korean PostScript Fonts and DPS Facilities

The Korean Solaris operating environment provides the Korean fonts listed in Table 6-1.

Table 6-1 Korean Solaris Operating Environment DPS PostScript Fonts

Font Name 

Description 

Kodig-Medium-COMB-H 

Kodig-Medium font, 9/7 composite font encoding for horizontal display of EUC encoded Hangul and Roman text.  

Kodig-Medium-COMB-V 

Kodig-Medium font, 9/7 composite font encoding for vertical display of EUC encoded Hangul and Roman text. 

Kodig-Medium  

Kodig-Medium font, an alias of Kodig-Medium-EUC-H font; can be used like a Roman font. 

Kodig-Medium-EUC-H 

Kodig-Medium font, 9/7 composite font encoding for horizontal display of EUC text; can be used like a Roman font. 

Kodig-Medium-EUC-V  

Kodig-Medium font, 9/7 composite font encoding for vertical display of EUC text; can be used like a Roman font. 

Kodig-Medium-H 

Kodig-Medium font, 8/8 composite font encoding for horizontal display of shifted out ISO2022 text. 

Kodig-Medium-V 

Kodig-Medium font, 8/8 composite font encoding for vertical display of shifted out ISO2022 text.  

Myeongjo-Medium-COMB-H 

Myeongjo-Medium font, 9/7 composite font encoding for horizontal display of EUC encoded Hangul and Roman text. 

Myeongjo-Medium-COMB-V 

Myeongjo-Medium font, 9/7 composite font encoding for vertical display of EUC encoded Hangul and Roman text. 

Myeongjo-Medium  

Myeongjo-Medium font, an alias of Myeongjo-Medium-EUC-H font; can be used like a Roman font. 

Myeongjo-Medium-EUC-H 

Myeongjo-Medium font, 9/7 composite font encoding for horizontal display of EUC text; can be used like a Roman font. 

Myeongjo-Medium-EUC-V 

Myeongjo-Medium font, 9/7 composite font encoding for vertical display of EUC text; can be used like a Roman font. 

Myeongjo-Medium-H 

Myeongjo-Medium font, 8/8 composite font encoding for horizontal display of shifted out ISO2022 text. 

Myeongjo-Medium-V 

Myeongjo-Medium font, 8/8 composite font encoding for vertical display of shifted out ISO2022 text. 

Figure 6-1 Display PostScript Output (Korean)

GraphicGraphic

Of these fonts, you can use the following just as you would use Roman fonts:

Figure 6-1 shows a sample of Kodig-Medium and Myeongjo-Medium text.

You can also use the following Korean fonts just like Roman fonts for an ISO2022 encoded Hangul string, that is, for a pure Hangul string between SO and SI characters with no intermediate ASCII space (0x20) characters:

Creating Composite Fonts for Korean DPS

You can create composite fonts using any one Roman font with one of the following Korean fonts:

For example, the following PostScript code defines a composite font, Times-Italic+Kodig-Medium, which uses Times-Italic for ASCII characters and Kai-Medium horizontal font for Korean characters:

/Times-Italic+Kai-Medium
13 dict begin
        	/FontName 1 index def
        	/FMapType 4 def
        	/Encoding [ 0 1 ] def
        	/WMode 0 def
        	/FontType 0 def
        	/FontMatrix [1.0 0.0 0.0 1.0 0.0 0.0] def
        	/FDepVector [
                	/Times-Italic findfont
                	/Kodig-Medium-COMB-H findfont
        	] def
	currentdict
	end
	definefont pop

Using Korean Fonts in DPS Programming

You can use some Korean fonts just as you use Roman fonts in DPS wrap definitions. The following sample code was used to create the display in Figure 6-2:

	defineps PSWDisplayText(char *text)
        	/pointSize 50 def
        	/Helvetica pointSize selectfont
        	(Hello World) stringwidth pop 2 div neg 0 moveto
        	(Hello World) show
	
        	/kpSize 40 def
        	/Kodig-Medium-KO kpSize selectfont
        	(text) stringwidth pop 2 div neg pointSize neg moveto
        	(text) show
	endps

You can call PSWDisplayText(Korean text) in a C program to display the designated Korean text; for example, as shown in Figure 6-2.

Figure 6-2 Solaris Operating Environment DPS (Korean)

GraphicGraphic