Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(?) Guillemet + Around 13 Keyboard/Technical Symbols #2662

Merged
merged 7 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions changes/32.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,17 @@
- HORIZONTAL ZIGZAG LINE (`U+1CEB0`).
* Optimize metrics for bowl of Cyrillic Lower Ef (`ф`) and Greek Small Letter Phi Symbol (`ϕ`).
* Add italic form for Cyrillic Small Letter Ghe with Upturn (`ґ`).
* Add characters:
- ELECTRIC ARROW (`U+2301`).
- UP ARROWHEAD (`U+2303`).
- DOWN ARROWHEAD (`U+2304`).
- POSITION INDICATOR (`U+2316`).
- UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS (`U+2324`).
- OPTION KEY (`U+2325`).
- CYLINDRICITY (`U+232D`).
- ALL AROUND-PROFILE (`U+232E`).
- TOTAL RUNOUT (`U+2330`).
- DIMENSION ORIGIN (`U+2331`).
- ENTER SYMBOL (`U+2386`).
- ALTERNATIVE KEY SYMBOL (`U+2387`).
- SQUARE POSITION INDICATOR (`U+2BD0`).
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/latin/w.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ glyph-block Letter-Latin-W : begin
include : VerticalHook.r df.rightSB (top - TailY - HalfStroke - O) TailX (-TailY) (sw -- df.mvs)

define [WCursiveImplImpl fHookTop df top bodyType slabType] : glyph-proc
define fine : AdviceStroke 3.25 df.advs
define fine : AdviceStroke 3.25 df.adws
define mfine : fine * CThin
define x0 : mix df.leftSB df.rightSB 0.1
define y0 : top - O
Expand Down
10 changes: 9 additions & 1 deletion packages/font-glyphs/src/symbol/arrow.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,14 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1
curl [mix x2 x3 pLastSeg] [mix y2 y3 pLastSeg]
include : ArrowHead x2 y2 x3 y3 arrowHeadSize

do "Arrow Heads"
create-glyph [MangleName 'arrowHeadUp'] [MangleUnicode 0x2303] : glyph-proc
set-width MosaicWidth
include : ArrowHead arrowMidX arrowBot arrowMidX arrowTop
create-glyph [MangleName 'arrowHeadDown'] [MangleUnicode 0x2304] : glyph-proc
set-width MosaicWidth
include : ArrowHead arrowMidX arrowTop arrowMidX arrowBot

do "Legacy computing arrows"
define bodyWidth : Math.min arrowWidth (arrowHeight * 0.6)
create-glyph [MangleName 'arrowUpThenNW'] [MangleUnicode 0x1F8B0] : glyph-proc
Expand Down Expand Up @@ -1660,4 +1668,4 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1
include : FlipAround arrowMidX SymbolMid

if (MosaicWidthScalar == 1) : begin
glyph-block-export ArrowShape ArrowHead ArrowBar TrigArrowShape
glyph-block-export ArrowShape ArrowHead ArrowBar TrigArrowShape TriangleArrowHead
98 changes: 98 additions & 0 deletions packages/font-glyphs/src/symbol/geometric/masked.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,90 @@ 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-Arrow : TrigArrowShape

define fineGeometryStroke : AdviceStroke2 4 4 Geom.Size
create-glyph [MangleName 'positionIndicator'] [MangleUnicode 0x2316] : glyph-proc
set-width Geom.Width
include : refer-glyph : MangleName 'whiteMediumCircle'
include : difference
union
HBar.m Geom.Left Geom.Right Geom.MidY GeometryStroke
VBar.m Geom.MidX Geom.Bot Geom.Top GeometryStroke
refer-glyph : MangleName 'blackMediumCircle'
include : intersection
union
HBar.m Geom.Left Geom.Right Geom.MidY fineGeometryStroke
VBar.m Geom.MidX Geom.Bot Geom.Top fineGeometryStroke
refer-glyph : MangleName 'blackMediumCircle'

create-glyph [MangleName 'positionIndicatorSquare'] [MangleUnicode 0x2BD0] : glyph-proc
set-width Geom.Width
include : refer-glyph : MangleName 'whiteMediumSquare'
include : difference
union
HBar.m Geom.Left Geom.Right Geom.MidY GeometryStroke
VBar.m Geom.MidX Geom.Bot Geom.Top GeometryStroke
refer-glyph : MangleName 'blackMediumSquare'
include : intersection
union
HBar.m Geom.Left Geom.Right Geom.MidY fineGeometryStroke
VBar.m Geom.MidX Geom.Bot Geom.Top fineGeometryStroke
refer-glyph : MangleName 'blackMediumSquare'

create-glyph [MangleName 'cylindricity'] [MangleUnicode 0x232D] : glyph-proc
set-width Geom.Width
local radius : Geom.Size * Size.Medium.size
local x1 Geom.Left
local y1 : Geom.Bot + 0.15 * GeometryStroke
local y2 Geom.Top
local dist : Math.hypot (Geom.MidX - x1) (Geom.MidY - y1)
local tan1 : radius / [Math.sqrt : dist ** 2 - radius ** 2]
local tan2 : (Geom.MidY - y1) / (Geom.MidX - x1)
local tan3 : (tan1 + tan2) / (1 - tan1 * tan2)
local x2 : x1 + (y2 - y1) / tan3
include : difference
union
dispiro
widths.rhs GeometryStroke
flat x1 y1
curl x2 y2
dispiro
widths.rhs GeometryStroke
flat [mix x1 Geom.MidX 2] [mix y1 Geom.MidY 2]
curl [mix x2 Geom.MidX 2] [mix y2 Geom.MidY 2]
refer-glyph : MangleName 'blackMediumCircle'
include : refer-glyph : MangleName 'whiteMediumCircle'

create-glyph [MangleName 'allRoundProfile'] [MangleUnicode 0x232E] : glyph-proc
set-width Geom.Width
include : refer-glyph : MangleName 'whiteMediumCircle'
local mx : Geom.MidX - Geom.Size * 0.5
local my : Geom.MidY - Geom.Size * 0.5
include : dispiro
disable-contrast
flat Geom.Right Geom.MidY [widths.center.heading GeometryStroke Leftward]
sharp-corner Geom.MidX Geom.MidY (contrast -- 1)
curl mx my [widths.center GeometryStroke]
include : TrigArrowShape mx my Geom.Left Geom.Bot (Geom.Size * 0.375 / Math.SQRT1_2) (GeometryStroke / 2)

create-glyph [MangleName 'dimensionOrigin'] [MangleUnicode 0x2331] : glyph-proc
set-width Geom.Width
include : refer-glyph : MangleName 'whiteMediumCircle'
local offset : Geom.Size * (1 - Size.Medium.size)
include : difference
union
TrigArrowShape Geom.MidX Geom.MidY (Geom.Right + offset) Geom.MidY (Geom.Size * 0.375 / Math.SQRT1_2) (GeometryStroke / 2)
VBar.m Geom.MidX Geom.Bot Geom.Top GeometryStroke
refer-glyph : MangleName 'blackMediumCircle'
include : intersection
union
HBar.m Geom.MidX Geom.Right Geom.MidY fineGeometryStroke
VBar.m Geom.MidX Geom.Bot Geom.Top fineGeometryStroke
refer-glyph : MangleName 'blackMediumCircle'

include : Translate (-offset) 0

create-glyph [MangleName 'uni2389'] [MangleUnicode 0x2389] : glyph-proc
define shiftUp : ApparentTranslate 0
Math.max
Expand All @@ -354,6 +438,18 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
refer-glyph : MangleName 'blackCircleO'
refer-glyph : MangleName 'whiteEqualTriangleDown'

create-glyph [MangleName 'enterSymbol'] [MangleUnicode 0x2386] : glyph-proc
set-width Geom.Width
include : difference
refer-glyph : MangleName 'whiteDiamond'
intersection [MaskLeftLine Geom.MidX (Geom.MidY - Geom.Size / 3) Geom.MidX (Geom.MidY + Geom.Size / 3)]
include : HBar.m Geom.Left Geom.MidX Geom.MidY GeometryStroke
local size : Geom.Size * 0.375 / Math.SQRT1_2
include : spiro-outline
corner Geom.MidX (Geom.MidY + size)
corner (Geom.MidX + size) Geom.MidY
corner Geom.MidX (Geom.MidY - size)

create-glyph [MangleName 'uni238B'] [MangleUnicode 0x238B] : glyph-proc
set-width Geom.Width
include : difference
Expand Down Expand Up @@ -441,6 +537,7 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
refer-glyph : MangleName 'blackLozenge'
HBar.m 0 MosaicWidth Geom.MidY GeometryStroke

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

# Genealogy Symbols
create-glyph [MangleName 'marriageSymbol'] [MangleUnicode 0x26AD] : glyph-proc
set-width Geom.Width
local radius : Geom.Size * Size.SlightlySmall.size
Expand Down
74 changes: 73 additions & 1 deletion packages/font-glyphs/src/symbol/geometric/technical.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ glyph-block Symbol-Geometric-Technical : for-width-kinds WideWidth1
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
glyph-block-import Shared-Symbol-Shapes : TriangleShape
glyph-block-import Shared-Symbol-Shapes : TriangleShape Polyline
glyph-block-import Symbol-Arrow : ArrowShape ArrowHead TrigArrowShape

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

create-glyph [MangleName 'totalRunoff'] [MangleUnicode 0x2330] : glyph-proc
set-width Geom.Width
local headSize : Geom.Size * 0.375 / Math.SQRT1_2
local offset : Geom.Size * 0.4
local x0 Geom.Left
local x1 : Geom.Left + offset
local x2 : Geom.Right - offset - headSize * 0.35
local x3 : Geom.Right - headSize * 0.35
local vsw : HSwToV : 0.5 * GeometryStroke
include : dispiro
disable-contrast
flat ([mix x0 x1 0.75] + vsw) [mix Geom.Bot Geom.Top 0.75] [widths.center GeometryStroke]
sharp-corner (x0 + vsw) Geom.Bot (contrast -- 1)
corner Geom.MidX Geom.Bot [widths.lhs GeometryStroke]
sharp-corner (x2 - vsw) Geom.Bot (contrast -- 1)
curl ([mix x2 x3 0.75] - vsw) [mix Geom.Bot Geom.Top 0.75] [widths.center GeometryStroke]
include : TrigArrowShape ([mix x0 x1 0.5] + vsw) Geom.MidY (x1 + vsw) Geom.Top headSize (GeometryStroke / 2)
include : TrigArrowShape ([mix x2 x3 0.5] - vsw) Geom.MidY (x3 - vsw) Geom.Top headSize (GeometryStroke / 2)

create-glyph [MangleName 'conicalTaper'] [MangleUnicode 0x2332] : glyph-proc
set-width Geom.Width
include : TriangleShape Geom.Left (Geom.MidY - Geom.Size * 0.8) Geom.Left (Geom.MidY + Geom.Size * 0.8) Geom.Right Geom.MidY fineGeometryStroke
Expand All @@ -38,6 +58,17 @@ glyph-block Symbol-Geometric-Technical : for-width-kinds WideWidth1
set-width Geom.Width
include : TriangleShape Geom.Left Geom.Bot Geom.Left Geom.MidY Geom.Right Geom.Bot fineGeometryStroke

create-glyph [MangleName 'electricArrow'] [MangleUnicode 0x2301] : glyph-proc
set-width Geom.Width
define amp : Geom.Size / 2
define amp2 : Geom.Size / 4
include : intersection [MaskRight Geom.Left] [MaskLeft Geom.Right] : dispiro
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY + amp2 * 4) [widths.center GeometryStroke]
sharp-corner Geom.MidX (Geom.MidY - amp)
corner Geom.MidX Geom.MidY [widths.center.heading GeometryStroke Upward]
sharp-corner Geom.MidX (Geom.MidY + amp)
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY - amp2 * 4) [widths.center GeometryStroke]

create-glyph [MangleName 'viewdataSquare'] [MangleUnicode 0x2317] : glyph-proc
set-width Geom.Width
define shrink : Geom.Size * 2 * 0.13
Expand Down Expand Up @@ -83,3 +114,44 @@ glyph-block Symbol-Geometric-Technical : for-width-kinds WideWidth1
arcvh 4
flat @x2 @y3
curl Geom.MidX @y3

do "Keyboard Symbols"
define topLine : Geom.MidY + Geom.Size / 1.5
define botLine : Geom.MidY - Geom.Size / 1.5
define topLineC : topLine - GeometryStroke / 2
define botLineC : botLine + GeometryStroke / 2

create-glyph [MangleName 'arrowHeadUpBetweenBars'] [MangleUnicode 0x2324] : glyph-proc
set-width MosaicWidth
include : ArrowHead Geom.MidX Geom.Bot Geom.MidX topLine
include : HBar.t Geom.Left (Geom.MidX - Geom.Size / 3) topLine GeometryStroke
include : HBar.t (Geom.MidX + Geom.Size / 3) Geom.Right topLine GeometryStroke

create-glyph [MangleName 'optionKey'] [MangleUnicode 0x2325] : glyph-proc
set-width Geom.Width
include : dispiro
Polyline [widths.center GeometryStroke]
points -- {
{ Geom.Left topLineC }
{ (Geom.MidX - Geom.Size / 3) topLineC }
{ (Geom.MidX + Geom.Size / 3) botLineC }
{ Geom.Right botLineC }
}
startAf -- [widths.center.heading GeometryStroke Rightward]
endAf -- [widths.center.heading GeometryStroke Rightward]
include : HBar.t (Geom.MidX + Geom.Size / 3) Geom.Right topLine GeometryStroke

create-glyph [MangleName 'alternateKey'] [MangleUnicode 0x2387] : glyph-proc
set-width Geom.Width
include : dispiro
Polyline [widths.center GeometryStroke]
points -- {
{ Geom.Left botLineC }
{ (Geom.MidX - Geom.Size / 3) botLineC }
{ (Geom.MidX + Geom.Size / 3) topLineC }
{ (Geom.Right - Geom.Size / 6) topLineC }
}
startAf -- [widths.center.heading GeometryStroke Rightward]
endAf -- [widths.center.heading GeometryStroke Rightward]
include : ArrowShape (Geom.Right - Geom.Size / 6) topLineC (Geom.Right + GeometryStroke / 2) topLineC (GeometryStroke / 2 + Geom.Size / 3)
include : HBar.b (Geom.MidX + Geom.Size / 3) Geom.Right botLine GeometryStroke
53 changes: 29 additions & 24 deletions packages/font-glyphs/src/symbol/punctuation/guillemet.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,50 @@ glyph-block Symbol-Punctuation-Guillemet : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives

define guilTop : mix SymbolMid ParenTop 0.5
define guilBot : mix SymbolMid ParenBot 0.5
define extension 0.55
define guilLeft : mix Middle SB extension
define guilRight : mix Middle RightSB extension

create-glyph 'singleGuillemetLeft.straight' : glyph-proc
local top : mix SymbolMid ParenTop 0.5
local bot : mix SymbolMid ParenBot 0.5
local mid : mix bot top 0.5
local extension 0.55

local sw : AdviceStroke 3
local fine : AdviceStroke 4

include : intersection [MaskAbove mid] : dispiro
flat [mix Middle SB extension] mid [widths.rhs sw]
curl [mix Middle RightSB extension] top [widths.center fine]

include : intersection [MaskBelow mid] : dispiro
flat [mix Middle SB extension] mid [widths.lhs sw]
curl [mix Middle RightSB extension] bot [widths.center fine]
include : intersection
MaskAboveLine guilLeft SymbolMid guilRight [mix SymbolMid guilBot 0.5] 2
dispiro
flat guilLeft SymbolMid [widths.rhs sw]
curl guilRight guilTop [widths.center fine]
include : intersection
MaskBelowLine guilLeft SymbolMid guilRight [mix SymbolMid guilTop 0.5] 2
dispiro
flat guilLeft SymbolMid [widths.lhs sw]
curl guilRight guilBot [widths.center fine]

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

create-glyph 'singleGuillemetLeft.curly' : glyph-proc
local top : mix SymbolMid ParenTop 0.5
local bot : mix SymbolMid ParenBot 0.5
local mid : mix bot top 0.5
local extension 0.55

local sw : AdviceStroke 3
local fine : AdviceStroke 4

include : intersection [MaskAbove mid] : dispiro
g4 [mix Middle SB extension] (mid + sw * 0.25) [widths.rhs sw]
quadControls 0.6 0.3
g4 [mix Middle RightSB extension] top [widths.center fine]

include : intersection [MaskBelow mid] : dispiro
g4 [mix Middle SB extension] (mid - sw * 0.25) [widths.lhs sw]
quadControls 0.6 0.3
g4 [mix Middle RightSB extension] bot [widths.center fine]

include : VBar.l [mix Middle SB extension] (mid - sw * 0.25) (mid + sw * 0.25) sw
include : intersection
MaskAboveLine guilLeft SymbolMid guilRight [mix SymbolMid guilBot 0.5] 2
dispiro
g4 guilLeft (SymbolMid + sw * 0.25) [widths.rhs sw]
quadControls 0.6 0.3
g4 guilRight guilTop [widths.center fine]
include : intersection
MaskBelowLine guilLeft SymbolMid guilRight [mix SymbolMid guilTop 0.5] 2
dispiro
g4 guilLeft (SymbolMid - sw * 0.25) [widths.lhs sw]
quadControls 0.6 0.3
g4 guilRight guilBot [widths.center fine]
include : VBar.l guilLeft (SymbolMid - sw * 0.25) (SymbolMid + sw * 0.25) sw

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

Expand Down
6 changes: 3 additions & 3 deletions packages/font-glyphs/src/symbol/shared.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ glyph-block Shared-Symbol-Shapes : begin
return WaveShape

glyph-block-export Polyline ClosedPolyline
define [Polyline] : with-params [af points [contrast HVContrast] [upright 0]] : begin
define [Polyline] : with-params [af points [contrast HVContrast] [upright 0] [startAf af] [endAf af]] : begin
local {{x0 y0} {xp yp}} points
local knots : list
flat x0 y0 af
flat x0 y0 startAf
sharp-corner xp yp contrast upright
foreach {x y} [items-of : points.slice 2 (-1)] : begin
knots.push : virt [mix xp x 0.5] [mix yp y 0.5] af
knots.push : sharp-corner x y contrast upright
set {xp yp} {x y}
set {xp yp} points.[points.length - 1]
knots.push : curl xp yp af
knots.push : curl xp yp endAf

return knots

Expand Down
Loading