Asian Application Developer's Guide

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