###### ASCII SYMBOLS ### Symbols with many strokes: $ & @ create-glyph 'dollar' : glyph-construction { set-width WIDTH; assign-unicode '$' include glyphs.S include : create-stroke :.start-from MIDDLE [CAP - HALFSTROKE] :.set-width HALFSTROKE HALFSTROKE :.line-to MIDDLE [CAP - DESCENDER / 2] include : create-stroke :.start-from MIDDLE [DESCENDER / 2] :.set-width HALFSTROKE HALFSTROKE :.line-to MIDDLE HALFSTROKE } create-glyph 'ampersand' : glyph-construction { set-width WIDTH assign-unicode '&' local fine : adviceBlackness 3.5 local p 0.85 local l 0.05 local pr 0.9 local q 0.45 local r 1.1 local s 0 include : create-stroke :.start-from [RIGHTSB - O] CAPMIDDLE :.set-width 0 STROKE :.heads-to DOWNWARD :.line-to [RIGHTSB - O] SMOOTHA :.arc-vh-to MIDDLE O :.heads-to LEFTWARD :.arc-hv-to [SB + O] SMOOTHB include : xsStrand [SB + O] SMOOTHB [mix SB RIGHTSB p] [CAP - SMOOTHB * pr] HALFSTROKE [fine / 2] include : create-stroke :.start-from [mix SB RIGHTSB p] [CAP - SMOOTHB * pr] :.set-width fine 0 :.arc-vh-to [mix SB RIGHTSB [mix p l 0.5]] CAPO :.heads-to LEFTWARD :.arc-hv-to [mix SB RIGHTSB l] [CAP - SMOOTHA * pr] include : xsStrand [mix SB RIGHTSB l] [CAP - SMOOTHA * pr] [mix SB RIGHTSB r] [SMOOTHA * s] [fine / 2] [fine / 2] null null [SMOOTHA * pr * 0.6] } create-glyph 'at' : glyph-construction { set-width WIDTH assign-unicode '@' local top [CAP + HALFSTROKE] local bot [DESCENDER + HALFSTROKE] 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.5 local sma : SMOOTHA * [[RIGHTSB - m1] / [RIGHTSB - SB]] local smb : SMOOTHB * [[RIGHTSB - m1] / [RIGHTSB - SB]] include : create-stroke :.start-from RIGHTSB [otop - O] :.heads-to LEFTWARD :.set-width sw 0 :.line-to m2 [otop - O] :.arc-hv-to m1 [otop - sma] :.line-to m1 [obot + smb] :.arc-vh-to [m2 + STROKE * globalTransform.yx] [obot + O] :.arc-hv-to RIGHTSB [obot + sma] :.line-to RIGHTSB [top - SMOOTHB] :.arc-vh-to MIDDLE [top - O] :.set-width STROKE 0 :.arc-hv-to SB [top - SMOOTHA] :.set-width sw 0 :.line-to SB [bot + SMOOTHB] :.arc-vh-to MIDDLE [bot + O] :.set-width STROKE 0 :.heads-to RIGHTWARD :.line-to [RIGHTSB - HALFSTROKE] [bot + O] :.heads-to RIGHTWARD :.set-samples 4 } ### Brackets local parenTop [[XH * 0.625] + [CAP - XH] * 2.5] local parenBot [[XH * 0.625] - [CAP - XH] * 2.5] local parenMid [mix parenTop parenBot 0.5] local parenOutside 0.15 local parenInside 0.65 local bracketOutside 0.15 local bracketInside 0.9 local braceOutside 0.1 local braceInside 0.9 create-glyph 'parenLeft' : glyph-construction { set-width WIDTH assign-unicode '(' local p 0.6 include : create-stroke :.start-from [mix SB RIGHTSB parenInside] parenTop :.set-width STROKE 0 :.curve-to [mix SB RIGHTSB parenOutside] [mix parenMid parenTop p] [mix SB RIGHTSB parenOutside] parenMid :.curve-to [mix SB RIGHTSB parenOutside] [mix parenMid parenBot p] [mix SB RIGHTSB parenInside] parenBot } create-glyph 'parenRight' : glyph-construction { set-width WIDTH assign-unicode ')' include glyphs.parenLeft include : FlipAround MIDDLE parenMid } create-glyph 'bracketLeft' : glyph-construction { set-width WIDTH assign-unicode '[' include : create-stroke :.start-from [mix SB RIGHTSB bracketOutside] parenBot :.set-width STROKE 0 :.heads-to RIGHTWARD :.line-to [mix SB RIGHTSB bracketInside] parenBot :.heads-to RIGHTWARD include : create-stroke :.start-from [mix SB RIGHTSB bracketOutside] parenTop :.set-width 0 STROKE :.heads-to RIGHTWARD :.line-to [mix SB RIGHTSB bracketInside] parenTop :.heads-to RIGHTWARD include : create-stroke :.start-from [mix SB RIGHTSB bracketOutside] parenBot :.set-width 0 STROKE :.heads-to UPWARD :.line-to [mix SB RIGHTSB bracketOutside] parenTop :.heads-to UPWARD } create-glyph 'bracketRight' : glyph-construction { set-width WIDTH assign-unicode ']' include glyphs.bracketLeft include : FlipAround MIDDLE parenMid } create-glyph 'braceLeft' : glyph-construction { set-width WIDTH assign-unicode '{' local parenCenter [mix SB RIGHTSB [mix braceInside braceOutside 0.5]] local radius : [mix SB RIGHTSB braceInside] - parenCenter include : create-stroke :.start-from [mix SB RIGHTSB braceInside] [parenTop - HALFSTROKE] :.set-width HALFSTROKE HALFSTROKE :.heads-to LEFTWARD :.arc-hv-to parenCenter [parenTop - radius] :.line-to parenCenter [parenMid + radius] :.arc-vh-to [mix SB RIGHTSB braceOutside] parenMid :.heads-to LEFTWARD include : create-stroke :.start-from [mix SB RIGHTSB braceInside] [parenBot + HALFSTROKE] :.set-width HALFSTROKE HALFSTROKE :.heads-to LEFTWARD :.arc-hv-to parenCenter [parenBot + radius] :.line-to parenCenter [parenMid - radius] :.arc-vh-to [mix SB RIGHTSB braceOutside] parenMid :.heads-to LEFTWARD } create-glyph 'braceRight' : glyph-construction { set-width WIDTH assign-unicode '}' include glyphs.braceLeft include : FlipAround MIDDLE parenMid } ### Symbols with dots: period, comma, colon, semicolon create-glyph 'period' : glyph-construction { set-width WIDTH assign-unicode '.' include : list : Ring [PERIODSIZE - O] O [MIDDLE - PERIODRADIUS + O] [MIDDLE + PERIODRADIUS - O] } create-glyph 'xhdot' : glyph-construction { set-width WIDTH include : list : Ring [XH - O] [XH - PERIODSIZE + O] [MIDDLE - PERIODRADIUS + O] [MIDDLE + PERIODRADIUS - O] } create-glyph 'comma' : glyph-construction { set-width WIDTH assign-unicode ',' include glyphs.period local sw : PERIODSIZE * 0.5 include : create-stroke :.start-from [MIDDLE + PERIODRADIUS - O] [mix O [PERIODSIZE - O] 0.5] :.set-width 0 sw :.curve-to [MIDDLE + PERIODRADIUS - O] [mix [mix O [PERIODSIZE - O] 0.5] DESCENDER 0.5] [mix MIDDLE [MIDDLE - PERIODRADIUS] 0.3] DESCENDER } create-glyph 'invertComma' : glyph-construction { set-width WIDTH include glyphs.period local sw : PERIODSIZE * 0.5 include : create-stroke :.start-from [MIDDLE - PERIODRADIUS + O] [mix O [PERIODSIZE - O] 0.5] :.set-width sw 0 :.curve-to [MIDDLE - PERIODRADIUS + O] [mix [mix O [PERIODSIZE - O] 0.5] DESCENDER 0.5] [mix MIDDLE [MIDDLE + PERIODRADIUS] 0.3] DESCENDER } create-glyph 'colon' : glyph-construction { set-width WIDTH assign-unicode ':' include glyphs.period include glyphs.xhdot } create-glyph 'semicolon' : glyph-construction { set-width WIDTH assign-unicode ';' include glyphs.comma include glyphs.xhdot } create-glyph 'question' : glyph-construction { set-width WIDTH assign-unicode '?' include : xsStrand [MIDDLE - HALFSTROKE] [mix [DOTSIZE + STROKE] [XH / 2] 0.5] RIGHTSB [CAP - SMOOTHB] include : twoHookUpper CAP SMOOTHB HOOK include : list : Ring [DOTSIZE - O] O [MIDDLE - DOTRADIUS + O] [MIDDLE + DOTRADIUS - O] } create-glyph 'exclam' : glyph-construction { set-width WIDTH assign-unicode '!' include : create-stroke :.start-from MIDDLE CAP :.set-width HALFSTROKE HALFSTROKE :.heads-to DOWNWARD :.line-to MIDDLE [mix [DOTSIZE + STROKE] [XH / 2] 0.5] :.heads-to DOWNWARD include : list : Ring [DOTSIZE - O] O [MIDDLE - DOTRADIUS + O] [MIDDLE + DOTRADIUS - O] } ### Symbols with bars create-glyph 'underscore' : glyph-construction { set-width WIDTH assign-unicode '_' include : create-stroke :.start-from SB 0 :.heads-to RIGHTWARD :.set-width STROKE 0 :.line-to RIGHTSB 0 :.heads-to RIGHTWARD } create-glyph 'hyphen' : glyph-construction { set-width WIDTH assign-unicode '-' include : HBar SB RIGHTSB parenMid } create-glyph 'plus' : glyph-construction { set-width WIDTH assign-unicode '+' include : HBar SB RIGHTSB parenMid OPERATORSTROKE include : VBar MIDDLE [parenMid - [RIGHTSB - SB] * 0.55] [parenMid + [RIGHTSB - SB] * 0.55] OPERATORSTROKE } local equalHalfSpace : [parenTop - parenBot] * 0.11 create-glyph 'equal' : glyph-construction { set-width WIDTH assign-unicode '=' include : HBar SB RIGHTSB [parenMid + equalHalfSpace] OPERATORSTROKE include : HBar SB RIGHTSB [parenMid - equalHalfSpace] OPERATORSTROKE } create-glyph 'bar' : glyph-construction { set-width WIDTH assign-unicode '|' include : create-stroke :.start-from MIDDLE parenTop :.heads-to DOWNWARD :.set-width [STROKE / 2] [STROKE / 2] :.line-to MIDDLE parenBot :.heads-to DOWNWARD } create-glyph 'slash' : glyph-construction { set-width WIDTH assign-unicode '/' local cor : 1 / [Math.sqrt [1 - [Math.pow [[RIGHTSB - SB - STROKE] / [parenTop - parenBot]] 2]]] start-from SB parenBot line-to [SB + STROKE * cor] parenBot line-to RIGHTSB parenTop line-to [RIGHTSB - STROKE * cor] parenTop reverse-last } create-glyph 'backslash' : glyph-construction { set-width WIDTH assign-unicode "\\" local cor : 1 / [Math.sqrt [1 - [Math.pow [[RIGHTSB - SB - STROKE] / [parenTop - parenBot]] 2]]] start-from SB parenTop line-to [SB + STROKE * cor] parenTop line-to RIGHTSB parenBot line-to [RIGHTSB - STROKE * cor] parenBot reverse-last } create-glyph 'numbersign' : glyph-construction { set-width WIDTH assign-unicode '#' local fine : adviceBlackness 4 include : HBar SB RIGHTSB [mix parenTop parenBot 0.33] include : HBar SB RIGHTSB [mix parenTop parenBot 0.67] include : VBar [mix SB RIGHTSB 0.3] [parenBot + fine] [parenTop - fine] fine include : VBar [mix SB RIGHTSB 0.7] [parenBot + fine] [parenTop - fine] fine } create-glyph 'less' : glyph-construction { set-width WIDTH assign-unicode '<' local top : mix parenMid parenTop 0.5 local bot : mix parenMid parenBot 0.5 include : create-stroke :.start-from RIGHTSB top :.set-width [OPERATORSTROKE / 2] [OPERATORSTROKE / 2] :.line-to SB [mix top bot 0.5] :.heads-to LEFTWARD :.set-samples 1 include : create-stroke :.start-from SB [mix top bot 0.5] :.set-width [OPERATORSTROKE / 2] [OPERATORSTROKE / 2] :.heads-to RIGHTWARD :.line-to RIGHTSB bot :.set-samples 1 } create-glyph 'greater' : glyph-construction { set-width WIDTH assign-unicode '>' local top : mix 0 CAP 0.75 local bot : mix 0 CAP 0.1 include glyphs.less include : FlipAround MIDDLE parenMid } ### Overmarks local quoteTop [CAP * 1.05] local quoteBottom [XH * 0.85] create-glyph 'singleQuote' : glyph-construction { set-width WIDTH assign-unicode 0x27 include : create-stroke :.start-from MIDDLE quoteTop :.heads-to DOWNWARD :.set-width [HALFSTROKE * 1.2] [HALFSTROKE * 1.2] :.line-to MIDDLE quoteBottom :.set-width HALFSTROKE HALFSTROKE :.heads-to DOWNWARD } create-glyph 'doubleQuote' : glyph-construction { set-width WIDTH assign-unicode 0x22 local dist : 0.2 * WIDTH include glyphs.singleQuote apply-transform : Translate [-dist * 2] 0 include glyphs.singleQuote apply-transform : Translate dist 0 } ### Asterisk create-glyph 'asterisk' : glyph-construction { set-width WIDTH assign-unicode '*' local radius : LONGJUT * 1.2 local centery : parenTop - LONGJUT * 1.5 local fine : STROKE * 0.4 local final : 0.5 * [Math.min STROKE [radius * Math.PI * 2 / 10]] foreach j [range 0 5] : begin { include : create-stroke :.start-from MIDDLE centery :.set-width fine fine :.line-to [MIDDLE + radius * [Math.sin [j / 5 * Math.PI * 2]]] [centery + radius * [Math.cos [j / 5 * Math.PI * 2]]] :.set-width final final :.set-samples 1 } } create-glyph 'percent' : glyph-construction { set-width WIDTH assign-unicode '%' local dotwidth [[adviceBlackness 4] * 1.5] local cor : 1 / [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 }