From 6e246243fd2a9c449b4d76054132af846451baf1 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 27 Mar 2012 01:34:50 +0000 Subject: [PATCH] deal with crash causing problems with bad fonts --- app/src/processing/app/tools/CreateFont.java | 10 ++++++++-- todo.txt | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/tools/CreateFont.java b/app/src/processing/app/tools/CreateFont.java index 143728628..bc7139f44 100644 --- a/app/src/processing/app/tools/CreateFont.java +++ b/app/src/processing/app/tools/CreateFont.java @@ -116,8 +116,14 @@ public class CreateFont extends JFrame implements Tool { //String psname = fonts[i].getPSName(); //if (psname == null) System.err.println("ps name is null"); - flist[index++] = fonts[i].getPSName(); - table.put(fonts[i].getPSName(), fonts[i]); + try { + flist[index++] = fonts[i].getPSName(); + table.put(fonts[i].getPSName(), fonts[i]); + } catch (Exception e) { + // Sometimes fonts cause lots of trouble. + // http://code.google.com/p/processing/issues/detail?id=442 + e.printStackTrace(); + } } list = new String[index]; diff --git a/todo.txt b/todo.txt index 89464e7fe..aad710832 100644 --- a/todo.txt +++ b/todo.txt @@ -11,6 +11,8 @@ X seems to have been fixed earlier X Base.listFiles does not list recursively if extension is given X this is for fjen/js.. fix already contributed: X http://code.google.com/p/processing/issues/detail?id=718 +X ByteUnderflowException thrown and Font not reported +X http://code.google.com/p/processing/issues/detail?id=442 fixed earlier X Export reports "Could not copy source file" (even though it works)