remove hint(ENABLE_NATIVE_FONTS)

This commit is contained in:
benfry
2012-12-15 22:02:22 +00:00
parent 55330b617f
commit 2c3ad34caa
6 changed files with 25 additions and 18 deletions
+2
View File
@@ -438,7 +438,9 @@ public interface PConstants {
// hints - hint values are positive for the alternate version,
// negative of the same value returns to the normal/default state
@Deprecated
static final int ENABLE_NATIVE_FONTS = 1;
@Deprecated
static final int DISABLE_NATIVE_FONTS = -1;
static final int DISABLE_DEPTH_TEST = 2;
+1 -1
View File
@@ -388,7 +388,7 @@ public class PFont implements PConstants {
}
// See if there's a native version of this font that can be used,
// in case that's of interest later.
findNative();
// findNative();
}
+11 -5
View File
@@ -1072,7 +1072,13 @@ public class PGraphics extends PImage implements PConstants {
* @see PApplet#createGraphics(int, int, String, String)
* @see PApplet#size(int, int)
*/
@SuppressWarnings("deprecation")
public void hint(int which) {
if (which == ENABLE_NATIVE_FONTS ||
which == DISABLE_NATIVE_FONTS) {
showWarning("hint(ENABLE_NATIVE_FONTS) no longer supported. " +
"Use createFont() instead.");
}
if (which > 0) {
hints[which] = true;
} else {
@@ -3935,11 +3941,11 @@ public class PGraphics extends PImage implements PConstants {
public void textFont(PFont which) {
if (which != null) {
textFont = which;
if (hints[ENABLE_NATIVE_FONTS]) {
//if (which.font == null) {
which.findNative();
//}
}
// if (hints[ENABLE_NATIVE_FONTS]) {
// //if (which.font == null) {
// which.findNative();
// //}
// }
/*
textFontNative = which.font;
+5 -6
View File
@@ -15,7 +15,11 @@ X window at this point. And re-opening a new winodw is a lot of mess.
X Better all around to just encourage the use of sketchFullScreen()
X or cmd/ctrl-shift-R in the PDE.
X make notes about methods removed from JSON to be conservative
X remove default findNative() that was enabling native fonts w/ p5
o when using loadFont(), don't enable native fonts unless hint() in use
o but on createFont(), we're probably OK
o might need to make reference notes about the two behaviors
X decision: remove hint(ENABLE_NATIVE_FONTS)
_ PImage.resize() greater than loaded image size hangs Java App
_ http://code.google.com/p/processing/issues/detail?id=1463
@@ -65,11 +69,6 @@ X saveTable("filename.tsv") or saveTable("filename.txt", "tsv")
X createTable() method in PApplet
X removed getUniqueXxxx() and some others, pending names
o when using loadFont(), don't enable native fonts unless hint() in use
o but on createFont(), we're probably OK
o might need to make reference notes about the two behaviors
_ decision: remove hint(ENABLE_NATIVE_FONTS)
_ implement mousePressed(Event) etc
_ better to do this instead of bringing back the magic event
_ or implementing the magic event on Android
@@ -60,13 +60,15 @@ public class PGraphicsPDF extends PGraphicsJava2D {
/** Shared across instances because it's incredibly time-consuming to create. */
static protected DefaultFontMapper mapper;
static protected String fontList[];
static protected String[] fontList;
/*
public PGraphicsPDF() {
// PDF always likes native fonts. Always.
hint(ENABLE_NATIVE_FONTS);
}
*/
public void setPath(String path) {
+3 -5
View File
@@ -30,11 +30,9 @@ X add basics of retina support to the toolbar and header
X getDefaultToolkit().getDesktopProperty("apple.awt.contentScaleFactor");
X paper over ArrayIndexOutOfBoundsException in JEditTextArea.xToOffset()
_ deal with underscores and "Find in Reference"
_ http://code.google.com/p/processing/issues/detail?id=1474
_ unable to open the URL link to reference after updated to 2.0b7
_ http://code.google.com/p/processing/issues/detail?id=1465
X "Find in Reference" largely broken in 2.0b7
C http://code.google.com/p/processing/issues/detail?id=1456
_ shouldn't we be splitting the reference?
earlier
X include debug mode as 'experimental'?