Added font anti-aliasing
This commit is contained in:
@@ -122,6 +122,8 @@ public final class Main implements Runnable {
|
|||||||
if (IUpgrader.NOW_UPGRADER.parseArguments(getVersionNumber(), args))
|
if (IUpgrader.NOW_UPGRADER.parseArguments(getVersionNumber(), args))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
System.setProperty("awt.useSystemAAFontSettings", "on");
|
||||||
|
System.setProperty("swing.aatext", "true");
|
||||||
System.setProperty("sun.java2d.noddraw", "true");
|
System.setProperty("sun.java2d.noddraw", "true");
|
||||||
System.setProperty("sun.java2d.dpiaware", "false");
|
System.setProperty("sun.java2d.dpiaware", "false");
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new CrashReporter(true));
|
Thread.setDefaultUncaughtExceptionHandler(new CrashReporter(true));
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import java.awt.Graphics;
|
|||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.IllegalComponentStateException;
|
import java.awt.IllegalComponentStateException;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
import java.awt.RenderingHints;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -159,6 +160,8 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
|
|||||||
|
|
||||||
public final void paintComponent(Graphics g) {
|
public final void paintComponent(Graphics g) {
|
||||||
Graphics2D g2d = (Graphics2D) g;
|
Graphics2D g2d = (Graphics2D) g;
|
||||||
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||||
|
|
||||||
Font f = getFont() != null ? getFont() : UIManager.getFont("controlFont");
|
Font f = getFont() != null ? getFont() : UIManager.getFont("controlFont");
|
||||||
FontMetrics fm = g.getFontMetrics(f);
|
FontMetrics fm = g.getFontMetrics(f);
|
||||||
Insets ins = getInsets();
|
Insets ins = getInsets();
|
||||||
@@ -185,7 +188,6 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
|
|||||||
int h = fm.getMaxAscent() + fm.getMaxDescent() + 3;
|
int h = fm.getMaxAscent() + fm.getMaxDescent() + 3;
|
||||||
|
|
||||||
Font boldFont = f.deriveFont(Font.BOLD);
|
Font boldFont = f.deriveFont(Font.BOLD);
|
||||||
|
|
||||||
g.setFont(boldFont);
|
g.setFont(boldFont);
|
||||||
g.drawString(C.i18n("wizard.steps"), x, y);
|
g.drawString(C.i18n("wizard.steps"), x, y);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user