From fdf6ef3693e0b91c5b20fa451e41bf2bb9932384 Mon Sep 17 00:00:00 2001 From: benfry Date: Wed, 24 Sep 2003 16:02:32 +0000 Subject: [PATCH] fixes to the font builder for windows, fixes for mac dist building, bugs.txt --- app/PdeBase.java | 9 ++++++++- app/PdeFontBuilder.java | 25 +++++++++++++++++++++++-- build/macosx/dist.sh | 18 ++++++++++-------- build/macosx/dist/DS_Store | Bin 12292 -> 12292 bytes build/shared/revisions.txt | 28 +++++++++++++++++++++------- todo.txt | 2 ++ 6 files changed, 64 insertions(+), 18 deletions(-) diff --git a/app/PdeBase.java b/app/PdeBase.java index 4784d884c..074c61579 100644 --- a/app/PdeBase.java +++ b/app/PdeBase.java @@ -1207,7 +1207,14 @@ public class PdeBase extends Frame String folder = file.getCanonicalPath(); if (platform == WINDOWS) { - Runtime.getRuntime().exec("cmd /c \"" + folder + "\""); + // doesn't work + //Runtime.getRuntime().exec("cmd /c \"" + folder + "\""); + + // works fine on winxp, prolly win2k as well + Runtime.getRuntime().exec("explorer \"" + folder + "\""); + + // not tested + //Runtime.getRuntime().exec("start explorer \"" + folder + "\""); #ifdef MACOS } else if (platform == MACOSX) { diff --git a/app/PdeFontBuilder.java b/app/PdeFontBuilder.java index 87ab46b1f..4eceb8e84 100644 --- a/app/PdeFontBuilder.java +++ b/app/PdeFontBuilder.java @@ -21,6 +21,7 @@ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + import java.awt.*; import java.awt.event.*; import java.io.*; @@ -100,15 +101,25 @@ public class PdeFontBuilder extends JFrame { // don't care about families starting with . or # // also ignore dialog, dialoginput, monospaced, serif, sansserif +#ifdef JDK13 + // getFontList is deprecated in 1.4, so this has to be used + GraphicsEnvironment ge = + GraphicsEnvironment.getLocalGraphicsEnvironment(); + + //Font fonts[] = ge.getAllFonts(); + String flist[] = ge.getAvailableFontFamilyNames(); +#else //fontSelector = new JComboBox(); String flist[] = Toolkit.getDefaultToolkit().getFontList(); +#endif + int index = 0; for (int i = 0; i < flist.length; i++) { if ((flist[i].indexOf('.') == 0) || (flist[i].indexOf('#') == 0) || (flist[i].equals("Dialog")) || (flist[i].equals("DialogInput")) || (flist[i].equals("Serif")) || (flist[i].equals("SansSerif")) || (flist[i].equals("Monospaced"))) continue; - if (i != index) flist[index++] = flist[i]; + flist[index++] = flist[i]; } list = new String[index]; System.arraycopy(flist, 0, list, 0, index); @@ -146,7 +157,17 @@ public class PdeFontBuilder extends JFrame { }); */ - sample = new JTextArea("The quick brown fox blah blah."); + sample = new JTextArea("The quick brown fox blah blah.") { + public void paintComponent(Graphics g) { + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + true ? + RenderingHints.VALUE_ANTIALIAS_ON : + RenderingHints.VALUE_ANTIALIAS_OFF); + super.paintComponent(g); + } + }; + pain.add(sample); //for (int i = 0; i < list.length; i++) { diff --git a/build/macosx/dist.sh b/build/macosx/dist.sh index 434a5bfed..4d8702023 100755 --- a/build/macosx/dist.sh +++ b/build/macosx/dist.sh @@ -4,7 +4,8 @@ if test -f /sw/bin/head then # a more useful version of head than what's included with osx - REVISION=`head -c 4 ../../todo.txt` + #REVISION=`head -c 4 ../../todo.txt` + REVISION=`head -c 4 ../../todo.txt | tail -c 2` else # can't get four bytes of head (osx doesn't support -c) REVISION=0000 @@ -16,10 +17,15 @@ echo Creating P5 distribution for revision $REVISION... # remove any old boogers rm -rf processing -rm -rf processing-* +rm -rf Processing* +#rm -rf processing-* # use 'shared' files as starting point cp -r ../shared processing + +# get rid of any boogers +rm -f processing/*~ + rm -rf processing/CVS rm -rf processing/lib/CVS rm -rf processing/fonts/CVS @@ -89,12 +95,8 @@ cp dist/lib/pde_macosx.properties processing/lib/ #unix2dos processing/lib/pde.properties_macosx 2> /dev/null # zip it all up for release -#echo Zipping and finishing... -P5=processing-$REVISION -mv processing $P5-macosx -#zip -rq $P5.zip $P5 -# nah, keep the new directory around -#rm -rf $P5 +mv processing "Processing $REVISION" + # if there is a command line tool to make a dmg from this dir.. hmm echo Done. \ No newline at end of file diff --git a/build/macosx/dist/DS_Store b/build/macosx/dist/DS_Store index 58b26bd63d293bcae1063bf27ef36c960663ffe5..282f22b6ebdaf936d9ab3fdd7a2b53df9289691f 100755 GIT binary patch delta 182 zcmZokXi1phFDlExz`)4BAi%(&$56sh!BFCvlb^hqQFbx=W_Au14zN52LlQ$NLpnn- zOwD8oLB+{}0=AO`StkbztYu^D0h$ssnGGn)C@4PJPH-VBNMzyUCxYgaRRshlYYS;i zmKEWdd{{_$auE;*3&~GjBJ^{zzmUM>wZax))#8)oL=+}-iSSRB7807QEwW*v1N+8? UuS}cSCBCstG!oq`Ap1!O0L>CE8vp9W|UpZzL}kag@aLMvWM>ja?UXOl&Q%qM$_2u+R^Qe%(#4+fLp2}w*|BqTh!SxA2J z6``MuA10p@b_c7End~Q`Fxg6ke{#K$z~o4gO_QI