LINUX下安裝oracle的java字型問題

foxmile發表於2007-12-12
2. Java , Installanywhere 在 Redhat 上的中文問題解決方法     jacklondon [原作]

標準 jre/jdk 中只帶了 redhat 6 的 font.properties, 我在 redhat 7.3 和 redhat 8.0 上都不能用。我們需要建一個 font.properties.zh.Redhat 放在 redhat 的 jre/lib 目錄下。開啟 /usr/lib/X11/fonts/ttf-zh 或者 /usr/share/fonts/zh_CN/TrueType 下面的 font.dir, 將其中的一箇中文字型名複製下來,比如 -misc-ZYSong18030-medium-r-normal--0-0-0-0-c-0-iso10646-1,按照 java 的字型規則改為 -misc-ZYSong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1,將 font.properties.zh 中的內容複製到 font.properties.zh.Redhat 中。

我選用字型 -misc-ZYSong18030-medium-r-normal--0-0-0-0-c-0-iso10646-1 是因為在 redhat 7.3 和 redhat 8.0 上都能用。

因為 jre/jdk 找不到 Redhat 的 true type 字型,在檔案 font.properties.zh.Redhat 最後加入

appendedfontpath=/usr/lib/X11/fonts/ttf-zh
appendedfontpath=/usr/share/fonts/zh_CN/TrueType

將字型名全部替換成 -misc-ZYSong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/79499/viewspace-442/,如需轉載,請註明出處,否則將追究法律責任。

相關文章