Solaris DPS (Display PostScript) 系統提供以下中文字型,皆可像羅馬字型同樣使用:
| 字型名稱 | 說明 |
|---|---|
| 宋體 / 宋體 EUC | 宋體、EUC 編碼、水平顯示 |
| 楷體 / 楷體 EUC | 楷體、EUC 編碼、水平顯示 |
| 仿宋體 / 仿宋體 EUC | 仿宋體、EUC 編碼、水平顯示 |
| 黑體 / 黑體 EUC | 黑體、EUC 編碼、水平顯示 |
可結合任意羅馬字型與中文字型建立複合字型。範例 PostScript 代碼定義 Times-Roman + 楷體 複合字型,ASCII 用 Times 斜體,中文用楷體:
/make EUC font {
/AsianFont exch def
/WestFont exch def
/NewFont exch def
/CIDInit /ProcSet findresource
begin
NewFont [ AsianFont WestFont ]
beginrearrangedfont
1 usefont
1
endbfrange
endrearrangedfont
end
bind def
} bind def
/LC_Times-Roman /Times-Roman /Kai-Medium make EUC font
在 DPS 繪圖時,可像使用羅馬字型般直接選用中文字型。範例 C 程式片段:
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 ...
呼叫 PSWDisplayText(中文文字) 即可顯示。DPS 亦支援 TrueType 字型。
mkdir /tmp/newfont && cd /tmp/newfontfontedit (僅支援 BDF 格式,不支援 PCF)bdftopcf -o myfont14.pcf myfont.bdffc-cache 更新快取。詳細參數請參閱 bdftopcf(1) 手冊頁。