View previous topic :: View next topic |
Author |
Message |
cohesion n00b
Joined: 27 Aug 2002 Posts: 24 Location: KC, MO, USA
|
Posted: Thu Jun 19, 2003 3:18 pm Post subject: nice fonts in Java programs |
|
|
Here is the /opt/<sun-j2version>/jre/lib/font.properties for using the nice new Bitstream Vera Fonts for all of the dialogs in your Java applications. Also, due to a bug in java, copy your favorite True Type Fonts from /usr/X11R6/lib/X11/fonts/ttf|truetype/* to /opt/<sun-j2version>/jre/lib/fonts/ so that the JRE can see them. Enjoy pretty java applets!
Edit: woops! Originally posted the Win32 version! Doh! Here is the corrected version:
Edit #2: woops again! Okay, I'm certain this is the correct one. It works for me. (Sorry!) Enjoy! BTW, this also enables Unicode support that may not have been there before. If you have trouble with certain characters showing up as empty blocks, replace all occurances of 'iso10646' with 'iso8859'.
Code: | # @(#)font.properties.linux 1.7 02/03/07
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#
# Component Font Mappings
#
serif.0=-bitstream-bitstream vera serif-medium-r-normal--*-%d-*-*-p-*-iso10646-1
serif.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
serif.italic.0=-bitstream-bitstream vera serif-medium-i-normal--*-%d-*-*-p-*-iso10646-1
serif.italic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
serif.bold.0=-bitstream-bitstream vera serif-demibold-r-normal--*-%d-*-*-p-*-iso10646-1
serif.bold.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
serif.bolditalic.0=-bitstream-bitstream vera serif-demibold-i-normal--*-%d-*-*-p-*-iso10646-1
serif.bolditalic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
sansserif.0=-bitstream-bitstream vera sans-medium-r-normal-sans-*-%d-*-*-p-*-iso10646-1
sansserif.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
sansserif.italic.0=-bitstream-bitstream vera sans-medium-i-normal-sans-*-%d-*-*-p-*-iso10646-1
sansserif.italic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
sansserif.bold.0=-bitstream-bitstream vera sans-bold-r-normal-sans-*-%d-*-*-p-*-iso10646-1
sansserif.bold.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
sansserif.bolditalic.0=-bitstream-bitstream vera sans-bold-i-normal-sans-*-%d-*-*-p-*-iso10646-1
sansserif.bolditalic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
monospaced.0=-bitstream-bitstream vera sans mono-medium-r-normal-sans-*-%d-*-*-m-*-iso10646-1
monospaced.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
monospaced.italic.0=-bitstream-bitstream vera sans mono-medium-i-normal-sans-*-%d-*-*-m-*-iso10646-1
monospaced.italic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
monospaced.bold.0=-bitstream-bitstream vera sans mono-bold-r-normal-sans-*-%d-*-*-m-*-iso10646-1
monospaced.bold.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
monospaced.bolditalic.0=-bitstream-bitstream vera sans mono-bold-i-normal-sans-*-%d-*-*-m-*-iso10646-1
monospaced.bolditalic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialog.0=-bitstream-bitstream vera sans-medium-r-normal-sans-*-%d-*-*-p-*-iso10646-1
dialog.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialog.italic.0=-bitstream-bitstream vera sans-medium-i-normal-sans-*-%d-*-*-p-*-iso10646-1
dialog.italic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialog.bold.0=-bitstream-bitstream vera sans-bold-r-normal-sans-*-%d-*-*-p-*-iso10646-1
dialog.bold.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialog.bolditalic.0=-bitstream-bitstream vera sans-bold-i-normal-sans-*-%d-*-*-p-*-iso10646-1
dialog.bolditalic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialoginput.0=-bitstream-bitstream vera sans mono-medium-r-normal-sans-*-%d-*-*-m-*-iso10646-1
dialoginput.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialoginput.italic.0=-bitstream-bitstream vera sans mono-medium-i-normal-sans-*-%d-*-*-m-*-iso10646-1
dialoginput.italic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialoginput.bold.0=-bitstream-bitstream vera sans mono-bold-r-normal-sans-*-%d-*-*-m-*-iso10646-1
dialoginput.bold.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
dialoginput.bolditalic.0=-bitstream-bitstream vera sans mono-bold-i-normal-sans-*-%d-*-*-m-*-iso10646-1
dialoginput.bolditalic.1=--standard symbols l-medium-r-normal--*-%d-*-*-p-*-urw-fontspecific
# Missing Glyph Character
#
default.char=274f
# Component Font Character Encodings
#
fontcharset.serif.0=sun.io.CharToByteISO8859_1
fontcharset.serif.1=sun.awt.CharToByteSymbol
fontcharset.sansserif.0=sun.io.CharToByteISO8859_1
fontcharset.sansserif.1=sun.awt.CharToByteSymbol
fontcharset.monospaced.0=sun.io.CharToByteISO8859_1
fontcharset.monospaced.1=sun.awt.CharToByteSymbol
fontcharset.dialog.0=sun.io.CharToByteISO8859_1
fontcharset.dialog.1=sun.awt.CharToByteSymbol
fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1
fontcharset.dialoginput.1=sun.awt.CharToByteSymbol
# Exclusion Ranges
#
# XFontSet Information
#
fontset.serif.plain=\
-bitstream-bitstream vera serif-medium-r-normal--*-%d-*-*-p-*-iso10646-1
fontset.serif.italic=\
-bitstream-bitstream vera serif-medium-i-normal--*-%d-*-*-p-*-iso10646-1
fontset.serif.bold=\
-bitstream-bitstream vera serif-demibold-r-normal--*-%d-*-*-p-*-iso10646-1
fontset.serif.bolditalic=\
-bitstream-bitstream vera serif-demibold-i-normal--*-%d-*-*-p-*-iso10646-1
fontset.sansserif.italic=\
-bitstream-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.sansserif.bold=\
-bitstream-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.sansserif.bolditalic=\
-bitstream-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.sansserif.plain=\
-bitstream-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.monospaced.italic=\
-bitstream-bitstream vera sans mono-medium-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.monospaced.bold=\
-bitstream-bitstream vera sans mono-bold-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.monospaced.bolditalic=\
-bitstream-bitstream vera sans mono-bold-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.monospaced.plain=\
-bitstream-bitstream vera sans mono-medium-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.dialog.italic=\
-bitstream-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.dialog.bold=\
-bitstream-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.dialog.bolditalic=\
-bitstream-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.dialog.plain=\
-bitstream-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso10646-1
fontset.dialoginput.italic=\
-bitstream-bitstream vera sans mono-medium-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.dialoginput.bold=\
-bitstream-bitstream vera sans mono-bold-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.dialoginput.bolditalic=\
-bitstream-bitstream vera sans mono-bold-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.dialoginput.plain=\
-bitstream-bitstream vera sans mono-medium-r-normal-sans-*-%d-*-*-m-*-iso10646-1
fontset.default=\
-bitstream-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso10646-1 |
Last edited by cohesion on Fri Jun 20, 2003 2:37 am; edited 3 times in total |
|
Back to top |
|
|
Chickpea l33t
Joined: 03 Jun 2002 Posts: 846 Location: Vancouver WA
|
Posted: Thu Jun 19, 2003 3:21 pm Post subject: |
|
|
Cool!! Can't wait to try this.
Cat |
|
Back to top |
|
|
cohesion n00b
Joined: 27 Aug 2002 Posts: 24 Location: KC, MO, USA
|
Posted: Thu Jun 19, 2003 3:29 pm Post subject: Win32 version |
|
|
Since many people use both operating system and you CAN use the Vera fonts in Windows (I love them), here is the same file for Java for Windows:
Code: | # @(#)font.properties 1.13 02/03/07
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#
# Component Font Mappings
#
dialog.0=Bitstream Vera Sans,ANSI_CHARSET
dialog.1=WingDings,SYMBOL_CHARSET
dialog.2=Symbol,SYMBOL_CHARSET
dialog.bold.0=Bitstream Vera Sans Bold,ANSI_CHARSET
dialog.bold.1=WingDings,SYMBOL_CHARSET
dialog.bold.2=Symbol,SYMBOL_CHARSET
dialog.italic.0=Bitstream Vera Sans Oblique,ANSI_CHARSET
dialog.italic.1=WingDings,SYMBOL_CHARSET
dialog.italic.2=Symbol,SYMBOL_CHARSET
dialog.bolditalic.0=Bitstream Vera Sans Bold Oblique,ANSI_CHARSET
dialog.bolditalic.1=WingDings,SYMBOL_CHARSET
dialog.bolditalic.2=Symbol,SYMBOL_CHARSET
dialoginput.0=Bitstream Vera Sans Mono,ANSI_CHARSET
dialoginput.1=WingDings,SYMBOL_CHARSET
dialoginput.2=Symbol,SYMBOL_CHARSET
dialoginput.bold.0=Bitstream Vera Sans Mono Bold,ANSI_CHARSET
dialoginput.bold.1=WingDings,SYMBOL_CHARSET
dialoginput.bold.2=Symbol,SYMBOL_CHARSET
dialoginput.italic.0=Bitstream Vera Sans Mono Oblique,ANSI_CHARSET
dialoginput.italic.1=WingDings,SYMBOL_CHARSET
dialoginput.italic.2=Symbol,SYMBOL_CHARSET
dialoginput.bolditalic.0=Bitstream Vera Sans Mono Bold Oblique,ANSI_CHARSET
dialoginput.bolditalic.1=WingDings,SYMBOL_CHARSET
dialoginput.bolditalic.2=Symbol,SYMBOL_CHARSET
serif.0=Bitstream Vera Serif,ANSI_CHARSET
serif.1=WingDings,SYMBOL_CHARSET
serif.2=Symbol,SYMBOL_CHARSET
serif.bold.0=Bitstream Vera Serif Bold,ANSI_CHARSET
serif.bold.1=WingDings,SYMBOL_CHARSET
serif.bold.2=Symbol,SYMBOL_CHARSET
serif.italic.0=Bitstream Vera Serif Oblique,ANSI_CHARSET
serif.italic.1=WingDings,SYMBOL_CHARSET
serif.italic.2=Symbol,SYMBOL_CHARSET
serif.bolditalic.0=Bitstream Vera Serif Bold Oblique,ANSI_CHARSET
serif.bolditalic.1=WingDings,SYMBOL_CHARSET
serif.bolditalic.2=Symbol,SYMBOL_CHARSET
sansserif.0=Bitstream Vera Sans,ANSI_CHARSET
sansserif.1=WingDings,SYMBOL_CHARSET
sansserif.2=Symbol,SYMBOL_CHARSET
sansserif.bold.0=Bitstream Vera Sans Bold,ANSI_CHARSET
sansserif.bold.1=WingDings,SYMBOL_CHARSET
sansserif.bold.2=Symbol,SYMBOL_CHARSET
sansserif.italic.0=Bitstream Vera Sans Oblique,ANSI_CHARSET
sansserif.italic.1=WingDings,SYMBOL_CHARSET
sansserif.italic.2=Symbol,SYMBOL_CHARSET
sansserif.bolditalic.0=Bitstream Vera Sans Bold Oblique,ANSI_CHARSET
sansserif.bolditalic.1=WingDings,SYMBOL_CHARSET
sansserif.bolditalic.2=Symbol,SYMBOL_CHARSET
monospaced.0=Bitstream Vera Sans Mono,ANSI_CHARSET
monospaced.1=WingDings,SYMBOL_CHARSET
monospaced.2=Symbol,SYMBOL_CHARSET
monospaced.bold.0=Bitstream Vera Sans Mono Bold,ANSI_CHARSET
monospaced.bold.1=WingDings,SYMBOL_CHARSET
monospaced.bold.2=Symbol,SYMBOL_CHARSET
monospaced.italic.0=Bitstream Vera Sans Mono Oblique,ANSI_CHARSET
monospaced.italic.1=WingDings,SYMBOL_CHARSET
monospaced.italic.2=Symbol,SYMBOL_CHARSET
monospaced.bolditalic.0=Bitstream Vera Sans Mono Bold Oblique,ANSI_CHARSET
monospaced.bolditalic.1=WingDings,SYMBOL_CHARSET
monospaced.bolditalic.2=Symbol,SYMBOL_CHARSET
# Font File Names
#
filename.Bitstream_Vera_Sans=Vera.TTF
filename.Bitstream_Vera_Sans_Bold=VeraBd.TTF
filename.Bitstream_Vera_Sans_Oblique=VeraIt.TTF
filename.Bitstream_Vera_Sans_Bold_Oblique=VeraBI.TTF
filename.Bitstream_Vera_Sans_Mono=VeraMono.TTF
filename.Bitstream_Vera_Sans_Mono_Bold=VeraMoBd.TTF
filename.Bitstream_Vera_Sans_Mono_Oblique=VeraMoIt.TTF
filename.Bitstream_Vera_Sans_Mono_Bold_Oblique=VeraMoBI.TTF
filename.Bitstream_Vera_Serif=VeraSe.TTF
filename.Bitstream_Vera_Serif_Bold=VeraSeBd.TTF
filename.Bitstream_Vera_Serif_Oblique=VeraSe.TTF
filename.Bitstream_Vera_Serif_Bold_Oblique=VeraSeBd.TTF
filename.WingDings=WINGDING.TTF
filename.Symbol=SYMBOL.TTF
# Missing Glyph Character
#
default.char=2751
# Component Font Character Encodings
#
fontcharset.dialog.0=sun.io.CharToByteCp1252
fontcharset.dialog.1=sun.awt.windows.CharToByteWingDings
fontcharset.dialog.2=sun.awt.CharToByteSymbol
fontcharset.dialoginput.0=sun.io.CharToByteCp1252
fontcharset.dialoginput.1=sun.awt.windows.CharToByteWingDings
fontcharset.dialoginput.2=sun.awt.CharToByteSymbol
fontcharset.serif.0=sun.io.CharToByteCp1252
fontcharset.serif.1=sun.awt.windows.CharToByteWingDings
fontcharset.serif.2=sun.awt.CharToByteSymbol
fontcharset.sansserif.0=sun.io.CharToByteCp1252
fontcharset.sansserif.1=sun.awt.windows.CharToByteWingDings
fontcharset.sansserif.2=sun.awt.CharToByteSymbol
fontcharset.monospaced.0=sun.io.CharToByteCp1252
fontcharset.monospaced.1=sun.awt.windows.CharToByteWingDings
fontcharset.monospaced.2=sun.awt.CharToByteSymbol
# Exclusion Ranges
#
exclusion.dialog.0=0500-20ab,20ad-ffff
exclusion.dialoginput.0=0500-20ab,20ad-ffff
exclusion.serif.0=0500-20ab,20ad-ffff
exclusion.sansserif.0=0500-20ab,20ad-ffff
exclusion.monospaced.0=0500-20ab,20ad-ffff
# Text Input Character Set
#
inputtextcharset=ANSI_CHARSET |
|
|
Back to top |
|
|
IWBCMAN Guru
Joined: 25 Jun 2002 Posts: 474
|
Posted: Tue Jul 15, 2003 2:10 pm Post subject: |
|
|
although there is still no anti-aliasing going on-I followed your instructions and all I can say is WOW-massive difference....I really, really like this
I had just downloaded sun-one and netbeans and their IDE's were deplorable, as far as fonts go,I simply have an allergic reaction to standard windows fonts....now everything is clearly legible, I don't need to squint and it looks pretty damned good, if I may say so.
thanks for your effort..... |
|
Back to top |
|
|
Lazlo n00b
Joined: 25 Jan 2003 Posts: 66 Location: Gl. Lejre, Denmark
|
Posted: Sat Sep 13, 2003 8:22 pm Post subject: Make it part of the ebuild |
|
|
It does look kinda cool.
It would be cool to have as a part of the gentoo java ebuild.
I get this error though:
Code: | Warning: Cannot convert string "-bitstream-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct
|
|
|
Back to top |
|
|
pascall Tux's lil' helper
Joined: 29 Aug 2002 Posts: 101 Location: Montreal, Qc
|
Posted: Sat Oct 04, 2003 12:34 pm Post subject: |
|
|
Small problem here...
here 's what i did (i m using blackdown jdk 1.4.1) :
1. Moved my /opt.../font.properties to font.properties.back
2. Created a new font.properties with the one u r giving
3. copied the ttf files from /usr/share/fonts/ttf-bistream-vera to /opt/.../lib/fonts
Problem is that now, every time I try to start an applet external to the web browser (I mainly use a chat applet that pops in its own window), the java vm seems to stall. I ve looked in the java console and there is no error message at all...
Have I forgotten something ? Do I have to regenerate the fonts.dir files and if so how to do it ?
Thanks for your help,
Pascal |
|
Back to top |
|
|
Yuber Tux's lil' helper
Joined: 08 Jan 2003 Posts: 139
|
Posted: Wed Oct 29, 2003 5:43 pm Post subject: |
|
|
how do you get anti aliasing to work? |
|
Back to top |
|
|
karan Tux's lil' helper
Joined: 15 Feb 2003 Posts: 117 Location: New Zealand
|
Posted: Fri Nov 28, 2003 2:32 pm Post subject: |
|
|
Ahh very cool indeed. Thanks for the great post. _________________ :: Project Gotham |
|
Back to top |
|
|
warer n00b
Joined: 26 Oct 2002 Posts: 38
|
Posted: Fri Feb 20, 2004 10:32 pm Post subject: |
|
|
OK i have done as described above with blackdown, the fonts changed.
(They didn't get any nicer more like worse in my opinion)
but my java programs still display square og ? for unicode chars.
Any ideas? |
|
Back to top |
|
|
diddledan n00b
Joined: 05 Jan 2004 Posts: 63 Location: United Kingdom
|
Posted: Sat Feb 21, 2004 1:27 pm Post subject: |
|
|
I can't seem to find Bitstream Vera fonts on my system... Where can I get them from? |
|
Back to top |
|
|
warer n00b
Joined: 26 Oct 2002 Posts: 38
|
Posted: Sun Feb 22, 2004 5:24 pm Post subject: |
|
|
emerge ttf-bitstream-vera |
|
Back to top |
|
|
diddledan n00b
Joined: 05 Jan 2004 Posts: 63 Location: United Kingdom
|
Posted: Sun Feb 22, 2004 8:41 pm Post subject: |
|
|
aha, thankoo for that - bitstream fonts now installed |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|