Skip to content

Commit 0f6f3d5

Browse files
committed
remove hint(ENABLE_NATIVE_FONTS)
1 parent 6643e6b commit 0f6f3d5

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

core/src/processing/core/PConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ public interface PConstants {
438438
// hints - hint values are positive for the alternate version,
439439
// negative of the same value returns to the normal/default state
440440

441+
@Deprecated
441442
static final int ENABLE_NATIVE_FONTS = 1;
443+
@Deprecated
442444
static final int DISABLE_NATIVE_FONTS = -1;
443445

444446
static final int DISABLE_DEPTH_TEST = 2;

core/src/processing/core/PFont.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public PFont(InputStream input) throws IOException {
388388
}
389389
// See if there's a native version of this font that can be used,
390390
// in case that's of interest later.
391-
findNative();
391+
// findNative();
392392
}
393393

394394

core/src/processing/core/PGraphics.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,13 @@ protected void reapplySettings() {
10721072
* @see PApplet#createGraphics(int, int, String, String)
10731073
* @see PApplet#size(int, int)
10741074
*/
1075+
@SuppressWarnings("deprecation")
10751076
public void hint(int which) {
1077+
if (which == ENABLE_NATIVE_FONTS ||
1078+
which == DISABLE_NATIVE_FONTS) {
1079+
showWarning("hint(ENABLE_NATIVE_FONTS) no longer supported. " +
1080+
"Use createFont() instead.");
1081+
}
10761082
if (which > 0) {
10771083
hints[which] = true;
10781084
} else {
@@ -3935,11 +3941,11 @@ public float textDescent() {
39353941
public void textFont(PFont which) {
39363942
if (which != null) {
39373943
textFont = which;
3938-
if (hints[ENABLE_NATIVE_FONTS]) {
3939-
//if (which.font == null) {
3940-
which.findNative();
3941-
//}
3942-
}
3944+
// if (hints[ENABLE_NATIVE_FONTS]) {
3945+
// //if (which.font == null) {
3946+
// which.findNative();
3947+
// //}
3948+
// }
39433949
/*
39443950
textFontNative = which.font;
39453951

core/todo.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ X window at this point. And re-opening a new winodw is a lot of mess.
1515
X Better all around to just encourage the use of sketchFullScreen()
1616
X or cmd/ctrl-shift-R in the PDE.
1717
X make notes about methods removed from JSON to be conservative
18-
18+
X remove default findNative() that was enabling native fonts w/ p5
19+
o when using loadFont(), don't enable native fonts unless hint() in use
20+
o but on createFont(), we're probably OK
21+
o might need to make reference notes about the two behaviors
22+
X decision: remove hint(ENABLE_NATIVE_FONTS)
1923

2024
_ PImage.resize() greater than loaded image size hangs Java App
2125
_ http://code.google.com/p/processing/issues/detail?id=1463
@@ -65,11 +69,6 @@ X saveTable("filename.tsv") or saveTable("filename.txt", "tsv")
6569
X createTable() method in PApplet
6670
X removed getUniqueXxxx() and some others, pending names
6771

68-
o when using loadFont(), don't enable native fonts unless hint() in use
69-
o but on createFont(), we're probably OK
70-
o might need to make reference notes about the two behaviors
71-
_ decision: remove hint(ENABLE_NATIVE_FONTS)
72-
7372
_ implement mousePressed(Event) etc
7473
_ better to do this instead of bringing back the magic event
7574
_ or implementing the magic event on Android

java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ public class PGraphicsPDF extends PGraphicsJava2D {
6060

6161
/** Shared across instances because it's incredibly time-consuming to create. */
6262
static protected DefaultFontMapper mapper;
63-
static protected String fontList[];
63+
static protected String[] fontList;
6464

6565

66+
/*
6667
public PGraphicsPDF() {
6768
// PDF always likes native fonts. Always.
6869
hint(ENABLE_NATIVE_FONTS);
6970
}
71+
*/
7072

7173

7274
public void setPath(String path) {

todo.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ X add basics of retina support to the toolbar and header
3030
X getDefaultToolkit().getDesktopProperty("apple.awt.contentScaleFactor");
3131
X paper over ArrayIndexOutOfBoundsException in JEditTextArea.xToOffset()
3232

33-
_ deal with underscores and "Find in Reference"
34-
_ http://code.google.com/p/processing/issues/detail?id=1474
35-
36-
_ unable to open the URL link to reference after updated to 2.0b7
37-
_ http://code.google.com/p/processing/issues/detail?id=1465
33+
X "Find in Reference" largely broken in 2.0b7
34+
C http://code.google.com/p/processing/issues/detail?id=1456
35+
_ shouldn't we be splitting the reference?
3836

3937
earlier
4038
X include debug mode as 'experimental'?

0 commit comments

Comments
 (0)