Skip to content

Commit 8056f49

Browse files
authored
Fix(?) Guillemet + Around 13 Keyboard/Technical Symbols (#2662)
* guillmet fix * arrow head, electric arrow * keyboard symbols * more dimension symbols * doc * minor fix
1 parent 3a2b7a3 commit 8056f49

File tree

7 files changed

+227
-30
lines changed

7 files changed

+227
-30
lines changed

changes/32.5.0.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,17 @@
1111
- HORIZONTAL ZIGZAG LINE (`U+1CEB0`).
1212
* Optimize metrics for bowl of Cyrillic Lower Ef (`ф`) and Greek Small Letter Phi Symbol (`ϕ`).
1313
* Add italic form for Cyrillic Small Letter Ghe with Upturn (`ґ`).
14+
* Add characters:
15+
- ELECTRIC ARROW (`U+2301`).
16+
- UP ARROWHEAD (`U+2303`).
17+
- DOWN ARROWHEAD (`U+2304`).
18+
- POSITION INDICATOR (`U+2316`).
19+
- UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS (`U+2324`).
20+
- OPTION KEY (`U+2325`).
21+
- CYLINDRICITY (`U+232D`).
22+
- ALL AROUND-PROFILE (`U+232E`).
23+
- TOTAL RUNOUT (`U+2330`).
24+
- DIMENSION ORIGIN (`U+2331`).
25+
- ENTER SYMBOL (`U+2386`).
26+
- ALTERNATIVE KEY SYMBOL (`U+2387`).
27+
- SQUARE POSITION INDICATOR (`U+2BD0`).

packages/font-glyphs/src/letter/latin/w.ptl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ glyph-block Letter-Latin-W : begin
297297
include : VerticalHook.r df.rightSB (top - TailY - HalfStroke - O) TailX (-TailY) (sw -- df.mvs)
298298

299299
define [WCursiveImplImpl fHookTop df top bodyType slabType] : glyph-proc
300-
define fine : AdviceStroke 3.25 df.advs
300+
define fine : AdviceStroke 3.25 df.adws
301301
define mfine : fine * CThin
302302
define x0 : mix df.leftSB df.rightSB 0.1
303303
define y0 : top - O

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,14 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1
15881588
curl [mix x2 x3 pLastSeg] [mix y2 y3 pLastSeg]
15891589
include : ArrowHead x2 y2 x3 y3 arrowHeadSize
15901590

1591+
do "Arrow Heads"
1592+
create-glyph [MangleName 'arrowHeadUp'] [MangleUnicode 0x2303] : glyph-proc
1593+
set-width MosaicWidth
1594+
include : ArrowHead arrowMidX arrowBot arrowMidX arrowTop
1595+
create-glyph [MangleName 'arrowHeadDown'] [MangleUnicode 0x2304] : glyph-proc
1596+
set-width MosaicWidth
1597+
include : ArrowHead arrowMidX arrowTop arrowMidX arrowBot
1598+
15911599
do "Legacy computing arrows"
15921600
define bodyWidth : Math.min arrowWidth (arrowHeight * 0.6)
15931601
create-glyph [MangleName 'arrowUpThenNW'] [MangleUnicode 0x1F8B0] : glyph-proc
@@ -1660,4 +1668,4 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1
16601668
include : FlipAround arrowMidX SymbolMid
16611669

16621670
if (MosaicWidthScalar == 1) : begin
1663-
glyph-block-export ArrowShape ArrowHead ArrowBar TrigArrowShape
1671+
glyph-block-export ArrowShape ArrowHead ArrowBar TrigArrowShape TriangleArrowHead

packages/font-glyphs/src/symbol/geometric/masked.ptl

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,90 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
329329
dispiro [widths.rhs GeometryStroke] [corner Geom.MidX Geom.MidY] [corner Geom.Left Geom.Top]
330330

331331
do "Miscellaneous"
332+
glyph-block-import Symbol-Arrow : TrigArrowShape
333+
334+
define fineGeometryStroke : AdviceStroke2 4 4 Geom.Size
335+
create-glyph [MangleName 'positionIndicator'] [MangleUnicode 0x2316] : glyph-proc
336+
set-width Geom.Width
337+
include : refer-glyph : MangleName 'whiteMediumCircle'
338+
include : difference
339+
union
340+
HBar.m Geom.Left Geom.Right Geom.MidY GeometryStroke
341+
VBar.m Geom.MidX Geom.Bot Geom.Top GeometryStroke
342+
refer-glyph : MangleName 'blackMediumCircle'
343+
include : intersection
344+
union
345+
HBar.m Geom.Left Geom.Right Geom.MidY fineGeometryStroke
346+
VBar.m Geom.MidX Geom.Bot Geom.Top fineGeometryStroke
347+
refer-glyph : MangleName 'blackMediumCircle'
348+
349+
create-glyph [MangleName 'positionIndicatorSquare'] [MangleUnicode 0x2BD0] : glyph-proc
350+
set-width Geom.Width
351+
include : refer-glyph : MangleName 'whiteMediumSquare'
352+
include : difference
353+
union
354+
HBar.m Geom.Left Geom.Right Geom.MidY GeometryStroke
355+
VBar.m Geom.MidX Geom.Bot Geom.Top GeometryStroke
356+
refer-glyph : MangleName 'blackMediumSquare'
357+
include : intersection
358+
union
359+
HBar.m Geom.Left Geom.Right Geom.MidY fineGeometryStroke
360+
VBar.m Geom.MidX Geom.Bot Geom.Top fineGeometryStroke
361+
refer-glyph : MangleName 'blackMediumSquare'
362+
363+
create-glyph [MangleName 'cylindricity'] [MangleUnicode 0x232D] : glyph-proc
364+
set-width Geom.Width
365+
local radius : Geom.Size * Size.Medium.size
366+
local x1 Geom.Left
367+
local y1 : Geom.Bot + 0.15 * GeometryStroke
368+
local y2 Geom.Top
369+
local dist : Math.hypot (Geom.MidX - x1) (Geom.MidY - y1)
370+
local tan1 : radius / [Math.sqrt : dist ** 2 - radius ** 2]
371+
local tan2 : (Geom.MidY - y1) / (Geom.MidX - x1)
372+
local tan3 : (tan1 + tan2) / (1 - tan1 * tan2)
373+
local x2 : x1 + (y2 - y1) / tan3
374+
include : difference
375+
union
376+
dispiro
377+
widths.rhs GeometryStroke
378+
flat x1 y1
379+
curl x2 y2
380+
dispiro
381+
widths.rhs GeometryStroke
382+
flat [mix x1 Geom.MidX 2] [mix y1 Geom.MidY 2]
383+
curl [mix x2 Geom.MidX 2] [mix y2 Geom.MidY 2]
384+
refer-glyph : MangleName 'blackMediumCircle'
385+
include : refer-glyph : MangleName 'whiteMediumCircle'
386+
387+
create-glyph [MangleName 'allRoundProfile'] [MangleUnicode 0x232E] : glyph-proc
388+
set-width Geom.Width
389+
include : refer-glyph : MangleName 'whiteMediumCircle'
390+
local mx : Geom.MidX - Geom.Size * 0.5
391+
local my : Geom.MidY - Geom.Size * 0.5
392+
include : dispiro
393+
disable-contrast
394+
flat Geom.Right Geom.MidY [widths.center.heading GeometryStroke Leftward]
395+
sharp-corner Geom.MidX Geom.MidY (contrast -- 1)
396+
curl mx my [widths.center GeometryStroke]
397+
include : TrigArrowShape mx my Geom.Left Geom.Bot (Geom.Size * 0.375 / Math.SQRT1_2) (GeometryStroke / 2)
398+
399+
create-glyph [MangleName 'dimensionOrigin'] [MangleUnicode 0x2331] : glyph-proc
400+
set-width Geom.Width
401+
include : refer-glyph : MangleName 'whiteMediumCircle'
402+
local offset : Geom.Size * (1 - Size.Medium.size)
403+
include : difference
404+
union
405+
TrigArrowShape Geom.MidX Geom.MidY (Geom.Right + offset) Geom.MidY (Geom.Size * 0.375 / Math.SQRT1_2) (GeometryStroke / 2)
406+
VBar.m Geom.MidX Geom.Bot Geom.Top GeometryStroke
407+
refer-glyph : MangleName 'blackMediumCircle'
408+
include : intersection
409+
union
410+
HBar.m Geom.MidX Geom.Right Geom.MidY fineGeometryStroke
411+
VBar.m Geom.MidX Geom.Bot Geom.Top fineGeometryStroke
412+
refer-glyph : MangleName 'blackMediumCircle'
413+
414+
include : Translate (-offset) 0
415+
332416
create-glyph [MangleName 'uni2389'] [MangleUnicode 0x2389] : glyph-proc
333417
define shiftUp : ApparentTranslate 0
334418
Math.max
@@ -354,6 +438,18 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
354438
refer-glyph : MangleName 'blackCircleO'
355439
refer-glyph : MangleName 'whiteEqualTriangleDown'
356440

441+
create-glyph [MangleName 'enterSymbol'] [MangleUnicode 0x2386] : glyph-proc
442+
set-width Geom.Width
443+
include : difference
444+
refer-glyph : MangleName 'whiteDiamond'
445+
intersection [MaskLeftLine Geom.MidX (Geom.MidY - Geom.Size / 3) Geom.MidX (Geom.MidY + Geom.Size / 3)]
446+
include : HBar.m Geom.Left Geom.MidX Geom.MidY GeometryStroke
447+
local size : Geom.Size * 0.375 / Math.SQRT1_2
448+
include : spiro-outline
449+
corner Geom.MidX (Geom.MidY + size)
450+
corner (Geom.MidX + size) Geom.MidY
451+
corner Geom.MidX (Geom.MidY - size)
452+
357453
create-glyph [MangleName 'uni238B'] [MangleUnicode 0x238B] : glyph-proc
358454
set-width Geom.Width
359455
include : difference
@@ -441,6 +537,7 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
441537
refer-glyph : MangleName 'blackLozenge'
442538
HBar.m 0 MosaicWidth Geom.MidY GeometryStroke
443539

540+
# Mathematical Triangle Symbols
444541
define triangleSideRadius : Geom.Size * 2.1 / [Math.sqrt 3]
445542
derive-multi-part-glyphs [MangleName 'whiteTriangleUpDotAbove'] [MangleUnicode 0x29CA] { [MangleName 'whiteTriangleUp'] 'dotAbove' } : lambda [srcs gr] : glyph-proc
446543
local { base mark } srcs
@@ -458,6 +555,7 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
458555
include : HSerif.lb (Geom.MidX - triangleSideRadius) Geom.Bot jut GeometryStroke
459556
include : HSerif.rb (Geom.MidX + triangleSideRadius) Geom.Bot jut GeometryStroke
460557

558+
# Genealogy Symbols
461559
create-glyph [MangleName 'marriageSymbol'] [MangleUnicode 0x26AD] : glyph-proc
462560
set-width Geom.Width
463561
local radius : Geom.Size * Size.SlightlySmall.size

packages/font-glyphs/src/symbol/geometric/technical.ptl

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ glyph-block Symbol-Geometric-Technical : for-width-kinds WideWidth1
99
glyph-block-import CommonShapes
1010
glyph-block-import Common-Derivatives
1111
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
12-
glyph-block-import Shared-Symbol-Shapes : TriangleShape
12+
glyph-block-import Shared-Symbol-Shapes : TriangleShape Polyline
13+
glyph-block-import Symbol-Arrow : ArrowShape ArrowHead TrigArrowShape
1314

1415
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
1516
define Size : GeometricSizes Geom
@@ -29,6 +30,25 @@ glyph-block Symbol-Geometric-Technical : for-width-kinds WideWidth1
2930
include : HBar.b (Geom.Left + xShrink) (Geom.Right - xShrink) (Geom.MidY + yOffset) GeometryStroke
3031
include : HBar.t (Geom.Left + xShrink) (Geom.Right - xShrink) (Geom.MidY - yOffset) GeometryStroke
3132

33+
create-glyph [MangleName 'totalRunoff'] [MangleUnicode 0x2330] : glyph-proc
34+
set-width Geom.Width
35+
local headSize : Geom.Size * 0.375 / Math.SQRT1_2
36+
local offset : Geom.Size * 0.4
37+
local x0 Geom.Left
38+
local x1 : Geom.Left + offset
39+
local x2 : Geom.Right - offset - headSize * 0.35
40+
local x3 : Geom.Right - headSize * 0.35
41+
local vsw : HSwToV : 0.5 * GeometryStroke
42+
include : dispiro
43+
disable-contrast
44+
flat ([mix x0 x1 0.75] + vsw) [mix Geom.Bot Geom.Top 0.75] [widths.center GeometryStroke]
45+
sharp-corner (x0 + vsw) Geom.Bot (contrast -- 1)
46+
corner Geom.MidX Geom.Bot [widths.lhs GeometryStroke]
47+
sharp-corner (x2 - vsw) Geom.Bot (contrast -- 1)
48+
curl ([mix x2 x3 0.75] - vsw) [mix Geom.Bot Geom.Top 0.75] [widths.center GeometryStroke]
49+
include : TrigArrowShape ([mix x0 x1 0.5] + vsw) Geom.MidY (x1 + vsw) Geom.Top headSize (GeometryStroke / 2)
50+
include : TrigArrowShape ([mix x2 x3 0.5] - vsw) Geom.MidY (x3 - vsw) Geom.Top headSize (GeometryStroke / 2)
51+
3252
create-glyph [MangleName 'conicalTaper'] [MangleUnicode 0x2332] : glyph-proc
3353
set-width Geom.Width
3454
include : TriangleShape Geom.Left (Geom.MidY - Geom.Size * 0.8) Geom.Left (Geom.MidY + Geom.Size * 0.8) Geom.Right Geom.MidY fineGeometryStroke
@@ -38,6 +58,17 @@ glyph-block Symbol-Geometric-Technical : for-width-kinds WideWidth1
3858
set-width Geom.Width
3959
include : TriangleShape Geom.Left Geom.Bot Geom.Left Geom.MidY Geom.Right Geom.Bot fineGeometryStroke
4060

61+
create-glyph [MangleName 'electricArrow'] [MangleUnicode 0x2301] : glyph-proc
62+
set-width Geom.Width
63+
define amp : Geom.Size / 2
64+
define amp2 : Geom.Size / 4
65+
include : intersection [MaskRight Geom.Left] [MaskLeft Geom.Right] : dispiro
66+
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY + amp2 * 4) [widths.center GeometryStroke]
67+
sharp-corner Geom.MidX (Geom.MidY - amp)
68+
corner Geom.MidX Geom.MidY [widths.center.heading GeometryStroke Upward]
69+
sharp-corner Geom.MidX (Geom.MidY + amp)
70+
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY - amp2 * 4) [widths.center GeometryStroke]
71+
4172
create-glyph [MangleName 'viewdataSquare'] [MangleUnicode 0x2317] : glyph-proc
4273
set-width Geom.Width
4374
define shrink : Geom.Size * 2 * 0.13
@@ -83,3 +114,44 @@ glyph-block Symbol-Geometric-Technical : for-width-kinds WideWidth1
83114
arcvh 4
84115
flat @x2 @y3
85116
curl Geom.MidX @y3
117+
118+
do "Keyboard Symbols"
119+
define topLine : Geom.MidY + Geom.Size / 1.5
120+
define botLine : Geom.MidY - Geom.Size / 1.5
121+
define topLineC : topLine - GeometryStroke / 2
122+
define botLineC : botLine + GeometryStroke / 2
123+
124+
create-glyph [MangleName 'arrowHeadUpBetweenBars'] [MangleUnicode 0x2324] : glyph-proc
125+
set-width MosaicWidth
126+
include : ArrowHead Geom.MidX Geom.Bot Geom.MidX topLine
127+
include : HBar.t Geom.Left (Geom.MidX - Geom.Size / 3) topLine GeometryStroke
128+
include : HBar.t (Geom.MidX + Geom.Size / 3) Geom.Right topLine GeometryStroke
129+
130+
create-glyph [MangleName 'optionKey'] [MangleUnicode 0x2325] : glyph-proc
131+
set-width Geom.Width
132+
include : dispiro
133+
Polyline [widths.center GeometryStroke]
134+
points -- {
135+
{ Geom.Left topLineC }
136+
{ (Geom.MidX - Geom.Size / 3) topLineC }
137+
{ (Geom.MidX + Geom.Size / 3) botLineC }
138+
{ Geom.Right botLineC }
139+
}
140+
startAf -- [widths.center.heading GeometryStroke Rightward]
141+
endAf -- [widths.center.heading GeometryStroke Rightward]
142+
include : HBar.t (Geom.MidX + Geom.Size / 3) Geom.Right topLine GeometryStroke
143+
144+
create-glyph [MangleName 'alternateKey'] [MangleUnicode 0x2387] : glyph-proc
145+
set-width Geom.Width
146+
include : dispiro
147+
Polyline [widths.center GeometryStroke]
148+
points -- {
149+
{ Geom.Left botLineC }
150+
{ (Geom.MidX - Geom.Size / 3) botLineC }
151+
{ (Geom.MidX + Geom.Size / 3) topLineC }
152+
{ (Geom.Right - Geom.Size / 6) topLineC }
153+
}
154+
startAf -- [widths.center.heading GeometryStroke Rightward]
155+
endAf -- [widths.center.heading GeometryStroke Rightward]
156+
include : ArrowShape (Geom.Right - Geom.Size / 6) topLineC (Geom.Right + GeometryStroke / 2) topLineC (GeometryStroke / 2 + Geom.Size / 3)
157+
include : HBar.b (Geom.MidX + Geom.Size / 3) Geom.Right botLine GeometryStroke

packages/font-glyphs/src/symbol/punctuation/guillemet.ptl

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,50 @@ glyph-block Symbol-Punctuation-Guillemet : begin
99
glyph-block-import CommonShapes
1010
glyph-block-import Common-Derivatives
1111

12+
define guilTop : mix SymbolMid ParenTop 0.5
13+
define guilBot : mix SymbolMid ParenBot 0.5
14+
define extension 0.55
15+
define guilLeft : mix Middle SB extension
16+
define guilRight : mix Middle RightSB extension
17+
1218
create-glyph 'singleGuillemetLeft.straight' : glyph-proc
13-
local top : mix SymbolMid ParenTop 0.5
14-
local bot : mix SymbolMid ParenBot 0.5
15-
local mid : mix bot top 0.5
1619
local extension 0.55
1720

1821
local sw : AdviceStroke 3
1922
local fine : AdviceStroke 4
2023

21-
include : intersection [MaskAbove mid] : dispiro
22-
flat [mix Middle SB extension] mid [widths.rhs sw]
23-
curl [mix Middle RightSB extension] top [widths.center fine]
24-
25-
include : intersection [MaskBelow mid] : dispiro
26-
flat [mix Middle SB extension] mid [widths.lhs sw]
27-
curl [mix Middle RightSB extension] bot [widths.center fine]
24+
include : intersection
25+
MaskAboveLine guilLeft SymbolMid guilRight [mix SymbolMid guilBot 0.5] 2
26+
dispiro
27+
flat guilLeft SymbolMid [widths.rhs sw]
28+
curl guilRight guilTop [widths.center fine]
29+
include : intersection
30+
MaskBelowLine guilLeft SymbolMid guilRight [mix SymbolMid guilTop 0.5] 2
31+
dispiro
32+
flat guilLeft SymbolMid [widths.lhs sw]
33+
curl guilRight guilBot [widths.center fine]
2834

2935
include : Translate (-(RightSB - SB) * 0.05) 0
3036

3137
create-glyph 'singleGuillemetLeft.curly' : glyph-proc
32-
local top : mix SymbolMid ParenTop 0.5
33-
local bot : mix SymbolMid ParenBot 0.5
34-
local mid : mix bot top 0.5
3538
local extension 0.55
3639

3740
local sw : AdviceStroke 3
3841
local fine : AdviceStroke 4
3942

40-
include : intersection [MaskAbove mid] : dispiro
41-
g4 [mix Middle SB extension] (mid + sw * 0.25) [widths.rhs sw]
42-
quadControls 0.6 0.3
43-
g4 [mix Middle RightSB extension] top [widths.center fine]
44-
45-
include : intersection [MaskBelow mid] : dispiro
46-
g4 [mix Middle SB extension] (mid - sw * 0.25) [widths.lhs sw]
47-
quadControls 0.6 0.3
48-
g4 [mix Middle RightSB extension] bot [widths.center fine]
49-
50-
include : VBar.l [mix Middle SB extension] (mid - sw * 0.25) (mid + sw * 0.25) sw
43+
include : intersection
44+
MaskAboveLine guilLeft SymbolMid guilRight [mix SymbolMid guilBot 0.5] 2
45+
dispiro
46+
g4 guilLeft (SymbolMid + sw * 0.25) [widths.rhs sw]
47+
quadControls 0.6 0.3
48+
g4 guilRight guilTop [widths.center fine]
49+
include : intersection
50+
MaskBelowLine guilLeft SymbolMid guilRight [mix SymbolMid guilTop 0.5] 2
51+
dispiro
52+
g4 guilLeft (SymbolMid - sw * 0.25) [widths.lhs sw]
53+
quadControls 0.6 0.3
54+
g4 guilRight guilBot [widths.center fine]
55+
include : VBar.l guilLeft (SymbolMid - sw * 0.25) (SymbolMid + sw * 0.25) sw
5156

5257
include : Translate (-(RightSB - SB) * 0.05) 0
5358

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ glyph-block Shared-Symbol-Shapes : begin
3838
return WaveShape
3939

4040
glyph-block-export Polyline ClosedPolyline
41-
define [Polyline] : with-params [af points [contrast HVContrast] [upright 0]] : begin
41+
define [Polyline] : with-params [af points [contrast HVContrast] [upright 0] [startAf af] [endAf af]] : begin
4242
local {{x0 y0} {xp yp}} points
4343
local knots : list
44-
flat x0 y0 af
44+
flat x0 y0 startAf
4545
sharp-corner xp yp contrast upright
4646
foreach {x y} [items-of : points.slice 2 (-1)] : begin
4747
knots.push : virt [mix xp x 0.5] [mix yp y 0.5] af
4848
knots.push : sharp-corner x y contrast upright
4949
set {xp yp} {x y}
5050
set {xp yp} points.[points.length - 1]
51-
knots.push : curl xp yp af
51+
knots.push : curl xp yp endAf
5252

5353
return knots
5454

0 commit comments

Comments
 (0)