Summary: | dev-java/icedtea6-bin-1.4 uses unavailable default fonts | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | quazgar <quazgar> |
Component: | [OLD] Java | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | alchark, dark.shadow, eric225125, evadim, griffon26, kjackie, lifeissecret, n-roeser, quazgar, serge |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 247140, 300769 | ||
Attachments: |
ugly font example for java
tvbrowser-ugly-font.png |
Description
quazgar
2009-04-15 18:48:43 UTC
Created attachment 188482 [details]
ugly font example for java
An example of how a java swing application looks like with icedtea6-bin.
Unlike Fedora, Ubuntu and SuSE, Gentoo uses the default fontconfig, as there is no special clause to handle Gentoo: protected void setOsNameAndVersion() { super.setOsNameAndVersion(); if (!osName.equals("Linux")) { return; } try { File f; if ((f = new File("/etc/lsb-release")).canRead()) { /* Ubuntu and (perhaps others) use only lsb-release. * Syntax and encoding is compatible with java properties. * For Ubuntu the ID is "Ubuntu". */ Properties props = new Properties(); props.load(new FileInputStream(f)); osName = props.getProperty("DISTRIB_ID"); osVersion = props.getProperty("DISTRIB_RELEASE"); } else if ((f = new File("/etc/redhat-release")).canRead()) { osName = "RedHat"; osVersion = getVersionString(f); } else if ((f = new File("/etc/SuSE-release")).canRead()) { osName = "SuSE"; osVersion = getVersionString(f); } else if ((f = new File("/etc/turbolinux-release")).canRead()) { osName = "Turbo"; osVersion = getVersionString(f); } else if ((f = new File("/etc/fedora-release")).canRead()) { osName = "Fedora"; osVersion = getVersionString(f); } else if ((f = new File("/etc/sun-release")).canRead()) { osName = "Sun"; osVersion = getVersionString(f); } catch (Exception e) { if (SunGraphicsEnvironment.debugFonts) { Logger logger = Logger.getLogger("sun.awt.FontConfiguration"); logger.warning("Exception identifying Linux distro."); } } We could easily enough patch this to check /etc/gentoo-release and use our own dedicated fontconfig. I'm not sure it's just the fontconfig files, I copied what we have in sun-jdk-1.6 (fontconfig.properties and .src and .bfc) and it still looks ugly, non-aliased etc. Unlink sun-jdk, icedtea6 doesn't use X style font settings (e.g. -misc-dejavu sans-bold-r-normal--0-0-0-0-p-0-iso10646-1). It use the human readable font names instead (e.g. DejaVu Sans). But it seems the settings in fontconfig.properties doesn't use media-libs/fontconfig, and we need to give it the paths of the font files. I've tried to set sansserif.*, serif.*, etc in fontconfig.properties to "Sans Serif", "Serif", or "DejaVu Sans". It doesn't work at all. Ideally I think icedtea should support fontconfig and dump fontconfig.properties completely. I am hitting this bug for dev-java/icedtea6-1.6.2-r1 from java-overlay as well. (Should this go into a separate bug report?) I did the following: # umask 0022 # sed -e 's/ LGC / /' -e 's/_LGC_/_/' -e 's/-lgc//' -e 's/LGC//' /usr/lib/icedtea6/jre/lib/fontconfig.properties.src > /usr/lib/icedtea6/jre/lib/fontconfig.properties This improved the situation for me (the newly generated file has higher priority than the existing .bfd file). http://java.sun.com/javase/6/docs/technotes/guides/intl/fontconfig.html explains how fontconfig files are searched by the JRE. For russian lang fonts unusable: http://gallery.evadim.ru/d/443-2/2009-09-21-145031.png java: dev-java/icedtea6-1.6.2-r2 USE="javascript nsplugin -cacao -debug -doc -examples -nio2 -pulseaudio -systemtap -xrender -zero" 0 kB [1] [1] /usr/local/layman/java-overlay (In reply to comment #5) > I did the following: > # umask 0022 > # sed -e 's/ LGC / /' -e 's/_LGC_/_/' -e 's/-lgc//' -e 's/LGC//' > /usr/lib/icedtea6/jre/lib/fontconfig.properties.src > > /usr/lib/icedtea6/jre/lib/fontconfig.properties Note that DejaVu (as installed by media-fonts/dejavu-2.29) doesn't have oblique serif font files, only "real" italics, so the above command should maybe rather be # sed -e 's/ LGC / /' -e 's/_LGC_/_/' -e 's/-lgc//' -e 's/LGC//' -e 's/Serif-Oblique/Serif-Italic/' -e 's/Serif-BoldOblique/Serif-BoldItalic/' fontconfig.properties.src > fontconfig.properties.new I hitted an issue with missing glyphs for Cyrillic characters in sci-geosciences/josm. The problem seems to stem from the .src suffix in the fontconfig.properties files that Gentoo ebuilds install for icedtea. I copied fontconfig.Fedora.properties.src to fontconfig.properties, and now I see nice DejaVu fonts, including Cyrillic glyphs. (Using dev-java/icedtea-6.1.8.0) A copy of the Fedora fontset is provided for Gentoo by a patch for 1.7.4 and 1.8.1 in java-overlay. Please try this and report back. (In reply to comment #9) > A copy of the Fedora fontset is provided for Gentoo by a patch for 1.7.4 and > 1.8.1 in java-overlay. Please try this and report back. > Works for me, thanks! (dev-java/icedtea-6.1.8.1-r1) Released in icedtea6-bin-1.8.1-r1 as well. (In reply to comment #9) > A copy of the Fedora fontset is provided for Gentoo by a patch for 1.7.4 and > 1.8.1 in java-overlay. Please try this and report back. > work for me too A fixed version is now stable, closing. Created attachment 352616 [details]
tvbrowser-ugly-font.png
With icedtea-bin-6.1.12.5 (current stable in tree), I still have the problem as described in this bug, see attached screenshot of a tvbrowser dialog window. So it is not fixed. With the sun-jdk, there are no such problems. IIRC, icedtea-bin-7 shows the same problem.
Now that sun-jdk has become hard-masked, and icedtea-bin is considered the way to go, this is really not ideal. With sun-jdk unmasked and installed, icedtea-bin is still drawn in, as it is no longer optional which jvm one chooses.
|