Files
Iosevka/glyphs/symbol-punctuation.ptl
T

1334 lines
44 KiB
Plaintext

### Punctuation symbols
$$include '../meta/macros.ptl'
import [mix linreg clamp fallback] from '../support/utils'
import [designParameters] from '../meta/aesthetics'
glyph-module
glyph-block Symbol-Punctuation : begin
glyph-block-import CommonShapes
glyph-block-import Overmarks
define MosaicTop fontMetrics.OS_2.sTypoAscender
define MosaicBottom fontMetrics.OS_2.sTypoDescender
define MosaicHeight : MosaicTop - MosaicBottom
do 'Brackets'
define [ParenDim delta] : object
outside : [mix SB RIGHTSB designParameters.parenOutside] - delta
inside : mix SB RIGHTSB designParameters.parenInside
bottom : [mix symbolMid parenBot (1 + designParameters.parenOvershoot)] - delta
top : [mix symbolMid parenTop (1 + designParameters.parenOvershoot)] + delta
mid symbolMid
define [ParenShape sw] : let [dim : ParenDim 0] : dispiro
widths.lhs sw
g4 dim.inside dim.top
quadcontrols 1 (1 - designParameters.parenCurliness)
g4 dim.outside dim.mid
quadcontrols 0 designParameters.parenCurliness
g4 dim.inside dim.bottom
define [ParenUpperShape sw] : let [dim : ParenDim 0] : dispiro
widths.lhs sw
g4 dim.inside dim.top
quadcontrols 1 (1 - designParameters.parenCurliness)
g4.down.end dim.outside MosaicBottom [heading DOWNWARD]
define [ParenExtensionShape sw] : let [dim : ParenDim 0] : dispiro
widths.lhs sw
g4.down.start dim.outside MosaicTop [heading DOWNWARD]
g4.down.end dim.outside MosaicBottom [heading DOWNWARD]
define [ParenLowerShape sw] : let [dim : ParenDim 0] : dispiro
widths.lhs sw
g4.down.start dim.outside MosaicTop [heading DOWNWARD]
quadcontrols 0 designParameters.parenCurliness
g4 dim.inside dim.bottom
define [ParenShapeMask delta] : let [dim : ParenDim delta] : spiro-outline
corner dim.inside dim.top
quadcontrols 1 (1 - designParameters.parenCurliness)
g4 dim.outside dim.mid
quadcontrols 0 designParameters.parenCurliness
corner dim.inside dim.bottom
sketch # parenLeft
include : ParenShape STROKE
save 'parenLeft' '('
include : FlipAround MIDDLE symbolMid
save 'parenRight' ')'
sketch # parenLeftUpper
include : ParenUpperShape STROKE
save 'parenLeftUpper' 0x239B
include : FlipAround MIDDLE symbolMid
save 'parenRightLower' 0x23A0
sketch # parenLeftUpper
include : ParenExtensionShape STROKE
save 'parenLeftExtension' 0x239C
include : FlipAround MIDDLE symbolMid
save 'parenRightExtension' 0x239F
sketch # parenLeftLower
include : ParenLowerShape STROKE
save 'parenLeftLower' 0x239D
include : FlipAround MIDDLE symbolMid
save 'parenRightupper' 0x239E
sketch # zNotationParenLeft
local dim : ParenDim 0
include : intersection
Rect [mix dim.bottom dim.top 2] [mix dim.top dim.bottom 2] 0 dim.inside
union
ParenShape OPERATORSTROKE
intersection
VBarRight dim.inside dim.bottom dim.top OPERATORSTROKE
ParenShapeMask O
save 'zNotationParenLeft' 0x2987
include : FlipAround MIDDLE symbolMid
save 'zNotationParenRight' 0x2988
define [BracketMask] : Rect MosaicTop MosaicBottom (-WIDTH) (2 * WIDTH)
define [BracketShape top bottom] : glyph-construction
local l : mix SB RIGHTSB designParameters.bracketOutside
local r : mix SB RIGHTSB designParameters.bracketInside
include : HBarBottom l r bottom
include : HBarTop l r top
include : VBarLeft l bottom top
sketch # bracketLeft
include : BracketShape parenTop parenBot
save 'bracketLeft' '['
include : FlipAround MIDDLE symbolMid
save 'bracketRight' ']'
sketch # bracketLeftUpper, bracketRightLower
include : intersection [BracketMask]
BracketShape parenTop (parenBot - MosaicHeight)
save 'bracketLeftUpper' 0x23A1
include : FlipAround MIDDLE symbolMid
save 'bracketRightLower' 0x23A6
sketch # bracketLeftExtension, bracketRightExtension
include : intersection [BracketMask]
BracketShape (parenTop + MosaicHeight) (parenBot - MosaicHeight)
save 'bracketLeftExtension' 0x23A2
include : FlipAround MIDDLE symbolMid
save 'bracketRightExtension' 0x23A5
sketch # bracketLeftUpper, bracketRightLower
include : intersection [BracketMask]
BracketShape (parenTop + MosaicHeight) parenBot
save 'bracketLeftLower' 0x23A3
include : FlipAround MIDDLE symbolMid
save 'bracketRightUpper' 0x23A4
sketch # dblBracketLeft
local l : mix SB RIGHTSB designParameters.bracketOutside
local r : mix SB RIGHTSB designParameters.bracketInside
local sw : Math.min ((r - l) / 5) [adviceBlackness 4]
include : union
HBarBottom l r parenBot
HBarTop l r parenTop
VBarLeft l parenBot parenTop sw
VBar [mix l r (1 / 2)] parenBot parenTop sw
save 'dblBracketLeft' 0x27E6
sketch # dblBracketRight
include glyphs.dblBracketLeft
include : FlipAround MIDDLE symbolMid
save 'dblBracketRight' 0x27E7
sketch # bracketBarLeft
local l : mix SB RIGHTSB designParameters.bracketOutside
local r : mix SB RIGHTSB designParameters.bracketInside
include : union
HBarBottom l r parenBot
HBarTop l r parenTop
HBar l r [mix parenBot parenTop 0.5]
VBarLeft l parenBot parenTop
save 'bracketBarLeft' 0x2045
sketch # bracketBarRight
include glyphs.bracketBarLeft
include : FlipAround MIDDLE symbolMid
save 'bracketBarRight' 0x2046
define [BraceDim] : begin
local parenCenter [mix SB RIGHTSB [mix designParameters.braceInside designParameters.braceOutside 0.5]]
local radius : [mix SB RIGHTSB designParameters.braceInside] - parenCenter
return : object parenCenter radius
define [BraceUpperHalfShape top bottom] : glyph-construction
define [object parenCenter radius] : BraceDim
include : dispiro
straight.left.start [mix SB RIGHTSB designParameters.braceInside] top [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
archv
flat parenCenter (top - radius) [heading DOWNWARD]
curl parenCenter (bottom + radius) [heading DOWNWARD]
arcvh
straight.left.end [mix SB RIGHTSB designParameters.braceOutside] bottom [heading LEFTWARD]
define [BraceUpperThirdShape top bottom] : glyph-construction
define [object parenCenter radius] : BraceDim
include : intersection [BracketMask]
BraceUpperHalfShape top (bottom - MosaicHeight)
define [BraceLowerHalfShape top bottom] : glyph-construction
define [object parenCenter radius] : BraceDim
include : dispiro
straight.left.start [mix SB RIGHTSB designParameters.braceInside] bottom [widths.heading HALFSTROKE HALFSTROKE LEFTWARD]
archv
flat parenCenter (bottom + radius) [heading UPWARD]
curl parenCenter (top - radius) [heading UPWARD]
arcvh
straight.left.end [mix SB RIGHTSB designParameters.braceOutside] top [heading LEFTWARD]
define [BraceLowerThirdShape top bottom] : glyph-construction
define [object parenCenter radius] : BraceDim
include : intersection [BracketMask]
BraceLowerHalfShape (top + MosaicHeight) bottom
define [BraceCenterThirdShape top bottom] : glyph-construction
define [object parenCenter radius] : BraceDim
include : intersection [BracketMask]
union
BraceUpperHalfShape (top + MosaicHeight) [mix bottom top 0.5]
BraceLowerHalfShape [mix bottom top 0.5] (bottom - MosaicHeight)
define [BraceExtensionShape top bottom] : glyph-construction
define [object parenCenter radius] : BraceDim
include : intersection [BracketMask]
union
BraceUpperHalfShape (top + MosaicHeight) (bottom - MosaicHeight)
sketch # braceLeft.straight
local top : [mix symbolMid parenTop (1 + designParameters.braceOvershoot)] - HALFSTROKE
local bot : [mix symbolMid parenBot (1 + designParameters.braceOvershoot)] + HALFSTROKE
branch
include : BraceUpperHalfShape top symbolMid
include : BraceLowerHalfShape symbolMid bot
save 'braceLeft.straight'
include : FlipAround MIDDLE symbolMid
save 'braceRight.straight'
branch
include : BraceUpperThirdShape top bot
save 'braceLeftUpper' 0x23A7
include : FlipAround MIDDLE symbolMid
save 'braceRightLower' 0x23AD
branch
include : BraceLowerThirdShape top bot
save 'braceLeftLower' 0x23A9
include : FlipAround MIDDLE symbolMid
save 'braceRightUpper' 0x23AB
branch
include : BraceCenterThirdShape top bot
save 'braceLeftMiddle' 0x23A8
include : FlipAround MIDDLE symbolMid
save 'braceRightMiddle' 0x23AC
branch
include : BraceExtensionShape top bot
save 'braceExtension' 0x23AA
define [CurlyBraceShape sw] : glyph-construction
local hs : sw / 2
local xIns : mix SB RIGHTSB designParameters.braceInside
local xOus : mix SB RIGHTSB designParameters.braceOutside
local m1 : mix SB RIGHTSB [mix designParameters.braceInside designParameters.braceOutside designParameters.braceCurlyM1]
local m2 : mix SB RIGHTSB [mix designParameters.braceInside designParameters.braceOutside designParameters.braceCurlyM2]
local braceRadiusLowLimit : (parenTop - symbolMid - sw) * (1 / 3) + hs
local radius1 : Math.min (xIns - m1) braceRadiusLowLimit
local radius2 : [Math.min (m2 - xOus) braceRadiusLowLimit] - hs
local ess : mix sw (ESS * sw / STROKE) 0.25
local top : mix symbolMid parenTop (1 + designParameters.braceOvershoot)
local bot : mix symbolMid parenBot (1 + designParameters.braceOvershoot)
include : dispiro
straight.left.start xIns (top - hs) [widths.heading hs hs LEFTWARD]
archv
g4.down.mid m1 (top - radius1) [heading DOWNWARD]
alsothru 0.5 0.5 [widths (ess / 2) (ess / 2)]
g4.down.mid m2 (symbolMid + radius2) [widths.heading hs hs DOWNWARD]
arcvh
straight.left.end xOus symbolMid [heading LEFTWARD]
include : dispiro
straight.left.start xIns (bot + hs) [widths.heading hs hs LEFTWARD]
archv
g4.up.mid m1 (bot + radius1) [heading UPWARD]
alsothru 0.5 0.5 [widths (ess / 2) (ess / 2)]
g4.up.mid m2 (symbolMid - radius2) [widths.heading hs hs UPWARD]
arcvh
straight.left.end xOus symbolMid [heading LEFTWARD]
sketch # braceLeft.curly
include : CurlyBraceShape STROKE
save 'braceLeft.curly'
include : FlipAround MIDDLE symbolMid
save 'braceRight.curly'
select-variant 'braceLeft' '{'
select-variant 'braceRight' '}'
sketch
local top : mix symbolMid parenTop (1 + designParameters.braceOvershoot)
local bot : mix symbolMid parenBot (1 + designParameters.braceOvershoot)
branch
include : BraceUpperHalfShape (top - HALFSTROKE) (bot + HALFSTROKE)
save nothing 0x23B0
branch
include : BraceLowerHalfShape (top - HALFSTROKE) (bot + HALFSTROKE)
save nothing 0x23B1
sketch # whiteBraceLeft
local fine : adviceBlackness 4
local xIns : mix SB RIGHTSB designParameters.braceInside
local top : mix symbolMid parenTop (1 + designParameters.braceOvershoot)
local bot : mix symbolMid parenBot (1 + designParameters.braceOvershoot)
include : CurlyBraceShape fine
include : VBarRight xIns (bot + fine / 2) (top - fine / 2) fine
save 'whiteBraceLeft' 0x2983
sketch # whiteBraceRight
include glyphs.whiteBraceLeft
include : FlipAround MIDDLE symbolMid
save 'whiteBraceRight' 0x2984
define [AngleLeftShape outside inside sw] : begin
local fatten : Math.hypot 1 ((inside - outside - O) / (parenTop - symbolMid))
return : union
dispiro
widths.lhs sw
flat inside parenTop
curl (outside + O) symbolMid [widths.heading (sw * fatten) 0 DOWNWARD]
dispiro
widths.rhs sw
flat inside parenBot
curl (outside + O) symbolMid [widths.heading 0 (sw * fatten) UPWARD]
sketch # angleLeft
define dim : ParenDim 0
include : AngleLeftShape dim.outside dim.inside OPERATORSTROKE
save 'angleLeft' 0x2329
save 'mathAngleLeft' 0x27E8
sketch # dblAngleLeft
define dim : ParenDim 0
define fine : Math.min OPERATORSTROKE [adviceBlackness 3]
define farOutside : dim.outside / 2
define middle : mix farOutside dim.inside 0.5
include : AngleLeftShape farOutside middle fine
include : AngleLeftShape middle dim.inside fine
save 'dblAngleLeft' 0x27EA
turned 'angleRight' 0x232A 'angleLeft' MIDDLE symbolMid
alias 'mathAngleRight' 0x27E9 'angleRight'
turned 'dblAngleRight' 0x27EB 'dblAngleLeft' MIDDLE symbolMid
sketch # ceilingLeft
include : HBarTop [mix SB RIGHTSB designParameters.bracketOutside] [mix SB RIGHTSB designParameters.bracketInside] parenTop
include : VBarLeft [mix SB RIGHTSB designParameters.bracketOutside] parenBot parenTop
save 'ceilingLeft' 0x2308
sketch # floorLeft
include : HBarBottom [mix SB RIGHTSB designParameters.bracketOutside] [mix SB RIGHTSB designParameters.bracketInside] parenBot
include : VBarLeft [mix SB RIGHTSB designParameters.bracketOutside] parenBot parenTop
save 'floorLeft' 0x230A
turned 'floorRight' 0x230B 'ceilingLeft' MIDDLE symbolMid
turned 'ceilingRight' 0x2309 'floorLeft' MIDDLE symbolMid
do 'Small Punctuations'
sketch # period
set-width WIDTH
include : DotAt MIDDLE PERIODRADIUS (PERIODRADIUS - O)
save 'period' '.'
sketch # baselineDot
set-width WIDTH
include : DotAt MIDDLE DOTRADIUS (DOTRADIUS - O)
save 'baselineDot'
sketch # xhPeriod
set-width WIDTH
include : DotAt MIDDLE (XH - PERIODRADIUS) (PERIODRADIUS - O)
save 'xhPeriod'
sketch # xhPeriod
set-width WIDTH
include : DotAt MIDDLE (XH - DOTRADIUS) (DOTRADIUS - O)
save 'xhDot'
sketch # comma
set-width WIDTH
include glyphs.period
local sw : Math.min STROKE (PERIODSIZE * 0.5)
include : dispiro
widths.rhs sw
g4 (MIDDLE + PERIODRADIUS - O) [mix O (PERIODSIZE - O) 0.5]
g4 (MIDDLE + PERIODRADIUS - O + 0.1 * TANSLANT) ([mix O (PERIODSIZE - O) 0.5] - 0.1)
quadcontrols (0.9 * TANSLANT * DESCENDER / (1.7 * PERIODRADIUS - O)) 0.5 12
g4 [mix MIDDLE (MIDDLE - PERIODRADIUS) 0.3] DESCENDER
save 'comma' ','
sketch # invertComma
set-width WIDTH
include glyphs.period
local sw : Math.min STROKE (PERIODSIZE * 0.5)
include : dispiro
widths.lhs sw
g4 (MIDDLE - PERIODRADIUS + O) [mix O (PERIODSIZE - O) 0.5]
g4 (MIDDLE - PERIODRADIUS + O + 0.1 * TANSLANT) ([mix O (PERIODSIZE - O) 0.5] - 0.1)
quadcontrols (-0.3 * TANSLANT * DESCENDER / ((1.3 + TANSLANT * 2) * PERIODRADIUS - O)) 0.5 12
g4 [mix MIDDLE (MIDDLE + PERIODRADIUS) (0.3 + TANSLANT * 2)] DESCENDER
save 'invertComma'
sketch # colon
set-width WIDTH
include glyphs.period
include glyphs.xhPeriod
save 'colon' ':'
save 'colon.dmid'
branch
apply-transform : Upright
apply-transform : Translate 0 (symbolMid - XH / 2)
apply-transform : Italify
save 'colon.mid'
branch
local delta : Math.max 0 : WIDTH / 2 - (XH - PERIODSIZE) / 2
apply-transform : Translate delta 0
save 'colon.dright'
apply-transform : Translate (-2 * delta) 0
save 'colon.dleft'
sketch # holowColon
define sw : adviceBlackness 5
define dotRadius : Math.max PERIODRADIUS (XH / 8)
include : difference
DotAt MIDDLE dotRadius (dotRadius - O + sw / 2)
DotAt MIDDLE dotRadius (dotRadius - O - sw / 2)
include : difference
DotAt MIDDLE (XH - dotRadius) (dotRadius - O + sw / 2)
DotAt MIDDLE (XH - dotRadius) (dotRadius - O - sw / 2)
save 'hollowColon' 0x2982
sketch # semicolon
include glyphs.comma
include glyphs.xhPeriod
save 'semicolon' ';'
save 'greekquestion' 0x37E
do 'Emotion Punctuations'
local questionBottom : Math.max (CAP * 0.3) (DOTSIZE * 1.5)
define [QuestionShape top questionBottom left right] : glyph-construction
define strokeEndCor : Math.hypot 1 TANSLANT
include : dispiro
widths.rhs
g4 left (top - HOOK)
hookstart (top - O)
g4 right (top - SMOOTHB * 0.9)
alsothru.g2 0.5 0.45 [widths.center ESSQUESTION]
straight.down.end ([mix left right 0.5] - HALFSTROKE * HVCONTRAST * strokeEndCor) questionBottom [widths.heading (STROKE * strokeEndCor) 0 DOWNWARD]
sketch # question
set-width WIDTH
include : QuestionShape CAP questionBottom SB RIGHTSB
include : DotAt MIDDLE DOTRADIUS (DOTRADIUS - O)
save 'question' '?'
sketch # interrobang
set-width WIDTH
local angle : 12 / 180 * Math.PI
include : QuestionShape CAP questionBottom [mix MIDDLE SB 0.75] RIGHTSB
include : Translate (-MIDDLE) (-DOTRADIUS)
include : Rotate (-2 * angle)
include : Translate MIDDLE DOTRADIUS
include : VBar MIDDLE questionBottom CAP
include : Translate (-MIDDLE) (-DOTRADIUS)
include : Rotate (1.2 * angle)
include : Translate MIDDLE DOTRADIUS
include : DotAt MIDDLE DOTRADIUS (DOTRADIUS - O)
save 'interrobang' 0x203D
sketch # gnaborretni
set-width WIDTH
include glyphs.interrobang
include : FlipAround MIDDLE (CAP / 2)
save 'gnaborretni' 0x2E18
sketch # questionDown
set-width WIDTH
include glyphs.question
include : FlipAround MIDDLE (XH / 2)
save 'questionDown' 0xBF
sketch # exclam
set-width WIDTH
include MarkSet.capital
include : VBar MIDDLE [clamp 0 (CAP * 0.4) (questionBottom * 1.18)] CAP
include : DotAt MIDDLE DOTRADIUS (DOTRADIUS - O)
save 'exclam' '!'
save 'alveolarclick' 0x1C3
sketch # exclamDown
set-width WIDTH
include glyphs.exclam
include : FlipAround MIDDLE (XH / 2)
save 'exclamDown' 0xA1
sketch # doubleexclam
local d : 0.25 * WIDTH
include glyphs.exclam
apply-transform : Translate (-d * 2) 0
include glyphs.exclam
apply-transform : Translate d 0
save 'doubleexclam' 0x203C
sketch # bar
set-width WIDTH
set currentGlyph.anchors.above {.type BASE .x MIDDLE .y parenTop}
set currentGlyph.anchors.below {.type BASE .x MIDDLE .y parenBot}
include : VBar MIDDLE parenBot parenTop
save 'bar' '|'
sketch # parallel
set-width WIDTH
set currentGlyph.anchors.above {.type BASE .x MIDDLE .y parenTop}
set currentGlyph.anchors.below {.type BASE .x MIDDLE .y parenBot}
local sw : adviceBlackness 3.5
include : VBar (MIDDLE - WIDTH * 0.175) parenBot parenTop sw
include : VBar (MIDDLE + WIDTH * 0.175) parenBot parenTop sw
save 'parallel' 0x2225
save 'doubleBar' 0x2016
save 'dentalclick' 0x1C0
save 'alveolarlateralclick' 0x1C1
sketch # brokenbar
local breakDist : Math.max STROKE (CAP / 8)
include : VBar MIDDLE (symbolMid + breakDist / 2) parenTop
include : VBar MIDDLE parenBot (symbolMid - breakDist / 2)
save 'brokenbar' 0xA6
sketch # palatoalveolarclick
include glyphs.bar AS_BASE
include : HBarBottom SB RIGHTSB (symbolMid + XH * 0.1) OPERATORSTROKE
include : HBarTop SB RIGHTSB (symbolMid - XH * 0.1) OPERATORSTROKE
save 'palatoalveolarclick' 0x1C2
do 'Typographic Symbols'
sketch # ampersand
set-width WIDTH
local fine : adviceBlackness 3
local p 0.875
local l 0.05
local pr [linreg 500 0.82 700 0.85 WIDTH]
local rr 0.95
local q 0.45
local r 1.1
include : dispiro
widths.rhs fine
flat (RIGHTSB - O) CAPMIDDLE [heading DOWNWARD]
curl (RIGHTSB - O) SMOOTHA
arcvh
g4 (MIDDLE + CORRECTION_OMIDX * fine) O
archv
g4 (SB + O) SMOOTHB
alsothru 0.5 0.5 [widths.center fine]
g4 [mix SB RIGHTSB p] (CAP - SMOOTHB * pr) [widths.lhs fine]
arcvh
g4 ([mix SB RIGHTSB [mix p l 0.5]] - CORRECTION_OMIDX * fine) (CAP - O)
archv
g4 [mix SB RIGHTSB l] (CAP - SMOOTHA * pr)
alsothru 0.5 0.5 [widths.center fine]
g4.down.end [mix SB RIGHTSB r] 0 [widths.heading 0 fine DOWNWARD]
save 'ampersand' '&'
sketch # at.threefold
set-width WIDTH
local top : mix operTop parenTop 0.6
local bot : mix operBot parenBot 0.6
local otop : mix bot top 0.75
local obot : mix top bot 0.8
local sw : adviceBlackness 3.5
local m1 : [mix (SB + sw) (RIGHTSB - sw) 0.47] - sw / 2
local m2 : [mix m1 RIGHTSB 0.52] + TANSLANT * sw
local sma : SMOOTHA * ((RIGHTSB - m1) / (RIGHTSB - SB) * 1.1)
local smb : SMOOTHB * ((RIGHTSB - m1) / (RIGHTSB - SB) * 1.1)
include : dispiro
widths.lhs sw
flat RIGHTSB (otop - O) [heading LEFTWARD]
curl m2 (otop - O)
archv
flat m1 (otop - sma)
curl m1 (obot + smb)
arcvh
g4 m2 (obot + O)
archv
flat RIGHTSB (obot + sma)
curl RIGHTSB (top - SMOOTHB)
arcvh
g4 (MIDDLE - CORRECTION_OMIDS) (top - O) [widths STROKE 0]
archv
flat SB (top - SMOOTHA) [widths sw 0]
curl SB (bot + SMOOTHB)
arcvh
flat (MIDDLE + CORRECTION_OMIDS) (bot + O) [widths STROKE 0 ]
curl (RIGHTSB - HALFSTROKE + TANSLANT * sw) (bot + O)
save 'at.threefold'
sketch # at.fourfold
local div para.diversityM
set-width (WIDTH * div)
local top : mix operTop parenTop 0.6
local bot : mix operBot parenBot 0.6
local otop : mix bot top 0.75
local obot : mix top bot 0.8
local sw : adviceBlackness 4 div
local swh : adviceBlackness 3.75 div
local left : SB * div - sw * HVCONTRAST / 3
local right : (WIDTH * div - SB * div) + sw * HVCONTRAST / 3
local middle: MIDDLE * div
local m1 : [mix (left + sw / 2) (right - sw / 2) (1 / 3)] - sw * HVCONTRAST / 2
local m2 : [mix (left + sw / 2) (right - sw / 2) (2 / 3)] + sw * HVCONTRAST / 2
local sma : SMOOTHA * ((m2 - m1) / (WIDTH - SB * 2) * 1.1)
local smb : SMOOTHB * ((m2 - m1) / (WIDTH - SB * 2) * 1.1)
include : dispiro
widths.lhs sw
flat m2 (obot - O) [heading UPWARD]
curl m2 (otop - smb)
arcvh
g4 (middle - CORRECTION_OMIDX * sw) (otop - O)
archv
flat m1 (otop - sma)
curl m1 (obot + smb)
arcvh
flat middle obot
curl (right - (m2 - m1) / 2) obot
archv
flat right (obot + sma)
curl right (top - SMOOTHB * div)
arcvh
g4 (middle - CORRECTION_OMIDS) (top - O) [widths swh 0]
archv
flat left (top - SMOOTHA * div) [widths sw 0]
curl left (bot + SMOOTHB * div)
arcvh
flat (middle + CORRECTION_OMIDS) (bot + O) [widths swh 0 ]
curl (right - HALFSTROKE + TANSLANT * sw) (bot + O)
save 'at.fourfold'
sketch # at.short
set-width WIDTH
local top CAP
local obot 0
local otop [mix obot top 0.675]
local sw : adviceBlackness 3.5
local m1 : [mix (SB + sw) (RIGHTSB - sw) 0.53] + sw / 2
local m2 : [mix SB m1 0.5] + TANSLANT * sw
local sma : SMOOTHA * ((m1 - SB) / (RIGHTSB - SB) * 1.1)
local smb : SMOOTHB * ((m1 - SB) / (RIGHTSB - SB) * 1.1)
local atTurnBot (obot - sma / 4)
local shrink 0.6
include : dispiro
straight.up.start (m1 - (sw * (1 - shrink) * HVCONTRAST)) (otop - smb) [widths.heading (sw * shrink) 0 UPWARD]
arcvh
g4 (m2 - sw * TANSLANT) (otop - O) [widths.heading sw 0 LEFTWARD]
archv
flat SB (otop - sma)
curl SB (obot + smb)
arcvh
g4 (m2 - sw * TANSLANT) (obot + O) [heading RIGHTWARD]
archv
straight.up.end (m1 - (sw * (1 - shrink) * HVCONTRAST)) (obot + sma) [widths.heading (sw * shrink) 0 UPWARD]
include : dispiro
widths.lhs sw
corner m1 (atTurnBot + sma) [heading UPWARD]
corner m1 (otop - smb) [heading UPWARD]
corner m1 otop [widths.heading (sw * shrink) 0 UPWARD]
include : dispiro
widths.lhs (sw * shrink)
straight.down.start (m1 - sw * shrink * HVCONTRAST) (atTurnBot + sma) [heading DOWNWARD]
arcvh
g4 ([mix (m1 - sw * HVCONTRAST) RIGHTSB 0.5] + CORRECTION_OMIDX * sw) (atTurnBot + O) [widths.lhs sw]
archv
flat RIGHTSB (atTurnBot + sma)
curl RIGHTSB (top - SMOOTHB)
hookend (top - O)
g4 SB (top - HOOK)
save 'at.short'
select-variant 'at' '@'
sketch # paragraph
set-width WIDTH
local sw : adviceBlackness 3.6
include : dispiro
widths.center sw
straight.left.start (MIDDLE - sw / 4) (CAP - sw / 2) [heading LEFTWARD]
archv
g4.down.mid (SB + sw / 2) [mix (CAP * 0.5) (CAP - sw / 2) 0.5] [heading DOWNWARD]
arcvh
straight.right.end (MIDDLE - sw / 4) (CAP * 0.5) [heading RIGHTWARD]
branch
include : VBar (MIDDLE + sw / 4) 0 CAP sw
include : VBar (RIGHTSB - sw / 2) 0 CAP sw
save 'paragraph.high'
branch
include : VBar (MIDDLE + sw / 4) DESCENDER CAP sw
include : VBar (RIGHTSB - sw / 2) DESCENDER CAP sw
save 'paragraph.low'
select-variant 'paragraph' 0xB6
sketch # revertParagraph
branch
include glyphs.'paragraph.high' AS_BASE
include : FlipAround MIDDLE (CAP / 2) (-1) 1
save 'revertParagraph.high'
branch
include glyphs.'paragraph.low' AS_BASE
include : FlipAround MIDDLE (CAP / 2) (-1) 1
save 'revertParagraph.low'
select-variant 'revertParagraph' 0x204B
sketch # section
local top parenTop
local bot parenBot
local sma SMOOTHA
local s : dispiro
widths.lhs
g4 RIGHTSB (top - HOOK)
hookstart top
g4 SB (top - sma)
alsothru 0.5 0.5 [widths HALFSTROKE HALFSTROKE]
g4 RIGHTSB [mix bot top 0.501] [widths 0 STROKE]
g4 RIGHTSB [mix bot top 0.5] [widths 0 STROKE]
g4 [mix SB RIGHTSB 0.6] [mix bot top : [linreg 18 0.325 108 0.3 STROKE] * (1 - TANSLANT * 0.1)]
include s
include : FlipAround MIDDLE symbolMid
include s
save 'section' 0xA7
do "Asterisk"
local asteriskCenterY : parenTop - LONGJUT * 1.5
local asteriskKinds : list
list 5 1.2 STROKE 'asterisk' 'high' 'low'
list 5 0.85 STROKE 'smallasterisk' 'high' 'low'
list 5 1 GEOMETRYSTROKE 'opAsterisk' 'high' 'low'
list 6 1.2 STROKE 'asterisk' 'hexhigh' 'hexlow'
foreach [{sides size stroke name high low} : items-of asteriskKinds] : begin
sketch
local radius : LONGJUT * size
local fine : stroke * 0.4
local final : 0.5 * [Math.min stroke (radius * Math.PI / sides)]
foreach j [range 0 sides] : begin
local s : Math.sin (j / sides * Math.PI * 2)
local c : Math.cos (j / sides * Math.PI * 2)
include : dispiro
flat MIDDLE asteriskCenterY [widths fine fine]
curl (MIDDLE + radius * s) (asteriskCenterY + radius * c) [widths final final]
save (name + '.' + high)
composite (name + '.' + low) glyphs.(name + '.' + high)
Upright
Translate 0 (symbolMid - asteriskCenterY)
begin MarkSet.plus
Italify
select-variant 'asterisk' '*'
select-variant 'asterisk' nothing
to-name -- 'asterisk.dfltlow'
transform -- {.high 'low' .hexhigh 'hexlow'}
do "Slashes and numbersign"
define slashDefautLeft : SB + HALFSTROKE
define slashDefaultRight : RIGHTSB - HALFSTROKE
define [SlashShape l r _t _b _w] : glyph-construction
local w : fallback _w STROKE
local t : fallback _t parenTop
local b : fallback _b parenBot
local cor : (1 / 2) * HVCONTRAST / [Math.sqrt (1 - [Math.pow ((r - l - STROKE) / (t - b)) 2])]
start-from (l - w * cor) b
line-to (l + w * cor) b
line-to (r + w * cor) t
line-to (r - w * cor) t
reverse-last
do "numbersign"
local nsTop : mix symbolMid parenTop 0.85
local nsBot : mix symbolMid parenBot 0.85
local fine : adviceBlackness 3.5
local l : SB - fine / 2
local r : RIGHTSB + fine / 2
local hsp : ((r - l) - (fine * 2 * HVCONTRAST)) * 0.3
sketch # numbersign.upright
include : HBar l r [mix nsTop nsBot 0.3]
include : HBar l r [mix nsTop nsBot 0.7]
include : VBarLeft (l + hsp) nsBot nsTop fine
include : VBarRight (r - hsp) nsBot nsTop fine
save 'numbersign.upright'
sketch # numbersign.slanted
local x : hsp + fine / 2 * HVCONTRAST
local w : (r - l) * 0.15
local shift : w / 3
include : HBar (l + shift) (r + shift) [mix nsTop nsBot 0.3]
include : HBar (l - shift) (r - shift) [mix nsTop nsBot 0.7]
include : SlashShape (l + x - w) (l + x + w) nsTop nsBot fine
include : SlashShape (r - x - w) (r - x + w) nsTop nsBot fine
save 'numbersign.slanted'
select-variant 'numbersign' '#'
sketch # slash
include : SlashShape slashDefautLeft slashDefaultRight
save 'slash' '/'
save 'solidus' 0x2044
sketch # doubleSlash
define w : adviceBlackness 3
define b : Math.max w (WIDTH * 0.15)
include : SlashShape (slashDefautLeft - b) (slashDefaultRight - b) nothing nothing w
include : SlashShape (slashDefautLeft + b) (slashDefaultRight + b) nothing nothing w
save 'doubleSlash' 0x2AFD
sketch # slash.left
include : SlashShape slashDefautLeft WIDTH
save 'slash.left'
sketch # slash.right
include : SlashShape 0 slashDefaultRight
save 'slash.right'
define [BackslashShape l r] : glyph-construction
local cor : (1 / 2) * HVCONTRAST / [Math.sqrt (1 - [Math.pow ((r - l - STROKE) / (parenTop - parenBot)) 2])]
start-from (l - STROKE * cor) parenTop
line-to (l + STROKE * cor) parenTop
line-to (r + STROKE * cor) parenBot
line-to (r - STROKE * cor) parenBot
local backslashWidth : (slashDefaultRight - slashDefautLeft) * (1 + TANSLANT * 2)
sketch # backslash
include : BackslashShape (MIDDLE - backslashWidth / 2) (MIDDLE + backslashWidth / 2)
save 'backslash' "\\"
sketch # backslash.left
include : BackslashShape (MIDDLE - backslashWidth / 2) WIDTH
save 'backslash.left'
sketch # backslash.right
include : BackslashShape 0 (MIDDLE + backslashWidth / 2)
save 'backslash.right'
do 'Dashes'
sketch # underscore.high
set-width WIDTH
include : HBarBottom SB RIGHTSB 0
save 'underscore.high'
sketch # underscore.belowBaseline
set-width WIDTH
include : HBarTop SB RIGHTSB 0
save 'underscore.belowBaseline'
composite 'underscore.low' glyphs.'underscore.high' [Upright] [Translate 0 (DESCENDER * 0.9)] [Italify]
select-variant 'underscore' '_'
sketch # overline
include : HBarTop SB RIGHTSB CAP
save 'overline' 0x203E
sketch # hyphen
set-width WIDTH
include : HBar SB RIGHTSB symbolMid
save 'hyphen' '-'
sketch # softhyphen
include glyphs.hyphen AS_BASE
save 'softhyphen' 0xAD
alias 'gpHyphen' 0x2010 'hyphen'
alias 'nbHyphen' 0x2011 'hyphen'
alias 'figureDash' 0x2012 'hyphen'
sketch # enDash
set-width WIDTH
include : HBar [mix 0 SB 0.5] [mix WIDTH RIGHTSB 0.5] symbolMid
save 'enDash' 0x2013
sketch # emDash
set-width WIDE-WIDTH-1
include : HBar 0 WIDE-WIDTH-1 symbolMid
save 'emDash' 0x2014
sketch # doubleEmDash
set-width (WIDE-WIDTH-1 * 2)
include : HBar 0 (WIDE-WIDTH-1 * 2) symbolMid
save 'doubleEmDash'
alias 'horizontalBar' 0x2015 'emDash'
do 'Interpuncts'
sketch # interpunct
include : DotAt MIDDLE symbolMid (PERIODRADIUS - O)
save 'period.center'
save 'interpunct' 0xB7
save 'greekbullet' 0x387
save 'bullet' 0x2022
save 'hyphenpoint' 0x2027
sketch # whitebullet
set-width WIDE-WIDTH-1
local s : [adviceBlackness 5] * 0.75
include : difference
DotAt FWMIDDLE symbolMid (PERIODRADIUS - O)
DotAt FWMIDDLE symbolMid (PERIODRADIUS - O - s)
save 'whitebullet' 0x25E6
do 'Quotes and Primes'
local quoteTop (CAP * 1.05)
local quoteBottom (XH * 0.85)
sketch # singleQuote
set-width WIDTH
include : dispiro
widths.center (STROKE * 1.1)
g4.down.start MIDDLE quoteTop [heading DOWNWARD]
g4 MIDDLE quoteBottom [widths.heading (HALFSTROKE * 0.95) (HALFSTROKE * 0.95) DOWNWARD]
save 'singleQuote' 0x27
sketch # doubleQuote
set-width WIDTH
local dist : 0.2 * WIDTH
include glyphs.singleQuote
apply-transform : Translate (-dist * 2) 0
include glyphs.singleQuote
apply-transform : Translate dist 0
save 'doubleQuote' 0x22
local yCurlyQuotes [mix quoteBottom quoteTop 0.5]
local commaLow (DESCENDER * 0.9)
local ratio : Math.min 1 : (quoteTop - quoteBottom) / (PERIODSIZE - commaLow)
sketch # lowSingleQuote
include glyphs.comma
include : FlipAround MIDDLE 0 ratio ratio
save 'lowSingleQuote' 0x201A
sketch # openSingleQuote
include glyphs.lowSingleQuote
include : FlipAround MIDDLE [mix [mix PERIODSIZE commaLow 0.5] yCurlyQuotes 0.5]
save 'openSingleQuote' 0x2018
sketch # closeSingleQuote
include glyphs.openSingleQuote
include : FlipAround MIDDLE yCurlyQuotes
save 'closeSingleQuote' 0x2019
sketch # revertSingleQuote
include glyphs.invertComma
include : FlipAround MIDDLE 0 ratio ratio
include : FlipAround MIDDLE [mix [mix PERIODSIZE commaLow 0.5] yCurlyQuotes 0.5]
include : FlipAround MIDDLE yCurlyQuotes
save 'revertSingleQuote' 0x201B
sketch # lowDoubleQuote
local dist : WIDTH * 0.225
include glyphs.lowSingleQuote
apply-transform : Translate (-dist * 2) 0
include glyphs.lowSingleQuote
apply-transform : Translate dist 0
save 'lowDoubleQuote' 0x201E
sketch # openDoubleQuote
include glyphs.lowDoubleQuote
include : FlipAround MIDDLE [mix [mix PERIODSIZE commaLow 0.5] yCurlyQuotes 0.5]
save 'openDoubleQuote' 0x201C
sketch # closeDoubleQuote
include glyphs.openDoubleQuote
include : FlipAround MIDDLE yCurlyQuotes
save 'closeDoubleQuote' 0x201D
sketch # revertDoubleQuote
local dist : WIDTH * 0.225
include glyphs.revertSingleQuote
apply-transform : Translate (-dist * 2) 0
include glyphs.revertSingleQuote
apply-transform : Translate dist 0
save 'revertDoubleQuote' 0x201F
sketch # prime
local wide : WIDTH * 0.1
include : dispiro
widths.center (STROKE * 1.2)
flat (MIDDLE + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE - wide) quoteBottom [widths.heading HALFSTROKE HALFSTROKE DOWNWARD]
save 'prime' 0x2032
sketch # doubleprime
local d : 0.25 * (RIGHTSB - SB)
include glyphs.prime
apply-transform : Translate (-d * 2) 0
include glyphs.prime
apply-transform : Translate d 0
save 'doubleprime' 0x2033
sketch # tripleprime
local wide : WIDTH * 0.1
local d : WIDTH * 0.3
local fine : 0.5 * [adviceBlackness 3.5]
include : dispiro
widths.center (fine * 2 * 1.2)
flat (MIDDLE + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE - wide) quoteBottom [widths.heading fine fine DOWNWARD]
include : dispiro
widths.center (fine * 2 * 1.2)
flat (MIDDLE - d + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE - d - wide) quoteBottom [widths.heading fine fine DOWNWARD]
include : dispiro
widths.center (fine * 2 * 1.2)
flat (MIDDLE + d + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE + d - wide) quoteBottom [widths.heading fine fine DOWNWARD]
save 'tripleprime' 0x2034
sketch # revprime
local wide : -WIDTH * 0.1
include : dispiro
widths.center (STROKE * 1.2)
flat (MIDDLE + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE - wide) quoteBottom [widths.heading HALFSTROKE HALFSTROKE DOWNWARD]
save 'revprime' 0x2035
sketch # revdoubleprime
local d : 0.25 * (RIGHTSB - SB)
include glyphs.revprime
apply-transform : Translate (-d * 2) 0
include glyphs.revprime
apply-transform : Translate d 0
save 'revdoubleprime' 0x2036
sketch # revtripleprime
local wide : -WIDTH * 0.1
local d : WIDTH * 0.3
local fine : 0.5 * [adviceBlackness 3.5]
include : dispiro
widths.center (fine * 2 * 1.2)
flat (MIDDLE + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE - wide) quoteBottom [widths.heading fine fine DOWNWARD]
include : dispiro
widths.center (fine * 2 * 1.2)
flat (MIDDLE - d + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE - d - wide) quoteBottom [widths.heading fine fine DOWNWARD]
include : dispiro
widths.center (fine * 2 * 1.2)
flat (MIDDLE + d + wide) quoteTop [heading DOWNWARD]
curl (MIDDLE + d - wide) quoteBottom [widths.heading fine fine DOWNWARD]
save 'revtripleprime' 0x2037
do 'guillemet'
sketch # singleGuillemetLeft
local top : mix symbolMid parenTop 0.5
local bot : mix symbolMid parenBot 0.5
local extension 0.55
local cor 1
local sw : adviceBlackness 3.5
include : dispiro
widths.center sw
g4 [mix MIDDLE RIGHTSB extension] top
quadcontrols 0.4 0.75
g4 [mix MIDDLE SB extension] [mix top bot 0.5] [widths.center.heading (cor * sw) LEFTWARD]
include : dispiro
widths.center (sw * cor)
g4 [mix MIDDLE SB extension] [mix top bot 0.5] [heading RIGHTWARD]
quadcontrols (1 - 0.4) (1 - 0.75)
g4 [mix MIDDLE RIGHTSB extension] bot [widths.center sw]
apply-transform : Translate (-(RIGHTSB - SB) * 0.05) 0
save 'singleGuillemetLeft' 0x2039
sketch # guillemetLeft
include glyphs.singleGuillemetLeft
apply-transform : Translate ((RIGHTSB - SB) * 0.5) 0
include glyphs.singleGuillemetLeft
apply-transform : Translate (-(RIGHTSB - SB) * 0.25) 0
save 'guillemetLeft' 0xAB
sketch # singleGuillemetRight
include glyphs.singleGuillemetLeft
include : FlipAround MIDDLE symbolMid
save 'singleGuillemetRight' 0x203A
sketch # guillemetRight
include glyphs.guillemetLeft
include : FlipAround MIDDLE symbolMid
save 'guillemetRight' 0xBB
do 'Daggers'
sketch # dagger
include : HBar SB RIGHTSB [mix parenTop parenBot 0.33]
include : VBar MIDDLE parenBot parenTop
save 'dagger' 0x2020
sketch # doubledagger
include glyphs.dagger
include : HBar SB RIGHTSB [mix parenTop parenBot 0.67]
save 'doubledagger' 0x2021
for-width-kinds WIDE-WIDTH-1 "Ellipsis"
define [DotRadius darkness space] : begin
return : 0.5 * [adviceBlackness darkness (space / WIDTH)] * PERIODSIZE / STROKE
sketch # onedotLeader
set-width MosaicWidth
local radius : DotRadius 3.5 MosaicWidth
include : DotAt (MosaicWidth / 2) radius (radius - O)
save [MangleName 'onedotLeader'] [MangleUnicode 0x2024]
sketch # twodotsLEader
set-width MosaicWidth
local radius : DotRadius 3.5 MosaicWidth
local left : mix 0 MosaicWidth (1 / 4)
local right : mix 0 MosaicWidth (3 / 4)
include : DotAt left radius (radius - O)
include : DotAt right radius (radius - O)
save [MangleName 'twodotsLEader'] [MangleUnicode 0x2025]
sketch # ellipsis
set-width MosaicWidth
local radius : DotRadius 5 MosaicWidth
local left : mix 0 MosaicWidth (1 / 6)
local right : mix 0 MosaicWidth (5 / 6)
include : DotAt left radius (radius - O)
include : DotAt (MosaicWidth / 2) radius (radius - O)
include : DotAt right radius (radius - O)
save [MangleName 'ellipsis'] [MangleUnicode 0x2026]
apply-transform : Upright
apply-transform : Translate 0 (symbolMid - radius)
apply-transform : Italify
save [MangleName 'mathCDots'] [MangleUnicode 0x22EF]
define [TriColonShape x bottom top] : glyph-construction
local radius : DotRadius 5 (top - bottom)
local mid : mix bottom top 0.5
include : DotAt x (bottom + radius) (radius - O)
include : DotAt x mid (radius - O)
include : DotAt x (top - radius) (radius - O)
sketch # tricolon
set-width MosaicWidth
include : TriColonShape (MosaicWidth / 2) 0 XH
save [MangleName 'tricolon'] [MangleUnicode 0x205D]
sketch # mathCVDots
set-width MosaicWidth
include : TriColonShape (MosaicWidth / 2) operBot operTop
save [MangleName 'mathCVDots'] [MangleUnicode 0x22EE]
do 'Percentages'
sketch # percent.dots
set-width WIDTH
local dotwidth ([adviceBlackness 4] * 1.5)
local cor : HVCONTRAST / [Math.sqrt (1 - [Math.pow ((RIGHTSB - SB - STROKE) / (CAP - 0)) 2])]
start-from SB 0
line-to (SB + STROKE * cor) 0
line-to RIGHTSB CAP
line-to (RIGHTSB - STROKE * cor) CAP
include : VBarLeft SB [mix CAP 0 0.3] CAP dotwidth
include : VBarRight RIGHTSB 0 [mix 0 CAP 0.3] dotwidth
save 'percent.dots'
sketch # permille
local width : WIDTH * para.diversityM
local rightSB : width - SB
set-width width
local dotwidth ([adviceBlackness 4] * 1.5)
include : dispiro
widths.center
flat SB (CAP * 0.2)
curl [mix SB rightSB 0.85] (CAP * 0.9)
include : VBarLeft [mix SB rightSB 0.075] [mix CAP 0 0.3] CAP dotwidth
include : VBarRight rightSB 0 [mix 0 CAP 0.3] dotwidth
include : VBarRight (rightSB - [Math.max (WIDTH * 0.25) (dotwidth * 1.5)]) 0 [mix 0 CAP 0.3] dotwidth
save 'permille.dots'
sketch # basepoint
local width : WIDTH * para.diversityM
local rightSB : width - SB
set-width width
local dotwidth ([adviceBlackness 4] * 1.5)
local dotfine [adviceBlackness 3.5]
include : dispiro
widths.center
flat SB (CAP * 0.2)
curl [mix SB rightSB 0.85] (CAP * 0.9)
include : VBarLeft SB [mix CAP 0 0.3] CAP dotwidth
include : VBarRight rightSB 0 [mix 0 CAP 0.3] dotfine
include : VBar [mix [mix SB rightSB 0.1] rightSB 0.5] 0 [mix 0 CAP 0.3] dotfine
include : VBarLeft [mix SB rightSB 0.1] 0 [mix 0 CAP 0.3] dotfine
save 'basepoint.dots'
sketch # percent.rings
set-width WIDTH
local l : SB / 2
local r : WIDTH - l
local m : mix l r (1 / 2)
local sma : SMOOTHA * 0.5
local smb : SMOOTHB * 0.5
local sw : adviceBlackness 4
local fine : adviceBlackness 5
local cor : HVCONTRAST / [Math.sqrt (1 - [Math.pow ((r - l - sw) / (CAP - 0)) 2])]
local pTerm : (fine / 2) / [Math.hypot CAP (r - l)]
local pFine : 1 / 2 - [Math.max (CAP / 10) (STROKE / 2)] / [Math.hypot CAP (r - l)]
include : OShape CAP (CAP / 2) l m sw sma smb
include : OShape (CAP / 2) 0 m r sw sma smb
include : dispiro
widths.rhs (sw * cor)
flat r CAP [heading DOWNWARD]
curl [mix r l pFine] [mix CAP 0 pFine] [widths.heading (fine * cor) 0 DOWNWARD]
include : dispiro
widths.rhs (sw * cor)
flat l 0 [heading UPWARD]
curl [mix l r pFine] [mix 0 CAP pFine] [widths.heading (fine * cor) 0 UPWARD]
save 'percent.rings'
sketch # permille.rings, basepoint.rings
local width : WIDTH * para.diversityM
local rightSB : width - SB
set-width width
local l : SB / 2
local r : width - l
local m : mix l r (1 / 2)
local sma : SMOOTHA * 0.5 * para.diversityM
local smb : SMOOTHB * 0.5 * para.diversityM
local sw : adviceBlackness2 5 4 CAP para.diversityM
local fine : adviceBlackness2 5 5 CAP para.diversityM
local cor : HVCONTRAST / [Math.sqrt (1 - [Math.pow ((r - l - sw) / (CAP - 0)) 2])]
local pTerm : (fine / 2) / [Math.hypot CAP (r - l)]
local pFine : 1 / 2 - (STROKE / 2) / [Math.hypot CAP (r - l)]
local otop : CAP / 2 - [Math.max (CAP / 5) (fine * 2)] / 2
local coOtop : CAP - otop
include : OShape CAP (CAP - otop) l m sw sma smb
include : dispiro
flat l [mix otop coOtop 0.3] [widths.center fine]
curl r (CAP - otop) [widths.center sw]
# bottom row
branch
local l1 : l - O
local r2 r
local gap : (SB / 2 - O * 2) * para.diversityM
local fill : ((r2 - l1) - gap) / 2
local r1 : l1 + fill
local l2 : r1 + gap
local swp : adviceBlackness 4
include : OShape otop 0 l1 r1 swp sma smb
include : OShape otop 0 l2 r2 swp sma smb
save 'permille.rings'
branch
local l1 : l - O
local r3 r
local gap : (SB / 2 - O) * para.diversityM
local fill : ((r3 - l1) - 2 * gap) / 3
local r1 : l1 + fill
local l2 : r1 + gap
local r2 : l2 + fill
local l3 : r2 + gap
local swp : adviceBlackness2 5 6.5 CAP para.diversityM
local smap : SMOOTHA * (1/3) * para.diversityM
local smbp : SMOOTHB * (1/3) * para.diversityM
include : OShape otop 0 l1 r1 swp smap smbp
include : OShape otop 0 l2 r2 swp smap smbp
include : OShape otop 0 l3 r3 swp smap smbp
save 'basepoint.rings'
select-variant 'percent' '%'
select-variant 'permille' 0x2030
select-variant 'basepoint' 0x2031
do "ASCII Marks"
local MarkZoom : glyph-construction
apply-transform : Upright
apply-transform : Translate (-MIDDLE) (-XH - ACCENT)
apply-transform : Scale ((RIGHTSB - SB) / (markExtend * 3))
apply-transform : Translate (MIDDLE) (XH + ACCENT)
apply-transform : Italify
composite 'asciitilde.low' glyphs.'asciitilde.high' [Upright] [Translate 0 (symbolMid - XH - ACCENT)] [Italify] MarkSet.plus
select-variant 'asciitilde' '~'
composite 'asciicaret.low' glyphs.'asciicaret.high' [Upright] [Translate 0 (symbolMid - XH - ACCENT)] [Italify] MarkSet.plus
select-variant 'asciicaret' '^'
composite 'degree' glyphs.markBaseSpace glyphs.ringAbove MarkZoom [into-unicode 0xB0]
alias 'mdfPrime' 0x2B9 'prime'
alias 'mdfDoublePrime' 0x2BA 'doubleprime'
alias 'mdfTurncomma' 0x2BB 'openSingleQuote'
alias 'mdfApostrophe' 0x2BC 'closeSingleQuote'
alias 'mdfRevComma' 0x2BD 'revertSingleQuote'
alias 'mdfStress' 0x2C8 'singleQuote'
turned 'mdfSecondaryStress' 0x2CC 'singleQuote' MIDDLE (XH / 2)
do "Ties"
sketch
include : dispiro
widths.lhs OPERATORSTROKE
g4 (SB + OX) 0
quadcontrols 0.5 1
g4.right.mid MIDDLE (DESCENDER / 3) [heading RIGHTWARD]
quadcontrols 0.5 0
g4 (RIGHTSB - OX) 0
save "undertie" 0x203F