fix for bug #494, sort charset passed in to PFont constructor

This commit is contained in:
benfry
2007-01-30 03:13:03 +00:00
parent 9f7b3ecdd8
commit 68e81dcf99
4 changed files with 29 additions and 4 deletions
+2 -1
View File
@@ -190,7 +190,8 @@ public class PApplet extends Applet
* Message of the Exception thrown when size() is called the first time.
* <P>
* 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";
+8
View File
@@ -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;
+2
View File
@@ -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
+17 -3
View File
@@ -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