diff --git a/changes/32.3.0.md b/changes/32.3.0.md index 631ac8eb88..c3e2c4fc65 100644 --- a/changes/32.3.0.md +++ b/changes/32.3.0.md @@ -91,6 +91,9 @@ - CYRILLIC SUBSCRIPT SMALL LETTER EF (`U+1E060`). - CYRILLIC SUBSCRIPT SMALL LETTER SHA (`U+1E064`). * Add characters: + - MARRIAGE SYMBOL (`U+26AD`). + - DIVORCE SYMBOL (`U+26AE`). + - UNMARRIED PARTNERSHIP SYMBOL (`U+26AF`). - LEFT OUTER JOIN (`U+27D5`) ... FULL OUTER JOIN (`U+27D7`). - Z NOTATION LEFT BINDING BRACKET (`U+2989`). - Z NOTATION RIGHT BINDING BRACKET (`U+298A`). @@ -111,5 +114,7 @@ - CLOSED SUBSET (`U+2ACF`) ... CLOSED SUPERSET OR EQUAL TO (`U+2AD2`). - ANTICLOCKWISE TRIANGLE-HEADED RIGHT U-SHAPED ARROW (`U+2B8C`) ... FOUR CORNER ARROWS CIRCLING ANTICLOCKWISE (`U+2B94`). - DOWNWARDS TRIANGLE-HEADED ARROW WITH LONG TIP LEFTWARDS (`U+2BA0`) ... RIGHTWARDS TRIANGLE-HEADED ARROW WITH LONG TIP DOWNWARDS (`U+2BA7`). + - UNITED SYMBOL (`U+2BFA`) ... PASSED SYMBOL (`U+2BFD`). + - MUSICAL SYMBOL FLAT UP (`U+1D12C`) ... MUSICAL SYMBOL SHARP DOWN (`U+1D131`). - LATIN SMALL LETTER DEZH DIGRAPH WITH RETROFLEX HOOK (`U+1DF19`). - LATIN SMALL LETTER TESH DIGRAPH WITH RETROFLEX HOOK (`U+1DF1C`). diff --git a/packages/font-glyphs/src/meta/aesthetics.ptl b/packages/font-glyphs/src/meta/aesthetics.ptl index f7c5c7b594..b0a80b3344 100644 --- a/packages/font-glyphs/src/meta/aesthetics.ptl +++ b/packages/font-glyphs/src/meta/aesthetics.ptl @@ -203,8 +203,8 @@ export : define [calculateMetrics para] : begin TBalance2 RBalance RBalance2 FBalance OneBalance WideWidth0 WideWidth1 WideWidth2 WideWidth3 WideWidth4 EssUpper EssLower EssQuestion HalfStroke RightSB Middle DotRadius PeriodRadius SideJut ArchDepthA ArchDepthB SmallArchDepthA SmallArchDepthB CorrectionOMidX CorrectionOMidS - compositeBaseAnchors AdviceStroke AdviceStroke2 OverlayStroke OperatorStroke GeometryStroke - ShoulderFine AdviceGlottalStopArchDepth StrokeWidthBlend ArchDepthAOf ArchDepthBOf + compositeBaseAnchors AdviceStroke AdviceStroke2 AdviceStrokeInSpace OverlayStroke OperatorStroke + GeometryStroke ShoulderFine AdviceGlottalStopArchDepth StrokeWidthBlend ArchDepthAOf ArchDepthBOf SmoothAdjust MidJutSide MidJutCenter YSmoothMidR YSmoothMidL HSwToV NarrowUnicodeT WideUnicodeT VERY-FAR TINY] diff --git a/packages/font-glyphs/src/meta/macros.ptl b/packages/font-glyphs/src/meta/macros.ptl index fa44b35778..d0c5073c54 100644 --- a/packages/font-glyphs/src/meta/macros.ptl +++ b/packages/font-glyphs/src/meta/macros.ptl @@ -386,9 +386,9 @@ define-macro glyph-block : syntax-rules FBalance OneBalance WideWidth0 WideWidth1 WideWidth2 WideWidth3 WideWidth4 EssUpper EssLower EssQuestion HalfStroke RightSB Middle DotRadius PeriodRadius SideJut ArchDepthA ArchDepthB SmallArchDepthA SmallArchDepthB CorrectionOMidX CorrectionOMidS - AdviceStroke AdviceStroke2 OverlayStroke OperatorStroke GeometryStroke ShoulderFine - AdviceGlottalStopArchDepth StrokeWidthBlend ArchDepthAOf ArchDepthBOf SmoothAdjust - MidJutSide MidJutCenter compositeBaseAnchors YSmoothMidR YSmoothMidL HSwToV + AdviceStroke AdviceStroke2 AdviceStrokeInSpace OverlayStroke OperatorStroke GeometryStroke + ShoulderFine AdviceGlottalStopArchDepth StrokeWidthBlend ArchDepthAOf ArchDepthBOf + SmoothAdjust MidJutSide MidJutCenter compositeBaseAnchors YSmoothMidR YSmoothMidL HSwToV NarrowUnicodeT WideUnicodeT VERY-FAR TINY] define spiroFnImports `[g4 g2 corner flat curl virt close end straight g2c cg2 flatc ccurl diff --git a/packages/font-glyphs/src/symbol/arrow.ptl b/packages/font-glyphs/src/symbol/arrow.ptl index 0fd6cfa1d5..d2acb8187b 100644 --- a/packages/font-glyphs/src/symbol/arrow.ptl +++ b/packages/font-glyphs/src/symbol/arrow.ptl @@ -37,6 +37,7 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 define arrowDiagBot : mix arrowMidX arrowBot diagPropY define arrowDiagTop : mix arrowMidX arrowTop diagPropY + # Arrow Bars define [ArrowBar x1 y1 x2 y2 halfSw w _offset] : begin return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin local p : (mag - [fallback _offset : o + halfSw * [fallback w 1.1]]) / mag @@ -90,6 +91,47 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 flat (mag - [Math.abs s] / 2) 0 [widths.center (halfSw * 2)] curl [mix mag 0 p] 0 + define [ArrowBarMaskOut d] : spiro-outline + corner O 0 + corner (2 * d + O) (2 * d) + corner (-2 * d + O) (2 * d) + corner (-2 * d + O) (-2 * d) + corner (2 * d + O) (-2 * d) + + define [DoubleArrowBarShape w x1 y1 x2 y2] : begin + return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin + local fine : Math.min (w / 3) arrowSw + local coFine : w / 2 - fine / 2 + return : difference + union + dispiro [widths.center fine] [flat 0 (+coFine)] [curl mag (+coFine)] + dispiro [widths.center fine] [flat 0 (-coFine)] [curl mag (-coFine)] + ArrowBarMaskOut coFine + + define [TripleArrowBarShape w x1 y1 x2 y2] : begin + return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin + local fine : Math.min (w / 4) arrowSw + local coFine : w / 2 - fine / 2 + return : difference + union + dispiro [widths.center fine] [flat 0 (+coFine)] [curl mag (+coFine)] + dispiro [widths.center fine] [flat 0 0] [curl mag 0] + dispiro [widths.center fine] [flat 0 (-coFine)] [curl mag (-coFine)] + ArrowBarMaskOut coFine + + define [QuadrupleArrowBarShape w x1 y1 x2 y2] : begin + return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin + local fine : Math.min (w / 6.4) arrowSw + local coFine : w / 2 - fine / 2 + return : difference + union + dispiro [widths.center fine] [flat 0 (+coFine)] [curl mag (+coFine)] + dispiro [widths.center fine] [flat 0 (+coFine / 3)] [curl mag (+coFine / 3)] + dispiro [widths.center fine] [flat 0 (-coFine / 3)] [curl mag (-coFine / 3)] + dispiro [widths.center fine] [flat 0 (-coFine)] [curl mag (-coFine)] + ArrowBarMaskOut coFine + + # Arrow Heads/Tails define [ArrowHead x1 y1 x2 y2 _size] : union LHSHalfArrowHead x1 y1 x2 y2 0 _size RHSHalfArrowHead x1 y1 x2 y2 0 _size @@ -171,14 +213,20 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 corner length (-width + o) Rect width (-width) (0.6 * length - 0.5 * sw) (0.6 * length + 0.5 * sw) + define [BarbArrowHead x1 y1 x2 y2 width length thickness] : new-glyph : glyph-proc + include : PointingTo x1 y1 x2 y2 : lambda [mag] : begin + spiro-outline + corner o 0 + corner length (width - o) + corner (length + thickness) (width - o) + corner (o + thickness) 0 + corner (length + thickness) (-width + o) + corner length (-width + o) + define [RectangleArrowTail x1 y1 x2 y2 width _length _width2] : begin local length : fallback _length width return : new-glyph : PointingTo x1 y1 x2 y2 : lambda [mag] : Rect width (-[fallback _width2 width]) 0 length - define [ArrowShape x1 y1 x2 y2 size] : glyph-proc - include : ArrowHead x1 y1 x2 y2 size - include : ArrowBar x1 y1 x2 y2 halfArrowSw - define [ArrowTailBarShape x1 y1 x2 y2 size sw] : begin return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin dispiro @@ -186,28 +234,39 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 flat mag size curl mag (-size) - define [ArrowFromBarShape x1 y1 x2 y2 size] : glyph-proc + # Arrow Shapes + define [ArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + include : ArrowHead x1 y1 x2 y2 size + include : ArrowBar x1 y1 x2 y2 halfSw + + define [ArrowFromBarShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw local width : Math.abs (x1 - x2) local height : Math.abs (y1 - y2) local barShrink : size * [Math.min (width / height) (height / width)] local p : barShrink / [Math.hypot width height] include : ArrowHead x1 y1 x2 y2 size - include : ArrowBar [mix x1 x2 p] [mix y1 y2 p] x2 y2 halfArrowSw + include : ArrowBar [mix x1 x2 p] [mix y1 y2 p] x2 y2 halfSw include : ArrowTailBarShape [mix x1 x2 p] [mix y1 y2 p] x2 y2 size fine - define [ThinArrowShape x1 y1 x2 y2 size] : glyph-proc + define [ThinArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw include : ArrowHead x1 y1 x2 y2 size include : ArrowBar x1 y1 x2 y2 (0.5 * [mix fine terminal 0.5]) - define [TrigArrowShape x1 y1 x2 y2 size] : glyph-proc + define [TrigArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw include : TriangleArrowHead x1 y1 x2 y2 (0.75 * size) - include : ArrowBar x1 y1 x2 y2 halfArrowSw + include : ArrowBar x1 y1 x2 y2 halfSw - define [WeightedTrigArrowShape sw w h] : lambda [x1 y1 x2 y2 size] : glyph-proc + define [WeightedTrigArrowShape sw w h] : lambda [x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw include : TriangleArrowHead x1 y1 x2 y2 (0.75 * w * size) (0.75 * [fallback h w] * size) include : ArrowBar x1 y1 x2 y2 (sw / 2) 0 (0.75 * [fallback h w] * size) - define [OpenArrowShape x1 y1 x2 y2 size] : glyph-proc + define [OpenArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw local fine : Math.min [AdviceStroke 5] (size * 0.75 / 3) local mag : Math.hypot (y2 - y1) (x2 - x1) local p : (mag - fine) / mag @@ -221,11 +280,12 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 include : difference union - ArrowBar x1 y1 x2 y2 halfArrowSw + ArrowBar x1 y1 x2 y2 halfSw TriangleArrowHead x1 y1 x2 y2 (0.75 * size) TriangleArrowHead x1a y1a x2a y2a (0.75 * size - innerHeaderLengthShrink) - define [DoubleTrigArrowShape x1 y1 x2 y2 size] : glyph-proc + define [DoubleTrigArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw local mag : Math.hypot (y2 - y1) (x2 - x1) local p : (mag - 0.75 * size + o) / mag local x3 : mix x1 x2 p @@ -233,30 +293,94 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 include : TriangleArrowHead x1 y1 x2 y2 (0.75 * size) include : TriangleArrowHead x1 y1 x3 y3 (0.75 * size) - include : ArrowBar x1 y1 x3 y3 halfArrowSw + include : ArrowBar x1 y1 x3 y3 halfSw - define [SsArrowShape x1 y1 x2 y2 size] : glyph-proc + define [SsArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw include : SsArrowHead x1 y1 x2 y2 size - include : ArrowBar x1 y1 x2 y2 halfArrowSw + include : ArrowBar x1 y1 x2 y2 halfSw - define [DashArrowShape x1 y1 x2 y2 size] : glyph-proc + define [DashArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw local gap : AdviceStroke 6 include : ArrowHead x1 y1 x2 y2 size - include : DashArrowBar x1 y1 x2 y2 halfArrowSw gap [Math.max (Width / 5) (gap * 3)] + include : DashArrowBar x1 y1 x2 y2 halfSw gap [Math.max (Width / 5) (gap * 3)] - define [TrigDashArrowShape x1 y1 x2 y2 size] : glyph-proc + define [TrigDashArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw local gap : AdviceStroke 6 include : TriangleArrowHead x1 y1 x2 y2 (0.75 * size) - include : DashArrowBar x1 y1 x2 y2 halfArrowSw gap [Math.max (Width / 5) (gap * 3)] + include : DashArrowBar x1 y1 x2 y2 halfSw gap [Math.max (Width / 5) (gap * 3)] - define [HookArrowShape mul] : lambda [x1 y1 x2 y2 size] : glyph-proc + define [HookArrowShape mul] : lambda [x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw include : ArrowHead x1 y1 x2 y2 size - include : HookArrowBar x1 y1 x2 y2 halfArrowSw (size * mul) + include : HookArrowBar x1 y1 x2 y2 halfSw (size * mul) - define [LoopArrowShape mul] : lambda [x1 y1 x2 y2 size] : glyph-proc + define [LoopArrowShape mul] : lambda [x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw include : ArrowHead x1 y1 x2 y2 size - include : LoopArrowBar x1 y1 x2 y2 halfArrowSw (size * mul) + include : LoopArrowBar x1 y1 x2 y2 halfSw (size * mul) + define [BarbArrowShape k thickness] : lambda [x1 y1 x2 y2] : begin + local headLen : MosaicUnitWidth * [Math.sqrt MosaicWidthScalar] * k + local halfBarWidth : thickness / 2 + + return : union + BarbArrowHead x1 y1 x2 y2 headLen headLen (thickness * 1.125) + ArrowBar x1 y1 x2 y2 halfBarWidth 2 + + define [HalfArrowShape side] : lambda [x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + include : side x1 y1 x2 y2 arrowSw size + include : ArrowBar x1 y1 x2 y2 halfSw 1.75 + + define [DoubleArrowShape w] : lambda [x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + include : ArrowHead x1 y1 x2 y2 size + include : DoubleArrowBarShape w x1 y1 x2 y2 + + define [TripleArrowShape w] : lambda [x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + include : ArrowHead x1 y1 x2 y2 size + include : TripleArrowBarShape w x1 y1 x2 y2 + + define [QuadrupleArrowShape w] : lambda [x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + include : ArrowHead x1 y1 x2 y2 size + include : QuadrupleArrowBarShape w x1 y1 x2 y2 + + define [dhArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + local mag : Math.hypot (y2 - y1) (x2 - x1) + local p : (mag - o - size) / mag + include : ArrowShape x1 y1 x2 y2 size + include : ArrowHead x1 y1 [mix x1 x2 p] [mix y1 y2 p] size + + define [htArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + local mag : Math.hypot (y2 - y1) (x2 - x1) + local p1 : (size - o - halfSw * 1.1) / mag + local p2 : size / mag + include : ArrowShape [mix x1 x2 p1] [mix y1 y2 p1] x2 y2 size + include : ArrowHead x1 y1 [mix x1 x2 p2] [mix y1 y2 p2] size + + define [CounterArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + local mag : Math.hypot (y2 - y1) (x2 - x1) + local p1 : (size - o - halfSw * 1.1) / mag + local p2 : size / mag + include : ArrowBar [mix x1 x2 p1] [mix y1 y2 p1] x2 y2 halfSw + include : ArrowHead x1 y1 [mix x1 x2 p2] [mix y1 y2 p2] size + + define [dtCounterArrowShape x1 y1 x2 y2 size _halfSw] : glyph-proc + local halfSw : fallback _halfSw halfArrowSw + local mag : Math.hypot (y2 - y1) (x2 - x1) + local p : (2 * size + o) / mag + include : CounterArrowShape x1 y1 x2 y2 size + include : ArrowHead x1 y1 [mix x1 x2 p] [mix y1 y2 p] size + + # Special Arrows define [ThickArrowShape color] : lambda [x1 y1 x2 y2] : begin local headLen : MosaicUnitWidth * [Math.sqrt MosaicWidthScalar] * 0.4 local halfBarWidth : headLen / 3 @@ -408,113 +532,14 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 Bar x1a y1a x2a y2a sw Head x1a y1a x2a y2a sw (pHalf * headLen) (pHalf * headWidth) - define [BarbArrowHead x1 y1 x2 y2 width length thickness] : new-glyph : glyph-proc - include : PointingTo x1 y1 x2 y2 : lambda [mag] : begin - spiro-outline - corner o 0 - corner length (width - o) - corner (length + thickness) (width - o) - corner (o + thickness) 0 - corner (length + thickness) (-width + o) - corner length (-width + o) - - define [BarbArrowShape k thickness] : lambda [x1 y1 x2 y2] : begin - local headLen : MosaicUnitWidth * [Math.sqrt MosaicWidthScalar] * k - local halfBarWidth : thickness / 2 - - return : union - BarbArrowHead x1 y1 x2 y2 headLen headLen (thickness * 1.125) - ArrowBar x1 y1 x2 y2 halfBarWidth 2 - - define [HalfArrowShape side] : lambda [x1 y1 x2 y2 size] : glyph-proc - include : side x1 y1 x2 y2 arrowSw size - include : ArrowBar x1 y1 x2 y2 halfArrowSw 1.75 - - define [ArrowBarMaskOut d] : spiro-outline - corner O 0 - corner (2 * d + O) (2 * d) - corner (-2 * d + O) (2 * d) - corner (-2 * d + O) (-2 * d) - corner (2 * d + O) (-2 * d) - - define [DoubleArrowBarShape w x1 y1 x2 y2] : begin - return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin - local fine : Math.min (w / 3) arrowSw - local coFine : w / 2 - fine / 2 - return : difference - union - dispiro [widths.center fine] [flat 0 (+coFine)] [curl mag (+coFine)] - dispiro [widths.center fine] [flat 0 (-coFine)] [curl mag (-coFine)] - ArrowBarMaskOut coFine - - define [DoubleArrowShape w] : lambda [x1 y1 x2 y2 size] : glyph-proc - include : ArrowHead x1 y1 x2 y2 size - include : DoubleArrowBarShape w x1 y1 x2 y2 - - define [TripleArrowBarShape w x1 y1 x2 y2] : begin - return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin - local fine : Math.min (w / 4) arrowSw - local coFine : w / 2 - fine / 2 - return : difference - union - dispiro [widths.center fine] [flat 0 (+coFine)] [curl mag (+coFine)] - dispiro [widths.center fine] [flat 0 0] [curl mag 0] - dispiro [widths.center fine] [flat 0 (-coFine)] [curl mag (-coFine)] - ArrowBarMaskOut coFine - - define [TripleArrowShape w] : lambda [x1 y1 x2 y2 size] : glyph-proc - include : ArrowHead x1 y1 x2 y2 size - include : TripleArrowBarShape w x1 y1 x2 y2 - - define [QuadrupleArrowBarShape w x1 y1 x2 y2] : begin - return : PointingTo x1 y1 x2 y2 : lambda [mag] : begin - local fine : Math.min (w / 6.4) arrowSw - local coFine : w / 2 - fine / 2 - return : difference - union - dispiro [widths.center fine] [flat 0 (+coFine)] [curl mag (+coFine)] - dispiro [widths.center fine] [flat 0 (+coFine / 3)] [curl mag (+coFine / 3)] - dispiro [widths.center fine] [flat 0 (-coFine / 3)] [curl mag (-coFine / 3)] - dispiro [widths.center fine] [flat 0 (-coFine)] [curl mag (-coFine)] - ArrowBarMaskOut coFine - - define [QuadrupleArrowShape w] : lambda [x1 y1 x2 y2 size] : glyph-proc - include : ArrowHead x1 y1 x2 y2 size - include : QuadrupleArrowBarShape w x1 y1 x2 y2 - - define [dhArrowShape x1 y1 x2 y2 size] : glyph-proc - local mag : Math.hypot (y2 - y1) (x2 - x1) - local p : (mag - o - size) / mag - include : ArrowShape x1 y1 x2 y2 size - include : ArrowHead x1 y1 [mix x1 x2 p] [mix y1 y2 p] size - - define [htArrowShape x1 y1 x2 y2 size] : glyph-proc - local mag : Math.hypot (y2 - y1) (x2 - x1) - local p1 : (size - o - halfArrowSw * 1.1) / mag - local p2 : size / mag - include : ArrowShape [mix x1 x2 p1] [mix y1 y2 p1] x2 y2 size - include : ArrowHead x1 y1 [mix x1 x2 p2] [mix y1 y2 p2] size - - define [CounterArrowShape x1 y1 x2 y2 size] : glyph-proc - local mag : Math.hypot (y2 - y1) (x2 - x1) - local p1 : (size - o - halfArrowSw * 1.1) / mag - local p2 : size / mag - include : ArrowBar [mix x1 x2 p1] [mix y1 y2 p1] x2 y2 halfArrowSw - include : ArrowHead x1 y1 [mix x1 x2 p2] [mix y1 y2 p2] size - - define [dtCounterArrowShape x1 y1 x2 y2 size] : glyph-proc - local mag : Math.hypot (y2 - y1) (x2 - x1) - local p : (2 * size + o) / mag - include : CounterArrowShape x1 y1 x2 y2 size - include : ArrowHead x1 y1 [mix x1 x2 p] [mix y1 y2 p] size - + # MkArrow Functions define [MkArrow shape id unicode x1 y1 x2 y2 width headSize] create-glyph id unicode : glyph-proc set-width [fallback width MosaicWidth] set-base-anchor 'slash' [mix x1 x2 (2/5)] [mix y1 y2 (2/5)] include : shape x1 y1 x2 y2 [fallback headSize arrowHeadSize] - define [DoubleArrow shape id unicode x1 y1 x2 y2] + define [MkDoubleArrow shape id unicode x1 y1 x2 y2] create-glyph id unicode : glyph-proc set-width MosaicWidth set-base-anchor 'slash' [mix x1 x2 (1/2)] [mix y1 y2 (1/2)] @@ -523,7 +548,7 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 include : shape xm ym x1 y1 arrowHeadSize include : shape xm ym x2 y2 arrowHeadSize - define [DoubleArrow2 shape1 shape2 id unicode x1 y1 x2 y2] + define [MkDoubleArrow2 shape1 shape2 id unicode x1 y1 x2 y2] create-glyph id unicode : glyph-proc set-width MosaicWidth set-base-anchor 'slash' [mix x1 x2 (1/2)] [mix y1 y2 (1/2)] @@ -878,16 +903,16 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 MkArrow [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowDownHR'] [MangleUnicode 0x21C3] arrowMidX arrowTop arrowMidX arrowBot do "Double Half-head Arrows (different side)" - DoubleArrow [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowLeftRightHR'] [MangleUnicode 0x294A] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowLeftRightHL'] [MangleUnicode 0x294B] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowUpDownHR'] [MangleUnicode 0x294C] arrowMidX arrowTop arrowMidX arrowBot - DoubleArrow [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowUpDownHL'] [MangleUnicode 0x294D] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowLeftRightHR'] [MangleUnicode 0x294A] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowLeftRightHL'] [MangleUnicode 0x294B] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowUpDownHR'] [MangleUnicode 0x294C] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowUpDownHL'] [MangleUnicode 0x294D] arrowMidX arrowTop arrowMidX arrowBot do "Double Half-head Arrows (same side)" - DoubleArrow2 [HalfArrowShape RHSHalfArrowHead] [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowLeftHRRightHL'] [MangleUnicode 0x294E] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow2 [HalfArrowShape RHSHalfArrowHead] [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowUpHRDownHL'] [MangleUnicode 0x294F] arrowMidX arrowTop arrowMidX arrowBot - DoubleArrow2 [HalfArrowShape LHSHalfArrowHead] [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowLeftHLRightHR'] [MangleUnicode 0x2950] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow2 [HalfArrowShape LHSHalfArrowHead] [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowUpHLDownHR'] [MangleUnicode 0x2951] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow2 [HalfArrowShape RHSHalfArrowHead] [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowLeftHRRightHL'] [MangleUnicode 0x294E] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow2 [HalfArrowShape RHSHalfArrowHead] [HalfArrowShape LHSHalfArrowHead] [MangleName 'arrowUpHRDownHL'] [MangleUnicode 0x294F] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow2 [HalfArrowShape LHSHalfArrowHead] [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowLeftHLRightHR'] [MangleUnicode 0x2950] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow2 [HalfArrowShape LHSHalfArrowHead] [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowUpHLDownHR'] [MangleUnicode 0x2951] arrowMidX arrowTop arrowMidX arrowBot define waveArrowAmplitude : (Width - SB) * DesignParameters.arrow_size * (0.7 + 0.4 * MosaicWidthScalar) @@ -1002,17 +1027,17 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 MkArrow [ThickArrowShape 'white'] [MangleName 'uni2B01'] [MangleUnicode 0x2B01] arrowDiagRSB arrowDiagBot arrowDiagSB arrowDiagTop MkArrow [ThickArrowShape 'white'] [MangleName 'uni2B02'] [MangleUnicode 0x2B02] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot MkArrow [ThickArrowShape 'white'] [MangleName 'uni2B03'] [MangleUnicode 0x2B03] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot - DoubleArrow [ThickArrowShape 'white-open'] [MangleName 'uni2B04'] [MangleUnicode 0x2B04] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow [ThickArrowShape 'white-open'] [MangleName 'uni21F3'] [MangleUnicode 0x21F3] arrowMidX arrowBot arrowMidX arrowTop - - DoubleArrow2 [ThickArrowShape 'whiteDot'] [ThickArrowShape 'white-open'] [MangleName 'uni21EA'] [MangleUnicode 0x21EA] arrowMidX arrowBot arrowMidX arrowTop - DoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'white-open'] [MangleName 'uni21EB'] [MangleUnicode 0x21EB] arrowMidX arrowBot arrowMidX arrowTop - DoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'whiteBarred'] [MangleName 'uni21EC'] [MangleUnicode 0x21EC] arrowMidX arrowBot arrowMidX arrowTop - DoubleArrow2 [ThickArrowShape 'white-closing'] [ThickArrowShape 'whiteDouble'] [MangleName 'uni21EE'] [MangleUnicode 0x21EE] arrowMidX arrowBot arrowMidX arrowTop - DoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'whiteDouble'] [MangleName 'uni21EF'] [MangleUnicode 0x21EF] arrowMidX arrowBot arrowMidX arrowTop - DoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'white-open'] [MangleName 'uni21F0'] [MangleUnicode 0x21F0] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow2 [ThickArrowShape 'whiteDot'] [ThickArrowShape 'whiteBarred'] [MangleName 'uni2BB8'] [MangleUnicode 0x2BB8] arrowMidX arrowBot arrowMidX arrowTop - DoubleArrow2 [ThickArrowShape 'whiteLeftTurn'] [ThickArrowShape 'white-open'] [MangleName 'uni23CE'] [MangleUnicode 0x23CE] arrowRSB SymbolMid arrowSB SymbolMid + MkDoubleArrow [ThickArrowShape 'white-open'] [MangleName 'uni2B04'] [MangleUnicode 0x2B04] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow [ThickArrowShape 'white-open'] [MangleName 'uni21F3'] [MangleUnicode 0x21F3] arrowMidX arrowBot arrowMidX arrowTop + + MkDoubleArrow2 [ThickArrowShape 'whiteDot'] [ThickArrowShape 'white-open'] [MangleName 'uni21EA'] [MangleUnicode 0x21EA] arrowMidX arrowBot arrowMidX arrowTop + MkDoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'white-open'] [MangleName 'uni21EB'] [MangleUnicode 0x21EB] arrowMidX arrowBot arrowMidX arrowTop + MkDoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'whiteBarred'] [MangleName 'uni21EC'] [MangleUnicode 0x21EC] arrowMidX arrowBot arrowMidX arrowTop + MkDoubleArrow2 [ThickArrowShape 'white-closing'] [ThickArrowShape 'whiteDouble'] [MangleName 'uni21EE'] [MangleUnicode 0x21EE] arrowMidX arrowBot arrowMidX arrowTop + MkDoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'whiteDouble'] [MangleName 'uni21EF'] [MangleUnicode 0x21EF] arrowMidX arrowBot arrowMidX arrowTop + MkDoubleArrow2 [ThickArrowShape 'whiteRect'] [ThickArrowShape 'white-open'] [MangleName 'uni21F0'] [MangleUnicode 0x21F0] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow2 [ThickArrowShape 'whiteDot'] [ThickArrowShape 'whiteBarred'] [MangleName 'uni2BB8'] [MangleUnicode 0x2BB8] arrowMidX arrowBot arrowMidX arrowTop + MkDoubleArrow2 [ThickArrowShape 'whiteLeftTurn'] [ThickArrowShape 'white-open'] [MangleName 'uni23CE'] [MangleUnicode 0x23CE] arrowRSB SymbolMid arrowSB SymbolMid MkArrow [ThickArrowShape 'black'] [MangleName 'uni2B05'] [MangleUnicode 0x2B05] arrowRSB SymbolMid arrowSB SymbolMid MkArrow [ThickArrowShape 'black'] [MangleName 'uni2B06'] [MangleUnicode 0x2B06] arrowMidX arrowBot arrowMidX arrowTop @@ -1023,8 +1048,8 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 MkArrow [ThickArrowShape 'black'] [MangleName 'uni2B09'] [MangleUnicode 0x2B09] arrowDiagRSB arrowDiagBot arrowDiagSB arrowDiagTop MkArrow [ThickArrowShape 'black'] [MangleName 'uni2B0A'] [MangleUnicode 0x2B0A] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot MkArrow [ThickArrowShape 'black'] [MangleName 'uni2B0B'] [MangleUnicode 0x2B0B] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot - DoubleArrow [ThickArrowShape 'black'] [MangleName 'uni2B0C'] [MangleUnicode 0x2B0C] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow [ThickArrowShape 'black'] [MangleName 'uni2B0D'] [MangleUnicode 0x2B0D] arrowMidX arrowBot arrowMidX arrowTop + MkDoubleArrow [ThickArrowShape 'black'] [MangleName 'uni2B0C'] [MangleUnicode 0x2B0C] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow [ThickArrowShape 'black'] [MangleName 'uni2B0D'] [MangleUnicode 0x2B0D] arrowMidX arrowBot arrowMidX arrowTop create-glyph [MangleName 'uni21ED'] [MangleUnicode 0x21ED] : composite-proc refer-glyph : MangleName 'uni21EB' @@ -1115,8 +1140,8 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 MkArrow SsArrowShape [MangleName 'sansSerifArrowUpRight'] [MangleUnicode 0x1F855] arrowDiagSB arrowDiagBot arrowDiagRSB arrowDiagTop MkArrow SsArrowShape [MangleName 'sansSerifArrowDownRight'] [MangleUnicode 0x1F856] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot MkArrow SsArrowShape [MangleName 'sansSerifArrowDownLeft'] [MangleUnicode 0x1F857] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot - DoubleArrow SsArrowShape [MangleName 'sansSerifArrowLeftRight'] [MangleUnicode 0x1F858] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow SsArrowShape [MangleName 'sansSerifArrowUpDown'] [MangleUnicode 0x1F859] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow SsArrowShape [MangleName 'sansSerifArrowLeftRight'] [MangleUnicode 0x1F858] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow SsArrowShape [MangleName 'sansSerifArrowUpDown'] [MangleUnicode 0x1F859] arrowMidX arrowTop arrowMidX arrowBot do "Double-line Arrows" define dasw doubleArrowStemWidth @@ -1303,17 +1328,17 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 VBar.m l (SymbolMid - arrowHeadSize) (SymbolMid + arrowHeadSize) fine do "Double-headed Arrows" - DoubleArrow ArrowShape [MangleName 'arrowLeftRight'] [MangleUnicode 0x2194] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow ThinArrowShape [MangleName 'thinArrowLeftRight'] null arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow ArrowShape [MangleName 'arrowUpDown'] [MangleUnicode 0x2195] arrowMidX arrowTop arrowMidX arrowBot - DoubleArrow ArrowShape [MangleName 'arrowUpDown.bottomSpaceLeft'] nothing arrowMidX arrowTop arrowMidX (arrowBot + arrowSw * 1.5) - DoubleArrow ArrowShape [MangleName 'arrowUpLeftAndDownRight'] [MangleUnicode 0x2921] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot - DoubleArrow ArrowShape [MangleName 'arrowUpRightAndDownLeft'] [MangleUnicode 0x2922] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot + MkDoubleArrow ArrowShape [MangleName 'arrowLeftRight'] [MangleUnicode 0x2194] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow ThinArrowShape [MangleName 'thinArrowLeftRight'] null arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow ArrowShape [MangleName 'arrowUpDown'] [MangleUnicode 0x2195] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow ArrowShape [MangleName 'arrowUpDown.bottomSpaceLeft'] nothing arrowMidX arrowTop arrowMidX (arrowBot + arrowSw * 1.5) + MkDoubleArrow ArrowShape [MangleName 'arrowUpLeftAndDownRight'] [MangleUnicode 0x2921] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot + MkDoubleArrow ArrowShape [MangleName 'arrowUpRightAndDownLeft'] [MangleUnicode 0x2922] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot - DoubleArrow TrigArrowShape [MangleName 'trigArrowLeftRight'] [MangleUnicode 0x2B64] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow TrigArrowShape [MangleName 'trigArrowUpDown'] [MangleUnicode 0x2B65] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow TrigArrowShape [MangleName 'trigArrowLeftRight'] [MangleUnicode 0x2B64] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow TrigArrowShape [MangleName 'trigArrowUpDown'] [MangleUnicode 0x2B65] arrowMidX arrowTop arrowMidX arrowBot - DoubleArrow OpenArrowShape [MangleName 'openHeadArrowLeftRight'] [MangleUnicode 0x21FF] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow OpenArrowShape [MangleName 'openHeadArrowLeftRight'] [MangleUnicode 0x21FF] arrowSB SymbolMid arrowRSB SymbolMid create-glyph [MangleName 'arrowUpDownBar'] [MangleUnicode 0x21A8] : composite-proc refer-glyph : MangleName 'arrowUpDown.bottomSpaceLeft' @@ -1322,17 +1347,17 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 if (MosaicWidthScalar > 1 && !para.forceMonospace) : do define l : mix 0 arrowSB kLongArrowSB define r : mix MosaicWidth arrowRSB kLongArrowSB - DoubleArrow ArrowShape 'longArrowLeftRight' 0x27F7 l SymbolMid r SymbolMid + MkDoubleArrow ArrowShape 'longArrowLeftRight' 0x27F7 l SymbolMid r SymbolMid do "Double-line Double-headed Arrows" define dasw doubleArrowStemWidth - DoubleArrow [DoubleArrowShape dasw] [MangleName 'dblArrowLeftRight'] [MangleUnicode 0x21D4] arrowSB SymbolMid arrowRSB SymbolMid - DoubleArrow [DoubleArrowShape dasw] [MangleName 'dblArrowUpDown'] [MangleUnicode 0x21D5] arrowMidX arrowTop arrowMidX arrowBot + MkDoubleArrow [DoubleArrowShape dasw] [MangleName 'dblArrowLeftRight'] [MangleUnicode 0x21D4] arrowSB SymbolMid arrowRSB SymbolMid + MkDoubleArrow [DoubleArrowShape dasw] [MangleName 'dblArrowUpDown'] [MangleUnicode 0x21D5] arrowMidX arrowTop arrowMidX arrowBot if (MosaicWidthScalar > 1 && !para.forceMonospace) : do define l : mix 0 arrowSB kLongArrowSB define r : mix MosaicWidth arrowRSB kLongArrowSB - DoubleArrow [DoubleArrowShape dasw] 'longDblArrowLeftRight' 0x27FA l SymbolMid r SymbolMid + MkDoubleArrow [DoubleArrowShape dasw] 'longDblArrowLeftRight' 0x27FA l SymbolMid r SymbolMid do "Same-side Double-headed Arrows" MkArrow dhArrowShape [MangleName 'dhArrowLeft'] [MangleUnicode 0x219E] arrowRSB SymbolMid arrowSB SymbolMid @@ -1635,4 +1660,4 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 include : FlipAround arrowMidX SymbolMid if (MosaicWidthScalar == 1) : begin - glyph-block-export ArrowShape ArrowHead ArrowBar + glyph-block-export ArrowShape ArrowHead ArrowBar TrigArrowShape diff --git a/packages/font-glyphs/src/symbol/geometric/masked.ptl b/packages/font-glyphs/src/symbol/geometric/masked.ptl index 304e2d9927..3ea7fce559 100644 --- a/packages/font-glyphs/src/symbol/geometric/masked.ptl +++ b/packages/font-glyphs/src/symbol/geometric/masked.ptl @@ -329,8 +329,6 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1 dispiro [widths.rhs GeometryStroke] [corner Geom.MidX Geom.MidY] [corner Geom.Left Geom.Top] do "Miscellaneous" - glyph-block-import Symbol-Punctuation-Bar : BarShape - create-glyph [MangleName 'uni2389'] [MangleUnicode 0x2389] : glyph-proc define shiftUp : ApparentTranslate 0 Math.max @@ -386,7 +384,9 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1 ExtLineLhs 4 OperatorStroke (Geom.MidX - Geom.Size) Geom.MidY Geom.MidX (Geom.MidY - Geom.Size) ExtLineLhs 4 OperatorStroke Geom.MidX (Geom.MidY - Geom.Size) (Geom.MidX + Geom.Size) Geom.MidY - # Compositions + do "Compositions" + glyph-block-import Symbol-Punctuation-Bar : BarShape + create-glyph [MangleName 'compositionSymbol'] [MangleUnicode 0x2384] : glyph-proc set-width Geom.Width local offsetX : Geom.Size * Size.Medium.size / 2 - GeometryStroke / 4 @@ -449,3 +449,30 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1 include [refer-glyph : MangleName 'whiteTriangleUp'] AS_BASE ALSO_METRICS include : HSerif.lb (Geom.MidX - triangleSideRadius) Geom.Bot jut GeometryStroke include : HSerif.rb (Geom.MidX + triangleSideRadius) Geom.Bot jut GeometryStroke + + create-glyph [MangleName 'marriageSymbol'] [MangleUnicode 0x26AD] : glyph-proc + set-width Geom.Width + local radius : Geom.Size * Size.SlightlySmall.size + local stroke Size.SlightlySmall.sw + local offsetX : radius / 2 - stroke / 4 + include : union + with-transform [Translate offsetX 0] : refer-glyph : MangleName 'whiteSlightlySmallCircle' + with-transform [Translate (-offsetX) 0] : refer-glyph : MangleName 'whiteSlightlySmallCircle' + + create-glyph [MangleName 'divorceSymbol'] [MangleUnicode 0x26AE] : glyph-proc + set-width Geom.Width + local offsetX : Geom.Size * Size.SlightlySmall.size + [HSwToV : Size.SlightlySmall.sw / 2] + local offsetY : Geom.Size * Size.MediumSmall.size + include : union + with-transform [Translate offsetX 0] : refer-glyph : MangleName 'whiteSlightlySmallCircle' + with-transform [Translate (-offsetX) 0] : refer-glyph : MangleName 'whiteSlightlySmallCircle' + VBar.m Geom.MidX (Geom.MidY - offsetY) (Geom.MidY + offsetY) Size.SlightlySmall.sw + + create-glyph [MangleName 'unmarriedPartnershipSymbol'] [MangleUnicode 0x26AF] : glyph-proc + set-width Geom.Width + local offsetX : MosaicWidth / 4 + local offsetBar : offsetX - Geom.Size * Size.SlightlySmall.size + [HSwToV : Size.SlightlySmall.sw / 2] + include : union + with-transform [Translate offsetX 0] : refer-glyph : MangleName 'whiteSlightlySmallCircle' + with-transform [Translate (-offsetX) 0] : refer-glyph : MangleName 'whiteSlightlySmallCircle' + HBar.m (Geom.MidX - offsetBar) (Geom.MidX + offsetBar) Geom.MidY Size.SlightlySmall.sw diff --git a/packages/font-glyphs/src/symbol/geometric/plain.ptl b/packages/font-glyphs/src/symbol/geometric/plain.ptl index d1373eb50f..f83f2bb38b 100644 --- a/packages/font-glyphs/src/symbol/geometric/plain.ptl +++ b/packages/font-glyphs/src/symbol/geometric/plain.ptl @@ -488,6 +488,7 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1 StdWhiteShape CircleShape 'whiteVerySmallCircle' null Size.VerySmall StdWhiteShape CircleShape 'whiteSmallCircle' null Size.Small + StdWhiteShape CircleShape 'whiteSlightlySmallCircle' null Size.SlightlySmall StdWhiteShape CircleShape 'whiteMediumSmallCircle' 0x26AC Size.MediumSmall StdWhiteShape CircleShape 'whiteMediumCircle' 0x26AA Size.Medium StdWhiteShape CircleShape 'whiteLargeCircle' 0x25EF Size.Large diff --git a/packages/font-glyphs/src/symbol/math/arith.ptl b/packages/font-glyphs/src/symbol/math/arith.ptl index 01db8ccf70..b8fd4c01a2 100644 --- a/packages/font-glyphs/src/symbol/math/arith.ptl +++ b/packages/font-glyphs/src/symbol/math/arith.ptl @@ -386,57 +386,83 @@ glyph-block Symbol-Math-Arith : begin select-variant 'minusFallingDots' 0x2A2B (follow -- 'punctuationDot') select-variant 'minusRisingDots' 0x2A2C (follow -- 'punctuationDot') - do - define fine : AdviceStroke 5.5 - define radius : Math.max ((RightSB - SB) / 8) (fine / 2) - define barOffset radius - define dotCenterOffset : OX + fine + radius + do "small circles" + glyph-block-import Symbol-Arrow : TrigArrowShape - create-glyph 'originalOf' 0x22B6 : glyph-proc - include : difference - union - HBar.m (SB + barOffset) (RightSB - barOffset) SymbolMid OperatorStroke - DotAt (SB + dotCenterOffset) SymbolMid (radius + fine) - DotAt (RightSB - dotCenterOffset) SymbolMid (radius + fine) - DotAt (SB + dotCenterOffset) SymbolMid radius + define fine : AdviceStroke 6 + define radius : (RightSB - SB - [HSwToV : 4 * fine]) / 6 + [HSwToV fine] - OX + define gap : (RightSB - SB) / 2 - (radius - OX) * 2 + define dotCenterOffset : radius + OX - create-glyph 'imageOf' 0x22B7 : glyph-proc - include : difference - union - HBar.m (SB + barOffset) (RightSB - barOffset) SymbolMid OperatorStroke - DotAt (SB + dotCenterOffset) SymbolMid (radius + fine) - DotAt (RightSB - dotCenterOffset) SymbolMid (radius + fine) - DotAt (RightSB - dotCenterOffset) SymbolMid radius + create-glyph : glyph-proc + local bar : HBar.m (SB + dotCenterOffset) (RightSB - dotCenterOffset) SymbolMid OperatorStroke - define singleSideFine : AdviceStroke 4 - define singleSideRadius : Math.max ((RightSB - SB) / 6) (singleSideFine / 2) + local leftFilled : RingAt (SB + dotCenterOffset) SymbolMid radius + local rightFilled : RingAt (RightSB - dotCenterOffset) SymbolMid radius + local leftHollow : RingStrokeAt (SB + dotCenterOffset) SymbolMid radius fine + local rightHollow : RingStrokeAt (RightSB - dotCenterOffset) SymbolMid radius fine + + create-forked-glyph 'originalOf' 0x22B6 : union [difference bar leftFilled] leftHollow rightFilled + create-forked-glyph 'imageOf' 0x22B7 : union [difference bar rightFilled] leftFilled rightHollow + create-forked-glyph 'doubleMultimap' 0x29DF : union [difference bar leftFilled rightFilled] leftHollow rightHollow + + define sFine : AdviceStroke 4.5 + define sRadius : Math.min + (RightSB - SB) / 2 * DesignParameters.geometric_small_x + (RightSB - SB - [HSwToV : 2 * sFine]) / 4 + [HSwToV sFine] - OX + define sGap : (RightSB - SB) / 2 - (sRadius - OX) * 2 + define sDotCenterOffset : sRadius + OX create-glyph 'multimap' 0x22B8 : glyph-proc - include : difference - union - HBar.m SB (RightSB - singleSideRadius) SymbolMid OperatorStroke - DotAt (RightSB - dotCenterOffset) SymbolMid (singleSideRadius + singleSideFine) - DotAt (RightSB - dotCenterOffset) SymbolMid singleSideRadius + include : union + difference + HBar.m SB (RightSB - sDotCenterOffset) SymbolMid OperatorStroke + RingAt (RightSB - sDotCenterOffset) SymbolMid sRadius + RingStrokeAt (RightSB - sDotCenterOffset) SymbolMid sRadius sFine create-glyph 'leftMultimap' 0x27DC : glyph-proc - include : difference - union - HBar.m (SB + singleSideRadius) RightSB SymbolMid OperatorStroke - DotAt (SB + dotCenterOffset) SymbolMid (singleSideRadius + singleSideFine) - DotAt (SB + dotCenterOffset) SymbolMid singleSideRadius + include : union + difference + HBar.m (SB + sDotCenterOffset) RightSB SymbolMid OperatorStroke + RingAt (SB + sDotCenterOffset) SymbolMid sRadius + RingStrokeAt (SB + sDotCenterOffset) SymbolMid sRadius sFine + + # Pawn symbols + define unitedGap : (radius - OX) + gap / 2 + define separatedGap : (radius - OX) + SB + create-glyph 'unitedPawn' 0x2BFA : glyph-proc + include : RingStrokeAt (Middle + unitedGap) SymbolMid radius fine + include : RingStrokeAt (Middle - unitedGap) SymbolMid radius fine - create-glyph 'doubleMultimap' 0x29DF : glyph-proc - include : difference - union - HBar.m (SB + barOffset) (RightSB - barOffset) SymbolMid OperatorStroke - DotAt (SB + dotCenterOffset) SymbolMid (radius + fine) - DotAt (RightSB - dotCenterOffset) SymbolMid (radius + fine) - union - DotAt (SB + dotCenterOffset) SymbolMid radius - DotAt (RightSB - dotCenterOffset) SymbolMid radius + foreach { suffix { DrawAt kDotRadius overshoot } } [Object.entries DotVariants] : do + create-glyph "separatedPawn.\(suffix)" : glyph-proc + include : RingStrokeAt (Middle + separatedGap) SymbolMid radius fine + include : RingStrokeAt (Middle - separatedGap) SymbolMid radius fine + + define space : 2 * SB + define dFine : AdviceStrokeInSpace space HVContrast 3.5 1 + define dr : DotRadius * kDotRadius * dFine / Stroke + include : DrawAt (Middle - space / 4) SymbolMid dr + include : DrawAt (Middle + space / 4) SymbolMid dr + + select-variant 'separatedPawn' 0x2BFB (follow -- 'punctuationDot') + + create-glyph 'doubledPawn' 0x2BFC : glyph-proc + include : RingStrokeAt Middle (SymbolMid + unitedGap) radius fine + include : RingStrokeAt Middle (SymbolMid - unitedGap) radius fine + + create-glyph 'passedPawn' 0x2BFD : glyph-proc + include : TrigArrowShape + * Middle + SymbolMid - unitedGap + radius - (fine / 2) + * Middle + SymbolMid + unitedGap + radius + radius * 0.8 + fine / 2 + include : RingStrokeAt Middle (SymbolMid - unitedGap) radius fine create-glyph 'mathSmallCircle' 0x2218 - RingStrokeAt Middle SymbolMid (singleSideRadius + singleSideFine) singleSideFine + RingStrokeAt Middle SymbolMid sRadius sFine alias 'ringpoint' 0x2E30 'mathSmallCircle' create-glyph 'wreathProduct' 0x2240 : glyph-proc diff --git a/packages/font-glyphs/src/symbol/pictograph/musical.ptl b/packages/font-glyphs/src/symbol/pictograph/musical.ptl index cbd2010422..84dc508cc8 100644 --- a/packages/font-glyphs/src/symbol/pictograph/musical.ptl +++ b/packages/font-glyphs/src/symbol/pictograph/musical.ptl @@ -80,35 +80,56 @@ glyph-block Symbol-Pictograph-Musical : begin x2 + 0 0 - bandWidth - do "sharp, flat and natural" + do "Accidentals" + glyph-block-import Symbol-Arrow : ArrowShape local nsTop PictTop local nsBot PictBot local fine : AdviceStroke 3.5 local fine2 : AdviceStroke 4 - local l : SB - fine * 0 - local r : RightSB + fine * 0 - local hsp : ((r - l) - [HSwToV : 2 * fine]) * 0.3 + local lAcc : SB - fine * 0 + local rAcc : RightSB + fine * 0 + local hsp : ((rAcc - lAcc) - [HSwToV : 2 * fine]) * 0.3 local skew 0.2 + local krNat 0.5 + local lSharp : lAcc + hsp * krNat + local rSharp : rAcc - hsp * krNat + local lFlat : mix SB RightSB 0.07 + local rFlat : mix RightSB SB 0.07 + local lNat : lAcc + hsp * krNat + local rNat : rAcc - hsp * krNat + + local halfVFine : HSwToV : 0.5 * fine + local xUpSharp : rSharp - halfVFine + local xDownSharp : rSharp - halfVFine + local xUpFlat : lFlat + halfVFine + local xDownFlat : lFlat + halfVFine + local xUpNat : lNat + halfVFine + local xDownNat : rNat - halfVFine + local arrowWidth : (RightSB - SB) * 0.35 + local arrowSpace : Math.max (0.9 * arrowWidth) (ParenTop - PictTop) + local arrowTop : nsTop + arrowSpace + local arrowBot : nsBot - arrowSpace + create-glyph 'sharpTone' 0x266F : glyph-proc include : dispiro widths.center - flat l ([mix nsTop nsBot 0.3] - (Middle - l) * skew) [heading Rightward] - curl r ([mix nsTop nsBot 0.3] - (Middle - r) * skew) [heading Rightward] + flat lAcc ([mix nsTop nsBot 0.3] - (Middle - lAcc) * skew) [heading Rightward] + curl rAcc ([mix nsTop nsBot 0.3] - (Middle - rAcc) * skew) [heading Rightward] include : dispiro widths.center - flat l ([mix nsTop nsBot 0.7] - (Middle - l) * skew) [heading Rightward] - curl r ([mix nsTop nsBot 0.7] - (Middle - r) * skew) [heading Rightward] - include : VBar.l (l + hsp) (nsBot - (Middle - l - hsp) * skew) (nsTop - (Middle - l - hsp) * skew) fine - include : VBar.r (r - hsp) (nsBot - (Middle - r + hsp) * skew) (nsTop - (Middle - r + hsp) * skew) fine + flat lAcc ([mix nsTop nsBot 0.7] - (Middle - lAcc) * skew) [heading Rightward] + curl rAcc ([mix nsTop nsBot 0.7] - (Middle - rAcc) * skew) [heading Rightward] + include : VBar.l lSharp (nsBot - (Middle - lSharp) * skew) (nsTop - (Middle - lSharp) * skew) fine + include : VBar.r rSharp (nsBot - (Middle - rSharp) * skew) (nsTop - (Middle - rSharp) * skew) fine define [FlatToneShape _l _r _sw] : glyph-proc local yTerminal : mix nsBot nsTop 0.55 local curly 0.65 local curly2 1.1 local curly3 0.3 - local l : fallback _l [mix SB RightSB 0.07] - local r : fallback _r [mix RightSB SB 0.07] + local l : fallback _l lFlat + local r : fallback _r rFlat local sw : fallback _sw fine define [archShapeT offset] : list @@ -147,41 +168,38 @@ glyph-block Symbol-Pictograph-Musical : begin create-glyph 'naturalTone' 0x266E : glyph-proc local k : 0.25 - (Stroke * 0.25 / (nsTop - nsBot)) - local kr 0.5 - local ll (l + hsp * kr) - local rr (r - hsp * kr) - local barLeft : VBar.l ll [mix nsBot nsTop k] nsTop fine - local barRight : VBar.r rr nsBot [mix nsBot nsTop (1 - k)] fine + local barLeft : VBar.l lNat [mix nsBot nsTop k] nsTop fine + local barRight : VBar.r rNat nsBot [mix nsBot nsTop (1 - k)] fine local diagLow : dispiro widths.lhs fine - flat ll [mix nsBot nsTop k] - curl rr ([mix nsBot nsTop k] + (rr - ll) * skew) + flat lNat [mix nsBot nsTop k] + curl rNat ([mix nsBot nsTop k] + (rNat - lNat) * skew) local belowDiagLow : spiro-outline - corner ll [mix nsBot nsTop k] - corner rr ([mix nsBot nsTop k] + (rr - ll) * skew) - corner rr nsBot - corner ll nsBot + corner lNat [mix nsBot nsTop k] + corner rNat ([mix nsBot nsTop k] + (rNat - lNat) * skew) + corner rNat nsBot + corner lNat nsBot local diagHigh : dispiro widths.lhs fine - flat rr [mix nsBot nsTop (1 - k)] - curl ll ([mix nsBot nsTop (1 - k)] - (rr - ll) * skew) + flat rNat [mix nsBot nsTop (1 - k)] + curl lNat ([mix nsBot nsTop (1 - k)] - (rNat - lNat) * skew) local aboveDiagHigh : spiro-outline - corner rr [mix nsBot nsTop (1 - k)] - corner ll ([mix nsBot nsTop (1 - k)] - (rr - ll) * skew) - corner ll nsTop - corner rr nsTop + corner rNat [mix nsBot nsTop (1 - k)] + corner lNat ([mix nsBot nsTop (1 - k)] - (rNat - lNat) * skew) + corner lNat nsTop + corner rNat nsTop local outsideBars : difference spiro-outline - corner (ll - UPM) (nsBot - UPM) - corner (ll - UPM) (nsTop + UPM) - corner (rr + UPM) (nsTop + UPM) - corner (rr + UPM) (nsBot - UPM) + corner (lNat - UPM) (nsBot - UPM) + corner (lNat - UPM) (nsTop + UPM) + corner (rNat + UPM) (nsTop + UPM) + corner (rNat + UPM) (nsBot - UPM) spiro-outline - corner ll nsBot - corner ll nsTop - corner rr nsTop - corner rr nsBot + corner lNat nsBot + corner lNat nsTop + corner rNat nsTop + corner rNat nsBot include : union difference barLeft belowDiagLow @@ -190,10 +208,10 @@ glyph-block Symbol-Pictograph-Musical : begin difference diagHigh barLeft barRight outsideBars create-glyph 'dblSharpTone' 0x1D12A : glyph-proc - local w : r - l + local w : rAcc - lAcc local t : nsTop - fine * 0 local b : t - w - local cx : mix l r 0.5 + local cx : mix lAcc rAcc 0.5 local cy : mix t b 0.5 local cofine : Math.min (w / 3) (w / 2 - Stroke) local p 0.5 @@ -201,13 +219,13 @@ glyph-block Symbol-Pictograph-Musical : begin include : union difference spiro-outline - corner l t - corner r t - corner r b - corner l b + corner lAcc t + corner rAcc t + corner rAcc b + corner lAcc b union VBar.m cx t b cofine - HBar.m l r cy cofine + HBar.m lAcc rAcc cy cofine spiro-outline corner (cx - size) (cy + size) g4 cx (cy + p * size) @@ -222,20 +240,39 @@ glyph-block Symbol-Pictograph-Musical : begin create-glyph 'dblFlatTone' 0x1D12B : glyph-proc local sw : AdviceStroke 4 include : union - FlatToneShape l (Middle + sw / 3) sw - FlatToneShape (Middle - sw / 3) r sw + FlatToneShape lAcc (Middle + sw / 3) sw + FlatToneShape (Middle - sw / 3) rAcc sw create-glyph 'qtrSharpTone' 0x1D132 : glyph-proc include : dispiro widths.center - flat l ([mix nsTop nsBot 0.3] - (Middle - l) * skew) [heading Rightward] - curl r ([mix nsTop nsBot 0.3] - (Middle - r) * skew) [heading Rightward] + flat lAcc ([mix nsTop nsBot 0.3] - (Middle - lAcc) * skew) [heading Rightward] + curl rAcc ([mix nsTop nsBot 0.3] - (Middle - rAcc) * skew) [heading Rightward] include : dispiro widths.center - flat l ([mix nsTop nsBot 0.7] - (Middle - l) * skew) [heading Rightward] - curl r ([mix nsTop nsBot 0.7] - (Middle - r) * skew) [heading Rightward] + flat lAcc ([mix nsTop nsBot 0.7] - (Middle - lAcc) * skew) [heading Rightward] + curl rAcc ([mix nsTop nsBot 0.7] - (Middle - rAcc) * skew) [heading Rightward] include : VBar.m Middle nsBot nsTop fine create-glyph 'qtrFlatTone' 0x1D133 : glyph-proc include : FlatToneShape include : FlipAround Middle SymbolMid (-1) 1 + + create-glyph 'flatToneUp' 0x1D12C : composite-proc + refer-glyph 'flatTone' AS_BASE ALSO_METRICS + ArrowShape xUpFlat SymbolMid xUpFlat arrowTop arrowWidth halfVFine + create-glyph 'flatToneDown' 0x1D12D : composite-proc + refer-glyph 'flatTone' AS_BASE ALSO_METRICS + ArrowShape xDownFlat SymbolMid xDownFlat arrowBot arrowWidth halfVFine + create-glyph 'naturalToneUp' 0x1D12E : composite-proc + refer-glyph 'naturalTone' AS_BASE ALSO_METRICS + ArrowShape xUpNat SymbolMid xUpNat arrowTop arrowWidth halfVFine + create-glyph 'naturalToneDown' 0x1D12F : composite-proc + refer-glyph 'naturalTone' AS_BASE ALSO_METRICS + ArrowShape xDownNat SymbolMid xDownNat arrowBot arrowWidth halfVFine + create-glyph 'sharpToneUp' 0x1D130 : composite-proc + refer-glyph 'sharpTone' AS_BASE ALSO_METRICS + ArrowShape xUpSharp SymbolMid xUpSharp arrowTop arrowWidth halfVFine + create-glyph 'sharpToneDown' 0x1D131 : composite-proc + refer-glyph 'sharpTone' AS_BASE ALSO_METRICS + ArrowShape xDownSharp SymbolMid xDownSharp arrowBot arrowWidth halfVFine