|
|
The fonts provided with Sun's JVM for Linux SUCK. How can I replace them? |
|
Joachim Deelen wrote:
I've copied the Windows TTF fonts (Arial, Times New Roman, and Courier New) to the Linux jre/lib/fonts directory. Made the fonts.scale with the command ttmkfdir -o fonts.scale. This converts the TTF fonts to the linux font names. Then you have to create the fonts.dir with the command "mkfontdir" command. This will copy the fonts.scale to the fonts.dir file. Now comes the most stupid task: You have to edit the fonts.property file for your locale. This is very boring because you have to specify a name for each entry. i.E.
sans.0=-monotype-Times New Roman-medium-r-normal--*-%d-*-*-p-*0-iso8859-1 sans.1=.... . . . dialog.0=.... You have to do this for each font and style which means italic, bold, etc.
[EDITOR'S NOTE: Copying the *.ttf files from Windows probably violates Microsoft's license, but if you're machine dual-boots Windows and Linux as mine
does, I don't see how Microsoft can prevail if they sue you over it...] | |
| Here are some links to more font information:
http://www.jguru.com/faq/view.jsp?EID=229424 http://java.sun.com/products/java-media/2D/forDevelopers/java2dfaq.html 2001-Mar-29 4:18pm gyles19@visi.com | |
| Cynthia Jeness writes:
I installed j2sdk1.3.0 from Sun, but had a very similar error message. In order to fix this, I changed the various symbol lines in the font.properties file like this;
FROM: --symbol-medium-r-normal--*-%d-*-*p-*-adobe-fontspecific
TO: -urw-symbol-medium-r-normal--*-%d-*-*p-*-urw-fontspecific
This change was made based on examining the fonts that I actually have
available on my system which is a stock RedHat 7.0 plus necessry patches.
So basically, you need to make the font.properties match what you actually
have avaialble. | |
| I've put together a website explaining how to change the fonts to look like they do under MS Windows. Here is the URL: http://www.leewo.net/java 2001-Apr-28 9:36pm derek@leewo.net | |
| Help..This fix didn't work for me and I feel I'm on the brink of insanity so early in my Java career. Please save me from pulling out my Win2K install disks. I have the Sun JDK outside of the because *NOTHING* worked with the Jbuilder 4 packaged JDK on RH7.1. Since I installed 1.3.1 and referenced that new JVM within JBuilder - it at least starts up, but the fonts suck as everyone has stated. I've gone through the acclaimed routine of copying windows fonts - ALL OF THEM, to my /usr/java/jdk1.3.1/jre/lib/fonts and running the appropiate commands to create fonts.scale and fonts.dir. My font.properties lists the new fonts - here is an example of just one of them: When I run... [root@ASP-20 bin]# ./jbuilder Font specified in font.properties not found [-monotype-Courier New-bold-i-normal--0-0-0-0-m-0-iso8859-1] but My font.properties has this one listed: monospaced.bolditalic.0=-monotype-Courier New-bold-i-normal--0-0-0-0-m-0-iso8859-1and those fonts were listed in fonts.dir following the process of copying the fonts from windows - and running the appropriate commands. Here is my fonts.dir refernceing the font: COURBD.TTF -monotype-Courier New-bold-r-normal--0-0-0-0-m-0-iso8859-1WHAT COULD BE WRONG HERE?? THANKS! 2001-Jun-26 6:38am chrisa@aspatech.com.br | |
| I think your font.properties file is using incorrect format for naming the fonts. Mine looks like this:
# Serif font definition # serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1 serif.1=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1 #replace .1 font line if you have zapf fonts #serif.1=--zapf dingbats-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific serif.2=--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific Your question implies your font.properties file replaces the * with 0. I don't think that's correct. The fonts.dir file itself refers to them like this:
LucidaBrightItalic.ttf -b&h-lucidabright-medium-i-normal--0-0-0-0-p-0-iso8859-1 LucidaBrightRegular.ttf -b&h-lucidabright-medium-r-normal--0-0-0-0-p-0-iso8859-1 2001-Jun-27 11:39am gyles19@visi.com | |
| Still doesn't work. My case is very like chrisa@aspatech.com.br 's, I'm using RedHat 7.1 and JBuilder 4, since JBuilder 4 JDK doesn't work on RedHat 7.1, I install Sun JDK 1.3.1. I copy courier.ttf, courierbd.ttf, courierbi.ttf and courieri.ttf, timesXX.ttf and arialXX.ttf to /usr/java/jdk1.3.1/jre/lib/fonts, and run the command to generate fonts.dir file, I used derek@leewo.net 's step by step, copy font.properties from his site, doesn't work. I also tried gyles19@visi.com's change -0- to -*-, still doesn't work. So I rollback fonts.dir and font.properties, and according to an article from www.borland.com, copy symbol.ttf to fonts folder, add one line to fonts.dir, "Font can not found" error message disappeared, but the fonts are still suck. Looks like Java has different way to handle -urw-, -b&h- and -monotype- font. With symbol.ttf, the line I add to fonts.dir is symbol.ttf -urw-symbol-... ..., so Java recognize it. But ttmkfdir generate font as -monotype-Times New Roman-... ..., so Java will not recognize them. Any idea what' wrong with it? Thanks. 2001-Aug-04 6:53pm weigao@hotmail.com | |
| I'm waiting for my personal6 to arrive via UPS, so I took the time to play with ttf (in general) on Linux. I have RedHat 7.2 To really get a feel for installing fonts, I read the various howto's ("Font Deuglification Howto", etc) on the web and went for it. I know this does not specifically deal with JBuilder, rather the base platform, but I think it provides some insight to the issues involved. Anyway, I now have all the fonts working under RedHat 7.2, here are some hints: 0) It helps to start your machine in runlevel 3 while debugging font problems, since X won't start if they break badly. Use "startx" from the command line. See /etc/inittab (initdefault). 1) xfs doesn't open tcp sockets by default. It's turned off in the config file. See the xfs manpage, esp. "no-listen". X needs to be able to connect to tcp. Note that 7100 is the default port for xfs. 2) The XF86Config-4 file should need only one FontPath if xfs is working right: "unix/:7100" 3) The ttf files should all be in lower case, with no spaces. There are scripts in the howto's to help with this. 4) There is a "webfonts" rpm file (on rpmfind.net) that will dump a bunch of MS ttf fonts in "/usr/X11R6/lib/X11/fonts/webfonts/". I fixed up the names, as well as the ones I got off my 'Doze box at work, and copied them into /usr/share/fonts/TrueType for good measure. 5) Rebooting the box (or just restarting xfs) will generate the appropriate fonts.dir and fonts.scale files automagically under /usr/share/fonts/TrueType. X needs to be restarted, too -- "ctrl-alt-backspace". 6) When everything works, the xfontsel command will show "microsoft" (as well as other new entries) under the "fndry" option list. I know this is kind of off-topic but I think it may have some relevance to the problems, and potential solutions. --- John 2002-May-01 12:30am FlashFyre_2000@yahoo.com | |
| After receiving my new JB6, I had a lot of problems with fonts. Mostly, neither jB6 or the jre seemed to accept my ttfs. Trying to edit the font.properties file just seemed to make it worse. Good news, though--after installing j2sdk1.4.0 all my font problems went away. Even better, installing mozilla rc2 and the java plugin from 1.4.0 also stopped mozilla from crashing on my font testing app. BTW, my last post had a lot of stuff that might not apply in the regular case. On my other RH 7.2 boxes I can just drop ttf fonts into /usr/share/fonts/default/TrueType and reboot, then mozilla and X can use them. The reason I had problems was from hacking my nvidia board into XFree...that ginked up my XF86Config. Very pleased with the performance, stability and fonts of my JB6 personal and j2sdk1.4.0 under RH 7.2 now.
2002-May-13 4:08pm FlashFyre_2000@yahoo.com | |
| [Append to This Answer] | |
| 2002-May-13 4:08pm |
| Previous: |
|
| Next: |
|
| ||||||||
|
Java Community
Java Tools |
Code Central JB OpenTools |
Community Recent Threads |
Borland Chat Chat FAQ |
||||||||||||||
|
Feature Matrices 3.0 | 3.5 | 4.0 5.0 | 6.0 | 7.0 |
Shop for JBuilder |
JBuilder Downloads and reg keys |
Report Piracy | ||||||||||||||
|
Online Manuals 4.0 | 5.0 | 6.0 7.0 |
Borland DevSupport's Bug/RFE Form Quality Central Client |
JB Patches & Updates |
JBuilder FAQs TIs | ||||||||||||||
|
JBuilder Newsgroups |
Tamaracka's News Archive |
Mr. Haki's JBuilder Machine |
JGuru's JBuilder FAQ |
||||||||||||||
|
Sun's Bug Parade |
|||||||||||||||||
|
|||||||||||||||||