Changed default project font again to "Lucida Console" because

"Square721 BT" doesn't render Ohm symbol properly
This commit is contained in:
Branislav Stojkovic
2019-01-13 21:38:42 +01:00
parent e2e33a1b13
commit 41b670616c
7 changed files with 23 additions and 6 deletions
@@ -61,7 +61,7 @@ public abstract class AbstractComponent<T> implements IDIYComponent<T> {
public static Color SELECTION_COLOR = Color.red;
public static Color LABEL_COLOR = Color.black;
public static Color LABEL_COLOR_SELECTED = Color.red;
public static Font LABEL_FONT = new Font("Square721 BT", Font.PLAIN, 14);
public static Font LABEL_FONT = new Font("Lucida Console", Font.PLAIN, 14);
public static Color METAL_COLOR = Color.decode("#759DAF");
public static Color LIGHT_METAL_COLOR = Color.decode("#EEEEEE");
public static Color COPPER_COLOR = Color.decode("#DA8A67");
@@ -22,6 +22,7 @@ import java.awt.Color;
import java.awt.Composite;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Shape;
@@ -31,6 +32,7 @@ import java.awt.geom.Ellipse2D;
import java.awt.geom.Rectangle2D;
import org.diylc.appframework.miscutils.ConfigurationManager;
import org.diylc.awt.ShadedPaint;
import org.diylc.common.Display;
import org.diylc.common.IPlugInPort;
import org.diylc.common.LineStyle;
@@ -182,7 +184,18 @@ public abstract class AbstractLeadedComponent<T> extends AbstractTransparentComp
}
if (bodyColor != null) {
g2d.setColor(outlineMode ? Constants.TRANSPARENT_COLOR : bodyColor);
g2d.fill(shape);
if (!outlineMode && ConfigurationManager.getInstance().readBoolean(IPlugInPort.HI_QUALITY_RENDER_KEY, false)) {
Point p1 = new Point((int) (length / 2), 0);
Point p2 = new Point((int) (length / 2), (int) width);
ShadedPaint paint = theta > 0 && theta < Math.PI ? new ShadedPaint(p2, p1, bodyColor) : new ShadedPaint(p1, p2, bodyColor);
Paint oldPaint = g2d.getPaint();
g2d.setPaint(paint);
g2d.fill(shape);
g2d.setPaint(oldPaint);
} else {
g2d.fill(shape);
}
}
decorateComponentBody(g2d, outlineMode);
g2d.setComposite(oldComposite);
@@ -53,7 +53,7 @@ public class Project implements Serializable {
public static Size DEFAULT_WIDTH = new Size(29d, SizeUnit.cm);
public static Size DEFAULT_HEIGHT = new Size(21d, SizeUnit.cm);
public static Size DEFAULT_GRID_SPACING = new Size(0.1d, SizeUnit.in);
public static Font DEFAULT_FONT = new Font("Square721 BT", Font.PLAIN, 14);
public static Font DEFAULT_FONT = new Font("Lucida Console", Font.PLAIN, 14);
private VersionNumber fileVersion;
@@ -127,7 +127,7 @@ public class Project implements Serializable {
this.height = height;
}
@EditableProperty(name = "Grid spacing", validatorClass = SpacingValidator.class, sortOrder = 6)
@EditableProperty(name = "Grid Spacing", validatorClass = SpacingValidator.class, sortOrder = 6)
public Size getGridSpacing() {
return gridSpacing;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
View File
@@ -2206,6 +2206,10 @@
<releaseDate>2018-12-26 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Changed default project font again to "Lucida Console" because "Square721 BT" doesn't render Ohm symbol properly</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Added optional arrow to the "Line" component together with configurable thickness</description>