Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
Summary: The Java plugin does not report available fonts accurately
https://bugzilla.redhat.com/show_bug.cgi?id=525870
Summary: The Java plugin does not report available fonts accurately Product: Fedora Version: rawhide Platform: All OS/Version: Linux Status: NEW Severity: medium Priority: low Component: java-1.6.0-openjdk AssignedTo: langel@redhat.com ReportedBy: nicolas.mailhot@laposte.net QAContact: extras-qa@fedoraproject.org CC: dbhole@redhat.com, mark@klomp.org, langel@redhat.com, fedora-fonts-bugs-list@redhat.com, lkundrak@v3.sk Blocks: 473302 Classification: Fedora
Description of problem:
The Java plugin does not report available fonts accurately. Samplers such as http://www.codestyle.org/css/font-family/sampler-Unix.shtml collect incomplete info
Version-Release number of selected component (if applicable): java-1.6.0-openjdk-plugin-1.6.0.0-31.b16.fc12.x86_64
How reproducible: Always
Steps to Reproduce: 1. Get a F11 or rawhide system 2. Install our fonts # yum -y install $(repoquery --whatprovides "font(*)") 3. List them $ fc-list : family |sort 4. Open http://www.codestyle.org/css/font-family/sampler-Unix.shtml 5. Let the applet run, check its result
Actual results: The java-detected font list is incomplete (for example it's missing STIX) and does not use the same names at fontconfig
Expected results: The same list in both cases
Additional info:
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
Omair Majid omajid@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |omajid@redhat.com AssignedTo|rruss@redhat.com |omajid@redhat.com
--- Comment #3 from Omair Majid omajid@redhat.com 2010-07-02 11:39:58 EDT --- Just some thoughts about missing fonts:
The Java runtime searches /usr/share/fonts/stix (and other folders) but does not find any type of fonts that it recognizes. The JDK source code seems to indicate that only X11 native fonts, FreeType and Postscript Type 1 fonts are supported or recognized. This would explain why fonts like STIX (an OpenType font) are not recognized.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #4 from Nicolas Mailhot nicolas.mailhot@laposte.net 2010-07-02 13:04:23 EDT --- It seems to have been fixed upstream
http://blogs.sun.com/openjdk/entry/openjdk_roundup1
"adding support for OpenType/CFF fonts"
it would be nice if the fix was pushed Fedora-side too. We have lots (30%) of OpenType/CFF fonts in the distro.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #5 from Omair Majid omajid@redhat.com 2010-11-16 13:25:10 EST --- Support for opentype fonts has been added in OpenJDK6. See commits:
http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/b577c70564b8 http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/acb763ebef95
These should be part of the next OpenJDK6 source drop. IcedTea6 1.10 should include these fixes.
Note that even with this patch, the fonts listed are not identical. OpenJDK does not support X11 bitmap fonts. There is also a slight naming difference - OpenJDK names the fonts using just the English parts of the font name shown by fc-list.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #6 from Nicolas Mailhot nicolas.mailhot@laposte.net 2010-11-16 13:52:23 EST --- (In reply to comment #5)
Support for opentype fonts has been added in OpenJDK6. See commits:
http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/b577c70564b8 http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/acb763ebef95
These should be part of the next OpenJDK6 source drop. IcedTea6 1.10 should include these fixes.
Thanks!
Note that even with this patch, the fonts listed are not identical. OpenJDK does not support X11 bitmap fonts.
That's a feature
There is also a slight naming difference - OpenJDK names the fonts using just the English parts of the font name shown by fc-list.
This part won't work. Not all fonts have English names (it can be trivially be checked by running repo-font-audit from fontpackages-tools on a Fedora, RHEL or Centos repository, this is one of its checks)
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #7 from Omair Majid omajid@redhat.com 2010-11-16 15:55:28 EST --- (In reply to comment #6)
(In reply to comment #5)
Note that even with this patch, the fonts listed are not identical. OpenJDK does not support X11 bitmap fonts.
That's a feature
Heh. :)
There is also a slight naming difference - OpenJDK names the fonts using just the English parts of the font name shown by fc-list.
This part won't work. Not all fonts have English names (it can be trivially be checked by running repo-font-audit from fontpackages-tools on a Fedora, RHEL or Centos repository, this is one of its checks)
Hm.. So I downloaded all packages in the group Font and ran this tool against a new repo containing those packages. I still have no clue what I am looking for :/
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #8 from Nicolas Mailhot nicolas.mailhot@laposte.net 2010-11-17 02:16:03 EST --- See the last part of http://www.redhat.com/archives/fedora-fonts-list/2009-June/msg00001.html
for example (this is an *old* repo-font-audit report, many font packages have been added since)
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #9 from Omair Majid omajid@redhat.com 2010-11-19 09:51:33 EST --- (In reply to comment #8)
See the last part of http://www.redhat.com/archives/fedora-fonts-list/2009-June/msg00001.html
for example (this is an *old* repo-font-audit report, many font packages have been added since)
Are you talking about "packages with localized metadata but no English variant" section? I tried out installing sazanami-gothic-fonts (which my local repo-font-audio report also pointed out) and fc-list shows "Sazanami Gothic,さざなみゴシック" (it still has an english name).
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #10 from Omair Majid omajid@redhat.com 2010-11-19 09:54:24 EST --- Update: I just installed every single fedora (13) font package. 'fc-list : family' does not show me any fonts without an English name. I must be missing something.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #11 from Nicolas Mailhot nicolas.mailhot@laposte.net 2010-11-19 13:53:58 EST --- fc-list :family is a summary. To really see what's in a font file you need to use fc-query
$ fc-query /usr/share/fonts/sazanami/gothic/sazanami-gothic.ttf Pattern has 20 elts (size 32) family: "Sazanami Gothic"(s) "さざなみゴシック"(s) familylang: "ar"(s) "ja"(s)
So sazanami does not have an English name, it has an Arabic and Japanese name
$ fc-query /usr/share/fonts/gfs-theokritos/GFSTheokritos.otf Pattern has 19 elts (size 32) family: "GFS Theokritos"(s) familylang: "el"(s)
And this one only declares a Greek name
It's pure luck than in both cases the non-English name was filled with an English string, you can't rely on it for a general-purpose java engine
Also when you filter the names declared by fonts, that means all the CSS-y dialects people use nowadays can fail (because they can reference one of the names you've filtered out).
IIRC there have been efforts to expose the Postscript font name in fontconfig recently in addition to the TrueType one, because some pdf generators are fond of using this font name in their font references, so software that filters those names out can not display the resulting files correctly.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #12 from Omair Majid omajid@redhat.com 2010-11-22 18:21:57 EST --- (In reply to comment #11)
fc-list :family is a summary. To really see what's in a font file you need to use fc-query
$ fc-query /usr/share/fonts/sazanami/gothic/sazanami-gothic.ttf Pattern has 20 elts (size 32) family: "Sazanami Gothic"(s) "さざなみゴシック"(s) familylang: "ar"(s) "ja"(s)
So sazanami does not have an English name, it has an Arabic and Japanese name
$ fc-query /usr/share/fonts/gfs-theokritos/GFSTheokritos.otf Pattern has 19 elts (size 32) family: "GFS Theokritos"(s) familylang: "el"(s)
And this one only declares a Greek name
It's pure luck than in both cases the non-English name was filled with an English string, you can't rely on it for a general-purpose java engine
Ah, thanks for the explanation. I dug into the OpenJDK source code to find that Java picks one name for every font. The name is either the the last english name in the font file or (if there is no english name) the first non-english name. So Java should not have problems handing the actual fonts, but it may not associate the right localized name with the font (based on your localization settings).
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |MODIFIED
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #13 from Fedora Update System updates@fedoraproject.org 2011-01-18 11:17:10 EST --- java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-48.1.8.4....
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #14 from Fedora Update System updates@fedoraproject.org 2011-01-18 11:25:43 EST --- java-1.6.0-openjdk-1.6.0.0-50.1.9.4.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-50.1.9.4....
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #15 from Fedora Update System updates@fedoraproject.org 2011-01-18 11:27:21 EST --- java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-48.1.8.4....
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #16 from Fedora Update System updates@fedoraproject.org 2011-01-18 16:29:43 EST --- java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update java-1.6.0-openjdk'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-48.1.8.4....
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #17 from Fedora Update System updates@fedoraproject.org 2011-01-19 16:05:36 EST --- java-1.6.0-openjdk-1.6.0.0-50.1.9.4.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Fixed In Version| |java-1.6.0-openjdk-1.6.0.0- | |50.1.9.4.fc14 Resolution| |ERRATA Last Closed| |2011-01-19 16:06:04
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
--- Comment #18 from Fedora Update System updates@fedoraproject.org 2011-01-19 16:09:18 EST --- java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=525870
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|java-1.6.0-openjdk-1.6.0.0- |java-1.6.0-openjdk-1.6.0.0- |50.1.9.4.fc14 |48.1.8.4.fc13
fonts-bugs@lists.fedoraproject.org