Korean Solaris User's Guide

Using Korean Fonts in DPS Programming

You can use Korean fonts just as you use Roman fonts in DPS wrap definitions. This sample code creates the display which follows.


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
			/Kodig-Medium-KO cpSize selectfont
			(text) stringwidth pop 2 div neg pointSize neg moveto
			(text) show
endps

You can set PSWDisplayText in a C program to display the designated Korean text.

Window shows the text Hello World in English and in Korean characters.