From 640eb251c14db24a21b5696155f6804524aab9cf Mon Sep 17 00:00:00 2001 From: benfry Date: Fri, 10 Jun 2005 14:45:02 +0000 Subject: [PATCH] looking into some of the font stuff --- core/PApplet.java | 17 ++++++++++++----- core/todo.txt | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/core/PApplet.java b/core/PApplet.java index 1d9897531..39675c044 100644 --- a/core/PApplet.java +++ b/core/PApplet.java @@ -1043,7 +1043,6 @@ public class PApplet extends Applet " 1b draw"); if (frameCount == 0) { - try { //System.out.println("attempting setup"); //System.out.println("into try"); @@ -1078,7 +1077,7 @@ public class PApplet extends Applet this.width = g.width; this.height = g.height; - } else { + } else { // frameCount > 0, meaning an actual draw() // update the current framerate if (framerateLastMillis != 0) { float elapsed = (float) @@ -2831,9 +2830,17 @@ public class PApplet extends Applet * Create a .vlw font on the fly from either a font name that's * installed on the system, or from a .ttf or .otf that's inside * the data folder of this sketch. - *

- * Only works with Java 1.3 or later. - *

+ *

+ * Only works with Java 1.3 or later. Many .otf fonts don't seem + * to be supported by Java, perhaps because they're CFF based? + *

+ * Font names are inconsistent across platforms and Java versions. + * On Mac OS X, Java 1.3 uses the font menu name of the font, + * whereas Java 1.4 uses the PostScript name of the font. Java 1.4 + * on OS X will also accept the font menu name as well. On Windows, + * it appears that only the menu names are used, no matter what + * Java version is in use. Naming system unknown/untested for 1.5. + *

* Use 'null' for the charset if you want to use any of the 65,536 * unicode characters that exist in the font. Note that this can * produce an enormous file or may cause an OutOfMemoryError. diff --git a/core/todo.txt b/core/todo.txt index b0dc83170..edd6d97bb 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -15,6 +15,10 @@ X fix for copy() in java2d to make things a little speedier X make PApplet.main() for java 1.3 friendly (Color class constants) X remove call to background() in PGraphics2 +_ move font placement stuff back into PGraphics? +_ figure out how to get regular + java fonts working +_ use that do drive how the api is set up + _ change PGraphics to PGraphics2 _ or not, because PGraphics has all the base stuff for 3D _ change PGraphics2 to PGraphicsJava or PGraphicsJava2D @@ -163,6 +167,25 @@ _ how to shut off the cmd-q when running externally on osx? CORE / PFont and text() +_ font encoding issues +_ java seems to force straight windows encoding.. (problem for pi fonts) +_ opentype/cff fonts don't work with live loading from the app +_ many (all?) opentype fonts won't show up or aren't supported +_ this may be only cff fonts that have trouble +_ when encoding is not the standard encoding, problematic +_ so sonata otf and sonata don't seem to have any chars at all +_ available font issues +_ is getFontList returning a different set of fonts from device2d? +_ try it out on java 1.3 versus 1.4 +_ getAllFonts() not quite working for many fonts +_ i.e. Orator Std on windows.. macosx seems to be ok +_ is getFamilyNames() any different/better? +_ when did this break? 1.4.1? 1.4.x vs 1.3? +_ may be that cff fonts won't work? +_ or is it only those with ps names? +_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1117445969 +_ createFont not working from applets +_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1115877723;start=0 _ createFont() with a .ttf doesn't work in applets? _ throws a security exception because of the reflection stuff _ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1115877723;start=0