From 4e9e24bad38b85a3ccf8c5a429fabc1f36cbf36d Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 15 Oct 2013 23:03:36 -0400 Subject: [PATCH] increase a few fonts a bit, antialias on the status --- app/src/processing/app/EditorLineStatus.java | 8 +++++++- app/src/processing/app/syntax/TextAreaPainter.java | 7 ++++--- build/shared/lib/theme.txt | 4 ++-- todo.txt | 1 + 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/src/processing/app/EditorLineStatus.java b/app/src/processing/app/EditorLineStatus.java index dc1a842fb..ff7a1bacd 100644 --- a/app/src/processing/app/EditorLineStatus.java +++ b/app/src/processing/app/EditorLineStatus.java @@ -23,6 +23,7 @@ package processing.app; import java.awt.*; + import javax.swing.*; @@ -87,6 +88,10 @@ public class EditorLineStatus extends JComponent { public void paintComponent(Graphics g) { + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); + g.setColor(background); Dimension size = getSize(); g.fillRect(0, 0, size.width, size.height); @@ -94,7 +99,8 @@ public class EditorLineStatus extends JComponent { g.setFont(font); g.setColor(foreground); int baseline = (high + g.getFontMetrics().getAscent()) / 2; - g.drawString(text, 6, baseline); + // With 7u40 (or Source Code Sans?) things seem to be edged up a bit + g.drawString(text, 6, baseline - 1); } diff --git a/app/src/processing/app/syntax/TextAreaPainter.java b/app/src/processing/app/syntax/TextAreaPainter.java index e143438f6..88d338ba8 100644 --- a/app/src/processing/app/syntax/TextAreaPainter.java +++ b/app/src/processing/app/syntax/TextAreaPainter.java @@ -462,9 +462,10 @@ public class TextAreaPainter extends JComponent implements TabExpander { antialias ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); - - g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, - RenderingHints.VALUE_FRACTIONALMETRICS_ON); + + // no effect, one way or the other +// g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, +// RenderingHints.VALUE_FRACTIONALMETRICS_ON); tabSize = fm.charWidth(' ') * ((Integer)textArea.getDocument().getProperty(PlainDocument.tabSizeAttribute)).intValue(); diff --git a/build/shared/lib/theme.txt b/build/shared/lib/theme.txt index ab31f72e8..95bcad988 100755 --- a/build/shared/lib/theme.txt +++ b/build/shared/lib/theme.txt @@ -38,7 +38,7 @@ buttons.status.font = processing.sans,plain,13 buttons.status.color = #ffffff # MODE SELECTOR -mode.button.font = processing.sans,plain,12 +mode.button.font = processing.sans,plain,13 # outline color of the mode button mode.button.color = #ffffff @@ -46,7 +46,7 @@ mode.button.color = #ffffff # The editor line number status bar at the bottom of the screen linestatus.color = #ffffff linestatus.bgcolor = #29333d -linestatus.font = processing.sans,plain,12 +linestatus.font = processing.sans,plain,13 linestatus.height = 20 diff --git a/todo.txt b/todo.txt index 8de12e48e..efe63fc95 100644 --- a/todo.txt +++ b/todo.txt @@ -149,6 +149,7 @@ X remove Java FX during Windows builds X remove javafx from the embed X more about optional files: X http://www.oracle.com/technetwork/java/javase/jdk-7-readme-429198.html +_ exclude 'fonts' folder from build (since it's going into the JRE) _ update github instructions _ only JRE needed at this point _ switched over to Java 7