You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core/jre8 comes with a fontconfig.properties and fonts/ directory under $(hab pkg path core/jre8)/lib
core/corretto8 is missing such assets though, the following minimal test case fails:
$ cat <<EOF > Fonts.javaimport java.awt.GraphicsEnvironment;public class Fonts { public static void main(String... args) { String[] fonts = GraphicsEnvironment .getLocalGraphicsEnvironment() .getAvailableFontFamilyNames(); for (String font : fonts) { System.out.println(font); } }}EOF
$ hab pkg install core/corretto8
$ hab pkg exec core/corretto8 javac Fonts.java
$ hab pkg exec core/corretto8 java FontsException in thread "main" java.lang.NullPointerException at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219) at sun.awt.FontConfiguration.init(FontConfiguration.java:107) at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774) at sun.font.SunFontManager$2.run(SunFontManager.java:431) at java.security.AccessController.doPrivileged(Native Method) at sun.font.SunFontManager.<init>(SunFontManager.java:376) at sun.awt.FcFontManager.<init>(FcFontManager.java:35) at sun.awt.X11FontManager.<init>(X11FontManager.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83) at java.security.AccessController.doPrivileged(Native Method) at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74) at sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(SunGraphicsEnvironment.java:190) at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:224) at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:252) at sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(HeadlessGraphicsEnvironment.java:94) at Fonts.main(Fonts.java:7)
I'm lost at how to approach a proper fix. core/liberation-fonts-ttf seems to provide some fonts in the Habitat package ecosystem, but I can't make heads or tails of the fontconfig.properties file that seems to configure available fonts
core/jre8
comes with afontconfig.properties
andfonts/
directory under$(hab pkg path core/jre8)/lib
core/corretto8
is missing such assets though, the following minimal test case fails:Copying the assets from jre8 makes it work:
I'm lost at how to approach a proper fix.
core/liberation-fonts-ttf
seems to provide some fonts in the Habitat package ecosystem, but I can't make heads or tails of thefontconfig.properties
file that seems to configure available fontsSee also: corretto/corretto-8#64
The text was updated successfully, but these errors were encountered: