From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Subject: Re: Java fontconfig issues Date: Sun, 1 Dec 2019 00:53:40 +0100 Message-ID: <20191201005340.3ef68e83@alma-ubu> References: <20191116115724.68eb6f31@terracrypt.net> <20191129005016.3a034b2e@alma-ubu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/ZYALMQpZl7sQ6zojG41mZyb"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:51315) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibCYf-00022F-0Z for help-guix@gnu.org; Sat, 30 Nov 2019 18:53:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibCYc-0006xY-KB for help-guix@gnu.org; Sat, 30 Nov 2019 18:53:48 -0500 Received: from m4s11.vlinux.de ([83.151.27.109]:58646 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ibCYc-0006tF-8y for help-guix@gnu.org; Sat, 30 Nov 2019 18:53:46 -0500 In-Reply-To: <20191129005016.3a034b2e@alma-ubu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Jonathan Frederickson Cc: help-guix@gnu.org --Sig_/ZYALMQpZl7sQ6zojG41mZyb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Some more analysis: Creating a simple logger file: $ cat logging.properties = =20 handlers=3Djava.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=3DALL java.util.logging.ConsoleHandler.formatter=3Djava.util.logging.SimpleFormat= ter Then debugging the font loading process: In a Guix container with JDK11: $ java -Dsun.java2d.debugfonts=3Dtrue -Djava.util.logging.config.file=3Dlogging.properties -cp . Main Nov 30, 201= 9 11:34:07 PM sun.awt.X11FontManager registerFontDir INFO: ParseFontDir /gnu/store/vpily8s5ad5ryb27p88mxprs5xv3m0vm-openjdk-11.2= 8-jdk/lib/fonts Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration INFO: Creating standard Font Configuration Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.15.0-65-generic.properti= es Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.15.0-65-generic.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.15.0-65-generic.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.15.0-65-generic.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findFontConfigFile INFO: Did not find a fontconfig file. Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration INFO: Creating standard Font Configuration Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.15.0-65-generic.properti= es Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.15.0-65-generic.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.4.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.15.0-65-generic.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.15.0-65-generic.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.4.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxpr= s5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.properties Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl INFO: Looking for binary fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mx= prs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.bfc Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findFontConfigFile INFO: Did not find a fontconfig file. Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for sans:regular:roman Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for sans:bold:roman Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for sans:regular:italic Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for sans:bold:italic Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for serif:regular:roman Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for serif:bold:roman Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for serif:regular:italic Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for serif:bold:italic Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for monospace:regular:roman Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for monospace:bold:roman Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for monospace:regular:italic Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no font for monospace:bold:italic Nov 30, 2019 11:34:09 PM sun.font.FontConfigManager initFontConfigFonts INFO: Fontconfig returned no fonts at all. Nov 30, 2019 11:34:09 PM sun.font.FcFontConfiguration warning WARNING: Failed to get info from libfontconfig Nov 30, 2019 11:34:09 PM sun.font.FcFontConfiguration warning WARNING: Failed to get info from libfontconfig Exception in thread "main" java.lang.InternalError: java.lang.reflect.Invoc= ationTargetException at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:= 86) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory= .java:74) at java.desktop/sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(Sun= GraphicsEnvironment.java:189) at java.desktop/sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNa= mes(SunGraphicsEnvironment.java:223) at java.desktop/sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNa= mes(SunGraphicsEnvironment.java:251) at java.desktop/sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFam= ilyNames(HeadlessGraphicsEnvironment.java:75) at Main.main(Main.java:8) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstanc= e0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstanc= e(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newIns= tance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:49= 0) at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:= 84) ... 7 more Caused by: java.lang.NullPointerException at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.jav= a:1262) at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfigura= tion.java:225) at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107) at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontMana= ger.java:719) at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:367) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.desktop/sun.font.SunFontManager.(SunFontManager.java:312) at java.desktop/sun.awt.FcFontManager.(FcFontManager.java:35) at java.desktop/sun.awt.X11FontManager.(X11FontManager.java:56) ... 12 more In that same environment, if I add fontsconfig as a package, the same error occours, but fontconfig finds fonts: $ fc-list=20 /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/p052023l.pfb: URW Palladio L:style=3DItalic /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/b018015l.pfb: URW Bookman L:style=3DDemi Bold /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/n022004l.pfb: Nimbus Mono L:style=3DBold /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/n022023l.pfb: Nimbus Mono L:style=3DRegular Oblique /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/c059013l.pfb: Century Schoolbook L:style=3DRoman /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/n021024l.pfb: Nimbus Roman No9 L:style=3DMedium Italic /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/b018012l.pfb: URW Bookman L:style=3DLight /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/a010015l.pfb: URW Gothic L:style=3DDemi /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/b018032l.pfb: URW Bookman L:style=3DLight Italic /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1= /ghostscript/a010033l.pfb: URW Gothic L:style=3DBook Oblique [..] But in a container with icedtea@3: fonts are found: Nov 30, 2019 11:41:16 PM sun.awt.X11FontManager registerFontDir INFO: ParseFontDir /gnu/store/05flqf4bqwwj4zwl2vqiqg0dlb1alzm8-icedtea-3.7.= 0-jdk/jre/lib/fonts Nov 30, 2019 11:41:16 PM sun.awt.FontConfiguration INFO: Creating standard Font Configuration Nov 30, 2019 11:41:16 PM sun.awt.FontConfiguration INFO: Creating standard Font Configuration Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts INFO: Time spent accessing fontconfig=3D563ms. Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts INFO: FC font sans:regular:roman maps to family Nimbus Sans L in file /gnu/= store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghos= tscript/n019003l.pfb Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts INFO: Family=3DNimbus Sans L Style=3DRegular Fullname=3Dnull File=3D/gnu/st= ore/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghosts= cript/n019003l.pfb Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts INFO: Family=3DDingbats Style=3DRegular Fullname=3Dnull File=3D/gnu/store/8= ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript= /d050000l.pfb Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts INFO: Family=3DStandard Symbols L Style=3DRegular Fullname=3Dnull File=3D/g= nu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/g= hostscript/s050000l.pfb Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts INFO: FC font sans:bold:roman maps to family Nimbus Sans L in file /gnu/sto= re/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostsc= ript/n019004l.pfb Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts [...] INFO: Registered file /gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-= 8.11/share/fonts/type1/ghostscript/a010035l.pfb as font ** Type1 Font: Fami= ly=3DURW Gothic L Name=3DURW Gothic L Demi Oblique style=3D3 fileName=3D/gn= u/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/gh= ostscript/a010035l.pfb rank=3D4 Century Schoolbook L Dialog DialogInput Dingbats Monospaced Nimbus Mono L Nimbus Roman No9 L Nimbus Sans L SansSerif Serif Standard Symbols L URW Bookman L URW Chancery L URW Gothic L URW Palladio L Bj=C3=B6rn --Sig_/ZYALMQpZl7sQ6zojG41mZyb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXeMBBAAKCRC/KGy2WT5f /ewFAJ91p6ooz4SRwG8Tx1ZGOePK/VDz4QCfdLZgoIYkXdEz3pJvkOm9QzKc14A= =mogY -----END PGP SIGNATURE----- --Sig_/ZYALMQpZl7sQ6zojG41mZyb--