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:
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle. Changing version to '13'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
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.
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.
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.
(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)
(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 :/
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)
(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).
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.
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.
(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).
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.fc13
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.fc14
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.fc13
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.
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.