# HG changeset patch # User prr # Date 1296077217 28800 # Node ID 4980e459a3a7aefcd262fccfa6dec8edc162255e # Parent f97fecd0df7f9e42245d4409b5134c2e3217596a 6940890: Java doesn't pick up the correct fontconfig files in latest Solaris Next builds Reviewed-by: bae, igor diff -r f97fecd0df7f -r 4980e459a3a7 jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java --- a/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Wed Jan 26 11:46:40 2011 -0800 +++ b/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Wed Jan 26 13:26:57 2011 -0800 @@ -95,6 +95,22 @@ String line = br.readLine(); if (line.indexOf("OpenSolaris") >= 0) { isOpenSolaris = true; + } else { + /* We are using isOpenSolaris as meaning + * we know the Solaris commercial fonts aren't + * present. "Solaris Next" (03/10) did not + * include these even though its was not + * OpenSolaris. Need to revisit how this is + * handled but for now as in 6ux, we'll use + * the test for a standard font resource as + * being an indicator as to whether we need + * to treat this as OpenSolaris from a font + * config perspective. + */ + String courierNew = + "/usr/openwin/lib/X11/fonts/TrueType/CourierNew.ttf"; + File courierFile = new File(courierNew); + isOpenSolaris = !courierFile.exists(); } fis.close(); }