diff --git a/build/windows/launcher/launcher.cpp b/build/windows/launcher/launcher.cpp index 0cf781cc4..fa79155fe 100644 --- a/build/windows/launcher/launcher.cpp +++ b/build/windows/launcher/launcher.cpp @@ -197,7 +197,8 @@ WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow) loaddir, loaddir, loaddir, loaddir, env_classpath); - //MessageBox(NULL, cp, "it's twoo! it's twoo!", MB_OK); + //MessageBox(NULL, qtjava_path, "qtjava", MB_OK); + //MessageBox(NULL, cp, "cp outgoing", MB_OK); if (!SetEnvironmentVariable("CLASSPATH", cp)) { MessageBox(NULL, "Could not set CLASSPATH environment variable", diff --git a/build/windows/launcher/processing.exe b/build/windows/launcher/processing.exe index 3834b2036..ac2c3847b 100755 Binary files a/build/windows/launcher/processing.exe and b/build/windows/launcher/processing.exe differ diff --git a/core/PGraphics.java b/core/PGraphics.java index 6f0c7bf38..ea0df8f7e 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -1736,8 +1736,9 @@ public class PGraphics extends PImage implements PConstants { public void textFont(PFont which) { if (which != null) { textFont = which; - textSize(which.size); textFontNative = which.font; + textFontNativeMetrics = null; + textSize(which.size); } else { throw new RuntimeException("a null PFont was passed to textFont()"); diff --git a/core/PGraphics2.java b/core/PGraphics2.java index 70e324a7c..38df50bc9 100644 --- a/core/PGraphics2.java +++ b/core/PGraphics2.java @@ -679,20 +679,23 @@ public class PGraphics2 extends PGraphics { * will get recorded properly. */ public void textSize(float size) { - // take care of setting the textSize and textLeading vars - super.textSize(size); - // if a native version available, subset this font if (textFontNative != null) { textFontNative = textFontNative.deriveFont(size); g2.setFont(textFontNative); textFontNativeMetrics = g2.getFontMetrics(textFontNative); } + + // take care of setting the textSize and textLeading vars + // this has to happen second, because it calls textAscent() + // (which requires the native font metrics to be set) + super.textSize(size); } protected float textWidthImpl(char buffer[], int start, int stop) { if (textFontNative == null) { + //System.out.println("native is null"); return super.textWidthImpl(buffer, start, stop); } // maybe should use one of the newer/fancier functions for this? diff --git a/core/todo.txt b/core/todo.txt index ce22102a1..d65b80f07 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -54,7 +54,10 @@ _ and i don't want an additional "pathVertex()" function _ "this file is named" errors don't like subdirectories _ need to strip off past the file separator or something + _ stop() not getting called +_ http://dev.processing.org/bugs/show_bug.cgi?id=183 +_ major problem for libraries _ and start() is supposedly called by the applet viewer _ http://java.sun.com/j2se/1.4.2/docs/api/java/applet/Applet.html#start() _ need to track this stuff down a bit