Contenues dansTrouver plus de documentationRessources d'assistance comprises | Télécharger cet ouvrage au format PDF (354 Ko)
Chapter 6 Display PostScript System (DPS)The Asian Solaris operating environment provides PostScript fonts in the Display PostScript System (DPS). This chapter describes what you need to use DPS in Asian Solaris software. For further details on DPS, see Programming the Display PostScript System with X, published by Adobe® Systems. This chapter is grouped in three main sections for the three localized environments. Using Korean PostScript Fonts and DPS FacilitiesThe Korean Solaris operating environment provides the Korean fonts listed in Table 6-1. Table 6-1 Korean Solaris Operating Environment DPS PostScript Fonts
Figure 6-1 Display PostScript Output (Korean)![]()
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 DPSYou 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 ProgrammingYou 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)![]()
Using Simplified Chinese PostScript Fonts and DPS FacilitiesSimplified Chinese Solaris operating environment DPS provides the Simplified Chinese fonts listed in Table 6-2. Table 6-2 Simplified Chinese Solaris Operating Environment PostScript Fonts
You can use the following two Simplified Chinese fonts just as you would use Roman fonts:
Figure 6-3 Sample Simplified Chinese Text Display PostScript Output
Creating Composite Roman and Simplified Chinese FontsYou can create composite fonts using any one Roman font and the Simplified Chinese Song-Medium-H font. For example, the following PostScript code defines a composite font, Times-Italic+Song-Medium, which uses Times-Italic for ASCII characters and Song-Medium horizontal font for Simplified Chinese characters: /Times-Italic+Song-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
/Song-Medium-H findfont
] def
currentdict
end
definefont pop
Using Simplified Chinese Fonts in DPS ProgrammingYou can use Simplified Chinese fonts just as you use Roman fonts in DPS wrap definitions. The following sample code creates the display in Figure 6-4: 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. For an example see Figure 6-4. Figure 6-4 Using Simplified Chinese Solaris Operating Environment DPS
Simplified Chinese Solaris software provides TrueType support in DPS. Using Traditional Chinese PostScript Fonts and DPS FacilitiesThe Traditional Chinese Solaris operating environment provides the Chinese PostScript fonts listed in Table 6-3. Table 6-3 Traditional Chinese Solaris Operating Environment PostScript Fonts
Of the fonts in this table, you can use the following just as you use Roman fonts:
Figure 6-5 Display PostScript Output Showing Traditional Chinese Text Sample
Creating Composite Roman and Traditional Chinese FontsYou can create composite fonts using one Roman font and one of the following Traditional Chinese fonts:
/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
/Kai-Medium-H findfont
] def
currentdict
end
definefont pop
Using Traditional Chinese Fonts in DPS ProgrammingYou can use Traditional Chinese fonts just as you use Roman fonts in DPS wrap definitions. The following sample code creates the display in Figure 6-6: 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
/Kai-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; for example, as shown in Figure 6-6. Figure 6-6 Using Traditional Chinese Solaris DPS
Simplified Chinese Solaris software provides TrueType support in DPS. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||