increase a few fonts a bit, antialias on the status

This commit is contained in:
Ben Fry
2013-10-15 23:03:36 -04:00
parent e9030acc9f
commit 4e9e24bad3
4 changed files with 14 additions and 6 deletions
+7 -1
View File
@@ -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);
}
@@ -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();