As bug 6416177 exist, Java didn't official support SuSe10 for CCKJ. In case you need run some java application show in CCKJ, do there have any workaround? Here is a step about how to config font support for JDK:

  • Check what types of font SuSe support for your language

Go to '/usr/X11R6/lib/X11/fonts/truetype and view file 'fonts.dir', you will see map between true type font file and it's supported font like this:

FZSongTi.ttf -founder-songti-medium-i-normal-0-0-0-0-c-0-gb18030-0

Try to pick up fonts from that list for JDK's 5 logical font families:

  1. serif: plain, bold, italic, bolditalic
  2. sansserif: plain, bold, italic, bolditalic
  3. monospaced: plain, bold, italic, bolditalic
  4. dialog: plain, bold, italic, bolditalic
  5. dialoginput: plain, bold, italic, bolditalic

Abviously, you can use one font represent all of those logical fonts. It's you prefer.

  • Make change in fontconfig file 

Go to directory <JDK HOME>/jre/lib/, view file 'fontconfig.SuSE.properties.src'. You will see it only support charset 'iso8859-1'. We need put our language's support into it.

For example, we want use '-founder-songti-medium-i-normal-0-0-0-0-c-0-gb18030-0' for logical font 'serif.plain'. We need put following into that fontconfig file:

serif.plain.zh-1=-founder-songti-medium-i-normal-*-%d-*-*-c-*-gb18030-0

Please map all logical fonts to our phyical font alias following about way. After that, we need change the 'Search Sequences' to 'sequence.allfonts=latin-1,zh-1' and put font file names we used into file:

filename.-founder-fangsong-medium-r-normal-*-%d-*-*-c-*-gb18030-0=/usr/X11R6/lib/X11/fonts/truetype/FZFangSong.ttf

Also, we need put following line in file:

awtfontpath.zh-1=/usr/X11R6/lib/X11/fonts/truetype

Here is fully sample on my test machine. Restart application, and enjoys!

Comments:

Post a Comment:
Comments are closed for this entry.

This blog copyright 2009 by leonfan