繁體中文 Solaris 使用者指南

在 DPS 程式設計中使用繁體中文字型

您可以使用繁體中文字型,就像您在 DPS 自動換行定義中使用羅馬字型一樣。下列程式碼範例會在 Hello World 圖中建立顯示。


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

您可以在 C 程式中包含 PSWDisplayText (中文文字) 以顯示指定的中文文字。

Hello World 會使用對等的中文文字顯示

繁體中文版 Solaris 軟體提供 DPS 的 TrueType 支援。