diff --git a/changes/4.5.0.md b/changes/4.5.0.md index 1a57ce9d0..6d5cac4ed 100644 --- a/changes/4.5.0.md +++ b/changes/4.5.0.md @@ -6,6 +6,7 @@ - Equivalent To and Not Equivalent To (`U+224D`, `U+226D`). - XOR, NAND and NOR (`U+22BB` ... `U+22BD`). - Upper-half and Lower-half filled square (`U+2B12`, `U+2B13`). + - Ellipses (`U+2B2C` ... `U+2B2F`). - Medium and Small Stars, Large Heavy White Circle (`U+2B50` ... `U+2B52`, `U+2B55`). - Barb Arrows (`U+2794`, `U+1F860` ... `U+1F887`, #792). - Sans Serif Arrows (`U+1F850` ... `U+1F859`). diff --git a/font-src/glyphs/symbol/geometric/masked.ptl b/font-src/glyphs/symbol/geometric/masked.ptl index 9ed42e5ba..66898595c 100644 --- a/font-src/glyphs/symbol/geometric/masked.ptl +++ b/font-src/glyphs/symbol/geometric/masked.ptl @@ -191,13 +191,13 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1 set-width Geom.Width include : difference refer-glyph : MangleName 'blackLongRectangle' - refer-glyph : MangleName 'blackCircle' + refer-glyph : MangleName 'blackInvInnerCircle' create-glyph [MangleName 'uni25D9'] [MangleUnicode 0x25D9] : glyph-proc set-width Geom.Width include : difference refer-glyph : MangleName 'blackLongRectangle' - refer-glyph : MangleName 'whiteCircle' + refer-glyph : MangleName 'whiteInvInnerCircle' create-glyph [MangleName 'uni25DA'] [MangleUnicode 0x25DA] : glyph-proc set-width Geom.Width diff --git a/font-src/glyphs/symbol/geometric/plain.ptl b/font-src/glyphs/symbol/geometric/plain.ptl index c962d6cbf..4d318ac08 100644 --- a/font-src/glyphs/symbol/geometric/plain.ptl +++ b/font-src/glyphs/symbol/geometric/plain.ptl @@ -211,11 +211,13 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1 StdBlackShape RectangleFill 'blackRectangle' 0x25AC ConvexWhitePolygon RectangleFill 'whiteRectangle' 0x25AD - define [LongRectangleFill cx cy r] : spiro-outline - corner (cx - r) (cy + r * 1.5) - corner (cx + r) (cy + r * 1.5) - corner (cx + r) (cy - r * 1.5) - corner (cx - r) (cy - r * 1.5) + define [LongRectangleFill cx cy r] : begin + define rs : Geom.TallSize / (r * 1.5) + return : spiro-outline + corner (cx - r * rs) (cy + r * rs * 1.5) + corner (cx + r * rs) (cy + r * rs * 1.5) + corner (cx + r * rs) (cy - r * rs * 1.5) + corner (cx - r * rs) (cy - r * rs * 1.5) StdBlackShape LongRectangleFill 'blackLongRectangle' 0x25AE ConvexWhitePolygon LongRectangleFill 'whiteLongRectangle' 0x25AF @@ -391,12 +393,21 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1 do "Circle" define [CircleShape cx cy size] : spiro-outline - g4 cx (cy + size) g4 (cx - size) cy + arcvh.superness 2 g4 cx (cy - size) + archv.superness 2 g4 (cx + size) cy + arcvh.superness 2 + g4 cx (cy + size) + archv.superness 2 close + define [CircleInvertInnerShape cx cy size sw] : begin + define sizeOrig : size + sw + define rs : Geom.TallSize / (sizeOrig * 1.5) + return : CircleShape cx cy (sizeOrig * rs - sw) + StdBlackShape CircleShape 'blackCircleO' null StdBlackShape CircleShape 'blackCircle' 0x25CF @@ -424,6 +435,9 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1 StdGeomTargetShape CircleShape 'circleTarget' 0x1F78B + StdBlackShape CircleInvertInnerShape 'blackInvInnerCircle' null + StdWhiteShape CircleInvertInnerShape 'whiteInvInnerCircle' null + create-glyph [MangleName 'dottedCircle'] [MangleUnicode 0x25CC] : glyph-proc set-width Geom.Width include : [DivFrame Geom.Scalar].markSet.plus @@ -452,6 +466,25 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1 include : CircleRingAt box.Right [mix box.Top box.Bot t] fine include : CircleRingAt [mix box.Right box.Left t] box.Bot fine + do "Ellipse" + define [EllipseFillT kx ky] : lambda [cx cy r s] : begin + define rOrig : r + s + return : spiro-outline + g4 (cx - (rOrig * kx - s)) cy + arcvh.superness 2 + g4 cx (cy - (rOrig * ky - s)) + archv.superness 2 + g4 (cx + (rOrig * kx - s)) cy + arcvh.superness 2 + g4 cx (cy + (rOrig * ky - s)) + archv.superness 2 + close + + StdBlackShape [EllipseFillT 1 (1 / 1.5)] 'blackEllipse' 0x2B2C + StdWhiteShape [EllipseFillT 1 (1 / 1.5)] 'whiteEllipse' 0x2B2D + StdBlackShape [EllipseFillT (1 / 1.5) 1] 'blackLongEllipse' 0x2B2E + StdWhiteShape [EllipseFillT (1 / 1.5) 1] 'whiteLongEllipse' 0x2B2F + do "Regular Polygon" define [RegularPolygonFill sides skip overflow phase] : lambda [cx cy size] : begin local corners {} diff --git a/font-src/glyphs/symbol/geometric/shared.ptl b/font-src/glyphs/symbol/geometric/shared.ptl index 172e1952c..d2cf64707 100644 --- a/font-src/glyphs/symbol/geometric/shared.ptl +++ b/font-src/glyphs/symbol/geometric/shared.ptl @@ -7,13 +7,16 @@ glyph-module glyph-block Symbol-Geometric-Shared : begin glyph-block-export GeometricDim - define [GeometricDim UnitWidth fullWidth] : begin - define s : fullWidth / UnitWidth - define size : 0.5 * fullWidth - 0.625 * SB * s * s + define [GeometricDim unitWidth fullWidth] : begin + define s : fullWidth / unitWidth + define sb : 0.625 * SB * s * s + define tallSize : 0.5 * para.arrowHeight * (unitWidth - sb) * [Math.pow s (1 / 3)] + define size : Math.min (0.5 * fullWidth - sb) tallSize return : object - UnitWidth UnitWidth + UnitWidth unitWidth Scalar s Size size + TallSize tallSize Width fullWidth Left : 0.5 * fullWidth - size MidX : 0.5 * fullWidth diff --git a/font-src/meta/aesthetics.ptl b/font-src/meta/aesthetics.ptl index 75eedacf8..bfeef82ba 100644 --- a/font-src/meta/aesthetics.ptl +++ b/font-src/meta/aesthetics.ptl @@ -166,7 +166,7 @@ export : define [calculateMetrics para] : begin define MVertStroke : MVertStrokeD 3 1 define OverlayStroke : AdviceStroke 3.75 define OperatorStroke : AdviceStroke 3 - define GeometryStroke : AdviceStroke 4.5 + define GeometryStroke : AdviceStroke 4 define ShoulderFine : Math.min (Stroke * para.shoulderfineMin) [AdviceStroke 16] define [_SuperXY x superness] : Math.pow