Skip to content

Commit 8ad0efe

Browse files
authored
Collection of around 17 arrows (#2613)
* Arrows * doc
1 parent 4b0edd4 commit 8ad0efe

File tree

2 files changed

+161
-15
lines changed

2 files changed

+161
-15
lines changed

changes/32.3.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,6 @@
111111
- Z NOTATION RANGE ANTIRESTRICTION (`U+2A65`).
112112
- SMALLER THAN (`U+2AAA`) ... LARGER THAN OR EQUAL TO (`U+2AAD`).
113113
- CLOSED SUBSET (`U+2ACF`) ... CLOSED SUPERSET OR EQUAL TO (`U+2AD2`).
114+
- ANTICLOCKWISE TRIANGLE-HEADED RIGHT U-SHAPED ARROW (`U+2B8C`) ... ANTICLOCKWISE TRIANGLE-HEADED TOP U-SHAPED ARROW (`U+2B8F`).
115+
- RETURN LEFT (`U+2B90`) ... FOUR CORNER ARROWS CIRCLING ANTICLOCKWISE (`U+2B94`).
116+
- DOWNWARDS TRIANGLE-HEADED ARROW WITH LONG TIP LEFTWARDS (`U+2BA0`) ... RIGHTWARDS TRIANGLE-HEADED ARROW WITH LONG TIP DOWNWARDS (`U+2BA7`).

packages/font-glyphs/src/symbol/arrow.ptl

Lines changed: 158 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1
536536
create-glyph id unicode : glyph-proc
537537
set-width MosaicWidth
538538
include : union
539-
shape x2 y2 x3 y3 size
539+
shape x2 y2 x3 y3 [fallback size arrowHeadSize]
540540
bar x1 y1 x2 y2
541541

542542
do "Straight Arrow"
@@ -706,23 +706,166 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1
706706
define bendT : SymbolMid + bendArrowHeadSize * 2
707707
define bendB : SymbolMid - bendArrowHeadSize * 2
708708

709-
define [VBS x1 y1 x2 y2] : VBar.m x1 y1 (y2 - 0.5 * arrowSw) arrowSw
710-
define [VBE x1 y1 x2 y2] : VBar.m x1 y1 (y2 + 0.5 * arrowSw) arrowSw
711-
define [HBS x1 y1 x2 y2] : HBar.m x1 (x2 - 0.5 * arrowSw) y1 arrowSw
712-
define [HBE x1 y1 x2 y2] : HBar.m x1 (x2 + 0.5 * arrowSw) y1 arrowSw
709+
define [VBS x1 y1 x2 y2] : ArrowBar x1 y1 x2 (y2 - halfArrowSw) halfArrowSw 0 0
710+
define [VBE x1 y1 x2 y2] : ArrowBar x1 y1 x2 (y2 + halfArrowSw) halfArrowSw 0 0
711+
define [HBS x1 y1 x2 y2] : ArrowBar x1 y1 (x2 - halfArrowSw) y2 halfArrowSw 0 0
712+
define [HBE x1 y1 x2 y2] : ArrowBar x1 y1 (x2 + halfArrowSw) y2 halfArrowSw 0 0
713713

714-
MkAngleArrow ArrowShape VBE [MangleName 'Arrow-up-angle-bend-left'] [MangleUnicode 0x21b0] bendR arrowBot bendR (arrowTop - bendArrowHeadSize) bendL (arrowTop - bendArrowHeadSize) bendArrowHeadSize
715-
MkAngleArrow ArrowShape VBE [MangleName 'Arrow-up-angle-bend-right'] [MangleUnicode 0x21b1] bendL arrowBot bendL (arrowTop - bendArrowHeadSize) bendR (arrowTop - bendArrowHeadSize) bendArrowHeadSize
716-
MkAngleArrow ArrowShape VBS [MangleName 'Arrow-down-angle-bend-left'] [MangleUnicode 0x21b2] bendR arrowTop bendR (arrowBot + bendArrowHeadSize) bendL (arrowBot + bendArrowHeadSize) bendArrowHeadSize
717-
MkAngleArrow ArrowShape VBS [MangleName 'Arrow-down-angle-bend-right'] [MangleUnicode 0x21b3] bendL arrowTop bendL (arrowBot + bendArrowHeadSize) bendR (arrowBot + bendArrowHeadSize) bendArrowHeadSize
714+
MkAngleArrow ArrowShape VBE [MangleName 'arrowUpTipBendLeft'] [MangleUnicode 0x21B0] bendR arrowBot bendR (arrowTop - bendArrowHeadSize) bendL (arrowTop - bendArrowHeadSize) bendArrowHeadSize
715+
MkAngleArrow ArrowShape VBE [MangleName 'arrowUpTipBendRight'] [MangleUnicode 0x21B1] bendL arrowBot bendL (arrowTop - bendArrowHeadSize) bendR (arrowTop - bendArrowHeadSize) bendArrowHeadSize
716+
MkAngleArrow ArrowShape VBS [MangleName 'arrowDownTipBendLeft'] [MangleUnicode 0x21B2] bendR arrowTop bendR (arrowBot + bendArrowHeadSize) bendL (arrowBot + bendArrowHeadSize) bendArrowHeadSize
717+
MkAngleArrow ArrowShape VBS [MangleName 'arrowDownTipBendRight'] [MangleUnicode 0x21B3] bendL arrowTop bendL (arrowBot + bendArrowHeadSize) bendR (arrowBot + bendArrowHeadSize) bendArrowHeadSize
718718

719-
MkAngleArrow ArrowShape HBE [MangleName 'Arrow-right-angle-bend-down'] [MangleUnicode 0x2B0E] arrowSB SymbolMid (arrowRSB - bendArrowHeadSize) SymbolMid (arrowRSB - bendArrowHeadSize) bendB bendArrowHeadSize
720-
MkAngleArrow ArrowShape HBE [MangleName 'Arrow-right-angle-bend-up'] [MangleUnicode 0x2B0F] arrowSB SymbolMid (arrowRSB - bendArrowHeadSize) SymbolMid (arrowRSB - bendArrowHeadSize) bendT bendArrowHeadSize
721-
MkAngleArrow ArrowShape HBS [MangleName 'Arrow-left-angle-bend-down'] [MangleUnicode 0x2B10] arrowRSB SymbolMid (arrowSB + bendArrowHeadSize) SymbolMid (arrowSB + bendArrowHeadSize) bendB bendArrowHeadSize
722-
MkAngleArrow ArrowShape HBS [MangleName 'Arrow-left-angle-bend-up'] [MangleUnicode 0x2B11] arrowRSB SymbolMid (arrowSB + bendArrowHeadSize) SymbolMid (arrowSB + bendArrowHeadSize) bendT bendArrowHeadSize
719+
MkAngleArrow ArrowShape HBE [MangleName 'arrowRightTipBendDown'] [MangleUnicode 0x2B0E] arrowSB SymbolMid (arrowRSB - bendArrowHeadSize) SymbolMid (arrowRSB - bendArrowHeadSize) bendB bendArrowHeadSize
720+
MkAngleArrow ArrowShape HBE [MangleName 'arrowRightTipBendUp'] [MangleUnicode 0x2B0F] arrowSB SymbolMid (arrowRSB - bendArrowHeadSize) SymbolMid (arrowRSB - bendArrowHeadSize) bendT bendArrowHeadSize
721+
MkAngleArrow ArrowShape HBS [MangleName 'arrowLeftTipBendDown'] [MangleUnicode 0x2B10] arrowRSB SymbolMid (arrowSB + bendArrowHeadSize) SymbolMid (arrowSB + bendArrowHeadSize) bendB bendArrowHeadSize
722+
MkAngleArrow ArrowShape HBS [MangleName 'arrowLeftTipBendUp'] [MangleUnicode 0x2B11] arrowRSB SymbolMid (arrowSB + bendArrowHeadSize) SymbolMid (arrowSB + bendArrowHeadSize) bendT bendArrowHeadSize
723+
724+
MkAngleArrow ArrowShape HBE [MangleName 'arrowRightCornerDown'] [MangleUnicode 0x21B4] arrowSB arrowTop (arrowRSB - arrowHeadSize) arrowTop (arrowRSB - arrowHeadSize) arrowBot arrowHeadSize
725+
MkAngleArrow ArrowShape VBS [MangleName 'arrowDownCornerLeft'] [MangleUnicode 0x21B5] arrowRSB arrowTop arrowRSB (arrowBot + arrowHeadSize) arrowSB (arrowBot + arrowHeadSize) arrowHeadSize
726+
727+
# Bent TrigArrows
728+
local hcDist : Math.max (halfArrowSw * 5) (arrowWidth / 2)
729+
local vcDist : arrowHeadSize * 1.75
730+
731+
define yLower : SymbolMid - vcDist / 2
732+
define yUpper : SymbolMid + vcDist / 2
733+
define xLeft : arrowMidX - hcDist / 2
734+
define xRight : arrowMidX + hcDist / 2
735+
define arrowSB2 : arrowSB + halfArrowSw
736+
define arrowRSB2 : arrowRSB - halfArrowSw
737+
738+
MkAngleArrow TrigArrowShape VBS [MangleName 'trigArrowDownLongBendLeft'] [MangleUnicode 0x2BA0] arrowRSB2 yUpper arrowRSB2 yLower arrowSB yLower
739+
MkAngleArrow TrigArrowShape VBS [MangleName 'trigArrowDownLongBendRight'] [MangleUnicode 0x2BA1] arrowSB2 yUpper arrowSB2 yLower arrowRSB yLower
740+
MkAngleArrow TrigArrowShape VBE [MangleName 'trigArrowUpLongBendLeft'] [MangleUnicode 0x2BA2] arrowRSB2 yLower arrowRSB2 yUpper arrowSB yUpper
741+
MkAngleArrow TrigArrowShape VBE [MangleName 'trigArrowUpLongBendRight'] [MangleUnicode 0x2BA3] arrowSB2 yLower arrowSB2 yUpper arrowRSB yUpper
742+
MkAngleArrow TrigArrowShape HBS [MangleName 'trigArrowLeftLongBendUp'] [MangleUnicode 0x2BA4] xRight arrowBot xLeft arrowBot xLeft arrowTop
743+
MkAngleArrow TrigArrowShape HBE [MangleName 'trigArrowRightLongBendUp'] [MangleUnicode 0x2BA5] xLeft arrowBot xRight arrowBot xRight arrowTop
744+
MkAngleArrow TrigArrowShape HBS [MangleName 'trigArrowLeftLongBendDown'] [MangleUnicode 0x2BA6] xRight arrowTop xLeft arrowTop xLeft arrowBot
745+
MkAngleArrow TrigArrowShape HBE [MangleName 'trigArrowRightLongBendDown'] [MangleUnicode 0x2BA7] xLeft arrowTop xRight arrowTop xRight arrowBot
746+
747+
# Complex Bent Arrows
748+
define pSlant 0.2
749+
create-glyph [MangleName 'arrowReturnLeft'] [MangleUnicode 0x2B90] : glyph-proc
750+
set-width MosaicWidth
751+
local x1 : mix arrowRSB arrowSB pSlant
752+
include : TrigArrowShape x1 yLower arrowSB yLower arrowHeadSize
753+
include : intersection [MaskBelow : yUpper + halfArrowSw] : dispiro
754+
widths.lhs arrowSw
755+
disable-contrast
756+
flat x1 (yLower - halfArrowSw)
757+
curl arrowRSB (yUpper + halfArrowSw)
758+
include : intersection
759+
MaskLeftLine x1 (yLower - halfArrowSw) arrowRSB (yUpper + halfArrowSw)
760+
ArrowBar arrowMidX yUpper arrowRSB yUpper halfArrowSw 0 0
761+
762+
create-glyph [MangleName 'arrowReturnRight'] [MangleUnicode 0x2B91] : glyph-proc
763+
set-width MosaicWidth
764+
local x1 : mix arrowSB arrowRSB pSlant
765+
include : TrigArrowShape x1 yLower arrowRSB yLower arrowHeadSize
766+
include : intersection [MaskBelow : yUpper + halfArrowSw] : dispiro
767+
widths.rhs arrowSw
768+
disable-contrast
769+
flat x1 (yLower - halfArrowSw)
770+
curl arrowSB (yUpper + halfArrowSw)
771+
include : intersection
772+
MaskRightLine x1 (yLower - halfArrowSw) arrowSB (yUpper + halfArrowSw)
773+
ArrowBar arrowMidX yUpper arrowSB yUpper halfArrowSw 0 0
774+
775+
define pNewline 0.35
776+
define pGap : StrokeWidthBlend 0.1 0.05
777+
define arrowGapX : pGap * (arrowRSB - arrowSB)
778+
define arrowGapX2 : 0.1 * (arrowRSB - arrowSB)
779+
define arrowGapY : pGap * (arrowTop - arrowBot)
780+
create-glyph [MangleName 'arrowNewlineLeft'] [MangleUnicode 0x2B92] : glyph-proc
781+
set-width MosaicWidth
782+
local x1 : mix arrowRSB arrowSB pNewline
783+
local x2 : mix arrowSB arrowRSB pNewline
784+
local x3 : arrowRSB - halfArrowSw
785+
include : ArrowBar arrowSB yUpper (x1 - arrowGapX2) yUpper halfArrowSw 0 0
786+
include : ArrowBar x1 yUpper arrowRSB yUpper halfArrowSw 0 0
787+
include : ArrowBar x3 yUpper x3 yLower halfArrowSw 0 0
788+
include : TrigArrowShape arrowRSB yLower x2 yLower arrowHeadSize
789+
include : ArrowBar (x2 - arrowGapX) yLower arrowSB yLower halfArrowSw 0 0
790+
791+
create-glyph [MangleName 'arrowNewlineRight'] [MangleUnicode 0x2B93] : glyph-proc
792+
set-width MosaicWidth
793+
local x1 : mix arrowSB arrowRSB pNewline
794+
local x2 : mix arrowRSB arrowSB pNewline
795+
local x3 : arrowSB + halfArrowSw
796+
include : ArrowBar arrowRSB yUpper (x1 + arrowGapX2) yUpper halfArrowSw 0 0
797+
include : ArrowBar x1 yUpper arrowSB yUpper halfArrowSw 0 0
798+
include : ArrowBar x3 yUpper x3 yLower halfArrowSw 0 0
799+
include : TrigArrowShape arrowSB yLower x2 yLower arrowHeadSize
800+
include : ArrowBar (x2 + arrowGapX) yLower arrowRSB yLower halfArrowSw 0 0
801+
802+
create-glyph [MangleName 'arrowCirclingCCW'] [MangleUnicode 0x2B94] : glyph-proc
803+
set-width MosaicWidth
804+
define headSize : arrowHeadSize * 0.5
805+
define offset : 0.75 * headSize / 2
806+
include : VBE xRight (SymbolMid + offset + arrowGapY) xRight yUpper
807+
include : TrigArrowShape xRight yUpper (arrowMidX - offset) yUpper headSize
808+
include : HBS (arrowMidX - offset - arrowGapX) yUpper xLeft yUpper
809+
include : TrigArrowShape xLeft yUpper xLeft (SymbolMid - offset) headSize
810+
include : VBS xLeft (SymbolMid - offset - arrowGapY) xLeft yLower
811+
include : TrigArrowShape xLeft yLower (arrowMidX + offset) yLower headSize
812+
include : HBE (arrowMidX + offset + arrowGapX) yLower xRight yLower
813+
include : TrigArrowShape xRight yLower xRight (SymbolMid + offset) headSize
814+
815+
# U-Shaped Arrows
816+
create-glyph [MangleName 'trigArrowUShapeLeft'] [MangleUnicode 0x2B8C] : glyph-proc
817+
set-width MosaicWidth
818+
include : dispiro
819+
widths.center arrowSw
820+
disable-contrast
821+
flat arrowSB yLower [heading Rightward]
822+
curl (arrowRSB2 - vcDist / 2) yLower
823+
archv
824+
g4 arrowRSB2 SymbolMid
825+
arcvh
826+
flat (arrowRSB2 - vcDist / 2) yUpper
827+
curl arrowMidX yUpper [heading Leftward]
828+
include : TrigArrowShape arrowMidX yUpper arrowSB yUpper arrowHeadSize
829+
create-glyph [MangleName 'trigArrowUShapeUp'] [MangleUnicode 0x2B8D] : glyph-proc
830+
set-width MosaicWidth
831+
include : dispiro
832+
widths.center arrowSw
833+
disable-contrast
834+
flat xLeft arrowTop [heading {.x 1 .y 0}]
835+
curl xLeft (arrowBot + hcDist / 2)
836+
arcvh
837+
g4 arrowMidX arrowBot
838+
archv
839+
flat xRight (arrowBot + hcDist / 2)
840+
curl xRight [Math.max SymbolMid : arrowBot + hcDist / 2 + TINY] [heading {.x (-1) .y 0}]
841+
include : TrigArrowShape xRight SymbolMid xRight arrowTop arrowHeadSize
842+
create-glyph [MangleName 'trigArrowUShapeRight'] [MangleUnicode 0x2B8E] : glyph-proc
843+
set-width MosaicWidth
844+
include : dispiro
845+
widths.center arrowSw
846+
disable-contrast
847+
flat arrowRSB yUpper [heading Leftward]
848+
curl (arrowSB2 + vcDist / 2) yUpper
849+
archv
850+
g4 arrowSB2 SymbolMid
851+
arcvh
852+
flat (arrowSB2 + vcDist / 2) yLower
853+
curl arrowMidX yLower [heading Rightward]
854+
include : TrigArrowShape arrowMidX yLower arrowRSB yLower arrowHeadSize
855+
create-glyph [MangleName 'trigArrowUShapeDown'] [MangleUnicode 0x2B8F] : glyph-proc
856+
set-width MosaicWidth
857+
include : dispiro
858+
widths.center arrowSw
859+
disable-contrast
860+
flat xRight arrowBot [heading {.x (-1) .y 0}]
861+
curl xRight (arrowTop - hcDist / 2)
862+
arcvh
863+
g4 arrowMidX arrowTop
864+
archv
865+
flat xLeft (arrowTop - hcDist / 2)
866+
curl xLeft [Math.min SymbolMid : arrowTop - hcDist / 2 - TINY] [heading {.x 1 .y 0}]
867+
include : TrigArrowShape xLeft SymbolMid xLeft arrowBot arrowHeadSize
723868

724-
MkAngleArrow ArrowShape HBE [MangleName 'Arrow-right-angle-down'] [MangleUnicode 0x21b4] arrowSB arrowTop (arrowRSB - arrowHeadSize) arrowTop (arrowRSB - arrowHeadSize) arrowBot arrowHeadSize
725-
MkAngleArrow ArrowShape VBS [MangleName 'Arrow-down-angle-left'] [MangleUnicode 0x21b5] arrowRSB arrowTop arrowRSB (arrowBot + arrowHeadSize) arrowSB (arrowBot + arrowHeadSize) arrowHeadSize
726869

727870
do "Half-head Arrows"
728871
MkArrow [HalfArrowShape RHSHalfArrowHead] [MangleName 'arrowLeftHR'] [MangleUnicode 0x21BC] arrowRSB SymbolMid arrowSB SymbolMid

0 commit comments

Comments
 (0)