Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get the JVM use the ttf-tahoma-replacement font under Linux ?

843807Oct 13 2009 — edited Oct 16 2009
Hello.
At first, we made a GUI Java application which runs under Windows XP. Our IDE is NetBeans 6.5. and we use the Tahoma font for all components..
Now, we want to execute the same application under Ubuntu Linux but compiled under Windows XP.
The Tahoma font doesn't natively exist under Linux, so

1. We downloaded this package : http://packages.ubuntu.com/fr/karmic/ttf-tahoma-replacement
and We installed it with this command :
 dpkg -i ttf-tahoma-replacement_1.1.30-0ubuntu2_all.deb
2. We informed the system by this command and the link :
sudi fc-cache -f -v
3. cd /usr/lib/jvm/java-6.../jre
 mkdir fallback
    cd fallback
    ln -s /usr/share/font/truetype/ttf-tahoma-replacement
4. In our software, I implemented getAllFonts()
http://www.java2s.com/Code/JavaAPI/java.awt/GraphicsEnvironmentgetAvailableFontFamilyNames.htm
After execution, this function returns all the fonts and we can see Tahoma. This is OK.
But, the graphical components still keep the Ubuntu default font
How can we manage to get the JVM use this ttf-tahoma-replacement font ?
Thank you for your answer.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2009
Added on Oct 13 2009
7 comments
719 views