diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 61f82f09d..a4e9bd87e 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -2148,7 +2148,8 @@ public class Base { /** * Get reference to a file adjacent to the executable on Windows and Linux, - * or inside Contents/Resources/Java on Mac OS X. + * or inside Contents/Resources/Java on Mac OS X. This will return the local + * JRE location, *whether or not it is the active JRE*. */ static public File getContentFile(String name) { if (processingRoot == null) { diff --git a/app/src/processing/app/ui/Toolkit.java b/app/src/processing/app/ui/Toolkit.java index 4965dea6e..eed7e579c 100644 --- a/app/src/processing/app/ui/Toolkit.java +++ b/app/src/processing/app/ui/Toolkit.java @@ -888,11 +888,11 @@ public class Toolkit { * Get a font from the JRE lib/fonts folder. Our default fonts are also * installed there so that the monospace (and others) can be used by other * font listing calls (i.e. it appears in the list of monospace fonts in - * the Preferences window). + * the Preferences window, and can be used by HTMLEditorKit for WebFrame). */ static private Font createFont(String filename, int size) throws IOException, FontFormatException { - //InputStream is = Base.getLibStream("fonts/" + filename); - File fontFile = new File(System.getProperty("java.home"), "lib/fonts/" + filename); + //File fontFile = new File(System.getProperty("java.home"), "lib/fonts/" + filename); + File fontFile = new File(Base.getJavaHome(), "lib/fonts/" + filename); if (!fontFile.exists()) { // if we're debugging from Eclipse, grab it from the work folder (user.dir is /app) fontFile = new File(System.getProperty("user.dir"), "../build/shared/lib/fonts/" + filename);