Red Hat Bugzilla – Bug 478480
TextLayout constructor depends on fonts to not throw Error
Last modified: 2010-11-24 09:19:35 EST
Created attachment 327976 [details]
a short test program calling the TextLayout constructor with default arguments
Description of problem:
I use apache batik to render svg files into png files on a web server. When using openjdk my rendering fails due to the use of java.awt.font.TextLayout whose constructor expects system fonts.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Verify that 'rpm -qa|grep fonts' turns out empty, and there are no fonts on your el5 system
2. Compile and run the attached program.
An 107 lines long stack trace starting with
Exception in thread "main" java.lang.Error: Probable fatal error:No fonts found.
Successful execution of the program.
when running it using jre-1.6.0_11-fcs from java.sun.com or when running the openjdk version on a workstation with full X/gnome setup the test program executes without any errors
This problem still persists in java-1.6.0-openjdk-22.214.171.124-0.25.b09.el5 from the recent 5.3 release
I have found that installing 'liberation-fonts' solves this problem, so adding a dependency on that package seems like a simple and effective solution.
I can verified that by adding:
to openjdk spec file does solve this bug.
Man Lung Wong
Martin Matejovic have created new OpenJDK RPMs which now properly check if liberation-fonts is installed. I'm going to run our tests against these new unofficial RPMs.
Created attachment 435492 [details]
Try this Patch
*** Bug 647054 has been marked as a duplicate of this bug. ***
Reproduced with IcedTea 1.7.4 - see the duplicate above.
Linked from https://jira.jboss.org/browse/JBPAPP-5338
I don't think this is bug. How can you expect correct behavior of text components when you remove all fonts?