unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: Jonathan Frederickson <jonathan@terracrypt.net>
Cc: help-guix@gnu.org
Subject: Re: Java fontconfig issues
Date: Sun, 1 Dec 2019 00:53:40 +0100	[thread overview]
Message-ID: <20191201005340.3ef68e83@alma-ubu> (raw)
In-Reply-To: <20191129005016.3a034b2e@alma-ubu>

[-- Attachment #1: Type: text/plain, Size: 13749 bytes --]

Some more analysis:


Creating a simple logger file:

$ cat logging.properties                                                                         
handlers=java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter


Then debugging the font loading process:

In a Guix container with JDK11:

$ java -Dsun.java2d.debugfonts=true
-Djava.util.logging.config.file=logging.properties -cp . Main Nov 30, 2019 11:34:07 PM sun.awt.X11FontManager registerFontDir
INFO: ParseFontDir /gnu/store/vpily8s5ad5ryb27p88mxprs5xv3m0vm-openjdk-11.28-jdk/lib/fonts
Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration <init>
INFO: Creating standard Font Configuration
Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl
INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxprs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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 <init>
INFO: Creating standard Font Configuration
Nov 30, 2019 11:34:08 PM sun.awt.FontConfiguration findImpl
INFO: Looking for text fontconfig file : /gnu/store/vpily8s5ad5ryb27p88mxprs5xv3m0vm-openjdk-11.28-jdk/lib/fontconfig.Linux.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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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/vpily8s5ad5ryb27p88mxprs5xv3m0vm-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.InvocationTargetException
	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(SunGraphicsEnvironment.java:189)
	at java.desktop/sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:223)
	at java.desktop/sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:251)
	at java.desktop/sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(HeadlessGraphicsEnvironment.java:75)
	at Main.main(Main.java:8)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	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.java:1262)
	at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
	at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
	at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.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.<init>(SunFontManager.java:312)
	at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
	at java.desktop/sun.awt.X11FontManager.<init>(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 
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/p052023l.pfb: URW Palladio L:style=Italic
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/b018015l.pfb: URW Bookman L:style=Demi Bold
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/n022004l.pfb: Nimbus Mono L:style=Bold
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/n022023l.pfb: Nimbus Mono L:style=Regular Oblique
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/c059013l.pfb: Century Schoolbook L:style=Roman
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/n021024l.pfb: Nimbus Roman No9 L:style=Medium Italic
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/b018012l.pfb: URW Bookman L:style=Light
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/a010015l.pfb: URW Gothic L:style=Demi
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/b018032l.pfb: URW Bookman L:style=Light Italic
/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/a010033l.pfb: URW Gothic L:style=Book 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 <init>
INFO: Creating standard Font Configuration
Nov 30, 2019 11:41:16 PM sun.awt.FontConfiguration <init>
INFO: Creating standard Font Configuration
Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts
INFO: Time spent accessing fontconfig=563ms.
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/ghostscript/n019003l.pfb
Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts
INFO: Family=Nimbus Sans L Style=Regular Fullname=null File=/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/n019003l.pfb
Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts
INFO: Family=Dingbats Style=Regular Fullname=null File=/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/d050000l.pfb
Nov 30, 2019 11:41:17 PM sun.font.FontConfigManager initFontConfigFonts
INFO: Family=Standard Symbols L Style=Regular Fullname=null File=/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/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/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/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: Family=URW Gothic L Name=URW Gothic L Demi Oblique style=3 fileName=/gnu/store/8ppj83wc1mmrdydh9cy7vqvg0bym8l0q-gs-fonts-8.11/share/fonts/type1/ghostscript/a010035l.pfb rank=4
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örn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

      reply	other threads:[~2019-11-30 23:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16 16:57 Java fontconfig issues Jonathan Frederickson
2019-11-28 23:50 ` Björn Höfling
2019-11-30 23:53   ` Björn Höfling [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191201005340.3ef68e83@alma-ubu \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=help-guix@gnu.org \
    --cc=jonathan@terracrypt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).