Bug 862355
Summary: | The method Font.createFont() fails if no fonts are installed | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Juan Hernández <juan.hernandez> | ||||
Component: | java-1.7.0-openjdk | Assignee: | jiri vanek <jvanek> | ||||
Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.3 | CC: | acavalla, ahughes, aph, dbhole, jvanek | ||||
Target Milestone: | rc | Flags: | jvanek:
needinfo+
|
||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-09-18 13:56:06 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 861077, 1002711 | ||||||
Attachments: |
|
Description
Juan Hernández
2012-10-02 17:28:18 UTC
heads up - font-manager, as written in current openjdk, is not able to work without at least some font. To create font instance is necessary instance of fontmanager (eg because of caching, but not only because of it) . In proprietary jdk this will never happen, because they are providing default font always together with their jdk - so there is always some default font. One workaround is to provide custom fontmanager implementation: - add implementation to classpath - set -D property of sun.font.fontmanager to your class implementing fontmanager Deeper fix of this will probably need serious work on font manager, but I will check little bit deeper. Created attachment 635563 [details]
First patch
If you are running your own compiled jdk, this patch will work for you. It can take eons before it reaches packages...
There are some troubles to explain why such a fix is worthy. Do you mind to follow http://mail.openjdk.java.net/pipermail/2d-dev/2012-November/002843.html (and 5more messages in thread) and possibly add to this bug or to mailing-list explanation why such a fix can be useful? Jiri, we actually found this issue in the oVirt system. We use Jasper reports as the report generation engine and it brings its own fonts as .ttf files inside its .jar files. It doesn't use the system provided fonts for anything. Without the fix we are forced to install some font packages just to avoid the exception, even if they are not used. Does this help? Well there is question whether to install some default fonts is or is not better then to push patch to openjdk. Well, looks like Oracle's people do not want the fix. I will try some another approach. (In reply to comment #9) > See http://mail.openjdk.java.net/pipermail/2d-dev/2012-November/002869.html According to it, the fix will never pass to upstream. So the workaround - to install any font - will have to be enough. This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. Jiri, was a resolution ever reached on this? Do we depend on a font now? Hi Andrew. The latest recommendations were to install any font in case of this bug appearing. So "close workaround" is best to do. Close cant fix probably is the way to go. I did not see upstream changing mind in no forest. Can we not make the RPMs depend on a font, such as dejavu-sans-fonts as listed in comment #1? This Bugzilla has been reviewed by Red Hat and is not planned on being addressed in Red Hat Enterprise Linux 6 and therefore will be closed. If this bug is critical to production systems, please contact your Red Hat support representative and provide sufficient business justification. You haven't answered the question. Oh comment disappeared...?... So again - I'm against adding font dependency. Most people have some fonts installed so it works for them. And they dont wont another font installed. And if somebody run into this issue, he may install whatever he wonts. Or not? By the same reasoning, if you choose a common enough font, most people won't even notice a difference as they'll already have that font package installed. But it solves the problem for the minority who encounter this problem. Still the same point - why to instal any font automatically, when people cna install any font at all? Still best solution would be JDK working without them. I don't see that happening any time soon, especially when Oracle ship their JDK with a font. So actually the assigment of this bug changes to: "find/create/prepare/ some font which will not take rest of X as dependence" |