From 68e81dcf998fdeb07964cbda6d4715fa933730b6 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 30 Jan 2007 03:13:03 +0000 Subject: [PATCH] fix for bug #494, sort charset passed in to PFont constructor --- core/src/processing/core/PApplet.java | 3 ++- core/src/processing/core/PFont.java | 8 ++++++++ core/todo.txt | 2 ++ todo.txt | 20 +++++++++++++++++--- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 2ba38a222..f968d98a2 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -190,7 +190,8 @@ public class PApplet extends Applet * Message of the Exception thrown when size() is called the first time. *

* This is used internally so that setup() is forced to run twice - * when the renderer is changed. Reason being that the + * when the renderer is changed. This is the only way for us to handle + * invoking the new renderer while also in the midst of rendering. */ static final String NEW_RENDERER = "new renderer"; diff --git a/core/src/processing/core/PFont.java b/core/src/processing/core/PFont.java index 4284e1806..8dc9e6c38 100644 --- a/core/src/processing/core/PFont.java +++ b/core/src/processing/core/PFont.java @@ -674,6 +674,14 @@ public class PFont implements PConstants { psname = font.getPSName(); try { + // charset needs to be sorted to make index lookup run more quickly + // http://dev.processing.org/bugs/show_bug.cgi?id=494 + //Arrays.sort(charset); + Class arraysClass = Class.forName("java.util.Arrays"); + Method sortMethod = + arraysClass.getMethod("sort", new Class[] { charset.getClass() }); + sortMethod.invoke(null, new Object[] { charset }); + // the count gets reset later based on how many of // the chars are actually found inside the font. this.charCount = (charset == null) ? 65536 : charset.length; diff --git a/core/todo.txt b/core/todo.txt index eef6521e0..00d0964d6 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -683,6 +683,8 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=104 CORE / PGraphics3D +_ images are losing pixels at the edges +_ http://dev.processing.org/bugs/show_bug.cgi?id=102 _ rect() changes size as it changes position _ http://dev.processing.org/bugs/show_bug.cgi?id=95 _ lines skip on 200x200 surface because of fixed point rounding error diff --git a/todo.txt b/todo.txt index c387ac3e4..94c0fd777 100644 --- a/todo.txt +++ b/todo.txt @@ -452,6 +452,8 @@ _ Blah.class will confuse the preproc _ http://dev.processing.org/bugs/show_bug.cgi?id=481 _ http://dev.processing.org/bugs/show_bug.cgi?id=492 _ http://dev.processing.org/bugs/show_bug.cgi?id=492 +_ non-matching curly brackets sometimes don't cause an error +_ http://dev.processing.org/bugs/show_bug.cgi?id=507 hacked for fix, needs real fix _ NullPointerException on unterminated comment at end of code @@ -469,10 +471,16 @@ PDE / Editor _ sketch marked as modified too aggressively _ http://dev.processing.org/bugs/show_bug.cgi?id=328 +_ dragging title bar while sketch running causes strange selection behavior +_ http://dev.processing.org/bugs/show_bug.cgi?id=504 _ should really be doing the 'right' thing with sketch file handling _ create temporary file when saving _ once done writing, use remove the original and rename the old _ some basic stuff like this.. +_ shortcuts not working after rename? (osx only?) +_ http://dev.processing.org/bugs/show_bug.cgi?id=505 +_ convert tabs to spaces when pasting text +_ http://dev.processing.org/bugs/show_bug.cgi?id=506 _ add "recent files" list to open menu? _ unchecking 'use external editor' sketch should not set modified _ dangerous if a version that hasn't been re-loaded has possibility @@ -808,14 +816,20 @@ _ opens sketch folder, _ and gives info about what to do next (how to edit) _ http://dev.processing.org/bugs/show_bug.cgi?id=143 _ tool to run in appletviewer? sun.applet.Main is appletviewer -_ small gray gap shows up in color picker -_ getMaximumSize() not being respected on Windows (Linux?) -_ http://dev.processing.org/bugs/show_bug.cgi?id=310 _ import sketch from url (takes a zip from archive sketch) _ ftp upload sketch _ archive sketch direct to bug report +TOOLS / Color Picker + +_ pasting into color picker doesn't update the color values +_ http://dev.processing.org/bugs/show_bug.cgi?id=503 +_ small gray gap shows up in color picker +_ getMaximumSize() not being respected on Windows (Linux?) +_ http://dev.processing.org/bugs/show_bug.cgi?id=310 + + TOOLS / Courseware _ export sketch as applet when uploading