[kaffe] PATCH: default AWT font handling

jserv at linux2.cc.ntu.edu.tw jserv at linux2.cc.ntu.edu.tw
Thu Jul 8 05:52:30 PDT 2004

Hello all,

  Here is my patch to Kaffe's AWT for handling its default font.
I think java/awt/Defaults.java has something wrong due to its
location, and I moved it to kaffe.awt package.

Follow the instructions:
  # cd kaffe
  # patch -p0 < use-kaffe-awt-defaults.diff
  # rm -f libraries/javalib/java/awt/Defaults.java
  # make

  After rebuild rt.jar, reate java/awt/font.properties according 
to the toolkit you use. Take Xlib for example:

$ cat kaffe/libraries/clib/awt/X/font.properties 
Default      = -adobe-helvetica-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
Monospaced   = -adobe-courier-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
SansSerif    = -adobe-helvetica-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
Serif        = -adobe-times-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
Dialog       = -misc-fixed-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
DialogInput  = -b&h-lucidatypewriter-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
ZapfDingbats = -adobe-new century
Courier      = -adobe-courier-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
Helvetica    = -adobe-helvetica-%s-%s-*-*-*-%d-%d-%d-*-*-*-*
TimesRoman   = -adobe-times-%s-%s-*-*-*-%d-%d-%d-*-*-*-*

  It's easier for Kaffe to switch the core fonts with different
languages via changing the context of java/awt/font.properties,
and we could even change font handling policy with locales, such
as font.properties.zh_TW if you use zh_TW (Traditional Chinese).

Jim Huang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-kaffe-awt-defaults.diff.gz
Type: application/octet-stream
Size: 11104 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20040708/0e8432b9/attachment-0002.obj 

More information about the kaffe mailing list