diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java old mode 100644 new mode 100755 index 35bd2efde..2fe9278a6 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -44,7 +44,7 @@ import processing.core.*; * files and images, etc) that comes from that. */ public class Base { - // Added accessors for 0218 because the UpdateCheck class was not properly + // Added accessors for 0218 because the UpdateCheck class was not properly // updating the values, because javac was inlining the static final values. static private final int REVISION = 218; /** This might be replaced by main() if there's a lib/version.txt file. */ @@ -53,8 +53,8 @@ public class Base { // static private boolean RELEASE = false; /** True if heavy debugging error/log messages are enabled */ - static public boolean DEBUG = false; -// static public boolean DEBUG = true; + // static public boolean DEBUG = false; + static public boolean DEBUG = true; static HashMap platformNames = new HashMap(); @@ -1556,7 +1556,7 @@ public class Base { static public int getRevision() { return REVISION; } - + /** * Return the version name, something like 1.5 or 2.0b8 or 0213 if it's not @@ -1566,7 +1566,7 @@ public class Base { return VERSION_NAME; } - + //................................................................... diff --git a/app/src/processing/app/Toolkit.java b/app/src/processing/app/Toolkit.java old mode 100644 new mode 100755 index 79774446b..a4656869e --- a/app/src/processing/app/Toolkit.java +++ b/app/src/processing/app/Toolkit.java @@ -233,16 +233,16 @@ public class Toolkit { } return false; } - - + + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - + // static Font monoFont; // static Font plainFont; // static Font boldFont; -// -// +// +// // static public Font getMonoFont(int size) { // if (monoFont == null) { // try { @@ -253,7 +253,7 @@ public class Toolkit { // } // return monoFont; // } -// +// // // static public Font getPlainFont(int size) { // if (plainFont == null) { @@ -265,8 +265,8 @@ public class Toolkit { // } // return plainFont; // } -// -// +// +// // static public Font getBoldFont(int size) { // if (boldFont == null) { // try { @@ -277,20 +277,21 @@ public class Toolkit { // } // return boldFont; // } - - + + static Font monoFont; static Font monoBoldFont; static Font sansFont; static Font sansBoldFont; - - + + static public Font getMonoFont(int size, int style) { if (monoFont == null) { try { monoFont = createFont("SourceCodePro-Regular.otf", size); monoBoldFont = createFont("SourceCodePro-Semibold.otf", size); } catch (Exception e) { + Base.log("Could not load mono font", e); monoFont = new Font("Monospaced", Font.PLAIN, size); monoBoldFont = new Font("Monospaced", Font.BOLD, size); } @@ -310,11 +311,11 @@ public class Toolkit { return monoFont.deriveFont((float) size); } } -// return style == Font.BOLD ? -// monoBoldFont.deriveFont((float) size) : -// monoFont.deriveFont((float) size); +// return style == Font.BOLD ? +// monoBoldFont.deriveFont((float) size) : +// monoFont.deriveFont((float) size); } - + static public Font getSansFont(int size, int style) { if (sansFont == null) { @@ -322,13 +323,14 @@ public class Toolkit { sansFont = createFont("SourceSansPro-Regular.otf", size); sansBoldFont = createFont("SourceSansPro-Semibold.otf", size); } catch (Exception e) { + Base.log("Could not load sans font", e); sansFont = new Font("Monospaced", Font.PLAIN, size); sansBoldFont = new Font("Monospaced", Font.BOLD, size); } } // System.out.println("deriving new font"); -// return style == Font.BOLD ? -// sansBoldFont.deriveFont((float) size) : +// return style == Font.BOLD ? +// sansBoldFont.deriveFont((float) size) : // sansFont.deriveFont((float) size); if (style == Font.BOLD) { if (size == sansBoldFont.getSize()) { @@ -346,8 +348,8 @@ public class Toolkit { } } } - - + + static private Font createFont(String filename, int size) throws IOException, FontFormatException { InputStream is = Base.getLibStream("fonts/" + filename); BufferedInputStream input = new BufferedInputStream(is);