Files
Iosevka/glyphs/symbol-other.ptl
T
2016-01-05 02:14:52 +08:00

126 lines
4.3 KiB
Plaintext

###### Other symbols
# IPA tonal marks
symbol-block 'Phonetic Symbols'
local triangleSize : Math.min (PERIODRADIUS) (XH / 5)
sketch # trianglecolon
start-from (MIDDLE - triangleSize * 1.35) XH
line-to MIDDLE (XH - triangleSize * 2.75)
line-to (MIDDLE + triangleSize * 1.35) XH
start-from (MIDDLE - triangleSize * 1.35) 0
line-to MIDDLE (0 + triangleSize * 2.75)
line-to (MIDDLE + triangleSize * 1.35) 0
save 'trianglecolon' 0x2D0
sketch # halftrianglecolon
start-from (MIDDLE - triangleSize * 1.35) XH
line-to MIDDLE (XH - triangleSize * 2.75)
line-to (MIDDLE + triangleSize * 1.35) XH
save 'halftrianglecolon' 0x2D1
foreach tone [range 4 downtill 0] : begin
create-glyph ('tone' + tone) : glyph-construction
assign-unicode (0x2E5 + 4 - tone)
include : VBarRight [mix SB RIGHTSB 0.9] 0 CAP OPERATORSTROKE
include : HBar [mix SB RIGHTSB 0.1] ([mix SB RIGHTSB 0.9] - 1) [mix (OPERATORSTROKE / 2) (CAP - OPERATORSTROKE / 2) (tone / 4)] OPERATORSTROKE
# Suit card
symbol-block 'Suit Cards'
local heartTop : mix parenMid parenTop 0.6
local heartBot : mix parenMid parenBot 0.6
sketch # heart
local y1 : mix heartBot heartTop 0.5
local y2 : mix heartBot heartTop 0.75
local y3 : mix heartBot heartTop 0.75
include : spiro-outline
corner MIDDLE heartBot
quadcontrols 1 (2 / 3)
g4 (RIGHTSB - O) y2
arcvh
g4 [mix MIDDLE RIGHTSB 0.5] heartTop
archv
corner MIDDLE y3
arcvh
g4 [mix MIDDLE SB 0.5] heartTop
archv
g4 (SB + O) y2
quadcontrols 0 (1 / 3)
close
save 'heart' 0x2665
sketch # spade
include glyphs.heart
apply-transform : Upright
apply-transform : Translate (-MIDDLE) (-heartBot)
apply-transform : Scale 1 (-0.75)
apply-transform : Translate MIDDLE heartTop
apply-transform : Italify
include : HBarBottom [mix SB RIGHTSB 0.25] [mix RIGHTSB SB 0.25] heartBot
include : VBar MIDDLE heartBot [mix heartBot heartTop (1 - 0.75 * 0.75)]
save 'spade' 0x2660
sketch # clubs
local circleRadius : (heartTop - heartBot) * 0.2
include : RingAt MIDDLE (heartTop - circleRadius) circleRadius
include : RingAt (SB + O + circleRadius) [mix heartBot heartTop 0.45] circleRadius
include : RingAt (RIGHTSB - O - circleRadius) [mix heartBot heartTop 0.45] circleRadius
include : HBarBottom [mix SB RIGHTSB 0.25] [mix RIGHTSB SB 0.25] heartBot
include : VBar MIDDLE heartBot [mix heartBot heartTop (1 - 0.75 * 0.75)]
save 'clubs' 0x2663
sketch # diamond
start-from MIDDLE heartTop
line-to RIGHTSB parenMid
line-to MIDDLE heartBot
line-to SB parenMid
save 'diamond' 0x2666
symbol-block 'Planets'
sketch # venus
local obot : operTop - RIGHTSB + SB
include : OShape operTop obot SB RIGHTSB OPERATORSTROKE
include : VBar MIDDLE operBot obot OPERATORSTROKE
include : HBar SB RIGHTSB [mix operBot (obot + OPERATORSTROKE) 0.5] OPERATORSTROKE
save 'venus' 0x2640
turned 'earth' 0x2641 'venus' MIDDLE parenMid
sketch # mars
local otop : operBot + RIGHTSB - SB
include : OShape otop operBot SB RIGHTSB OPERATORSTROKE
include : ArrowShape MIDDLE (otop - OPERATORSTROKE / 3) MIDDLE operTop ((RIGHTSB - SB) * 0.4)
save 'mars' 0x2642
symbol-block 'Musical'
sketch # quaver
local fine : adviceBlackness 5
local noteSize : MIDDLE + fine / 2 - SB
local y1 : mix operBot operTop 0.8
local y2 : mix operBot operTop 0.4
local x3 : mix SB RIGHTSB 0.7
local y3 : mix operBot operTop 0.25
include : Ring (operBot + 0.8 * noteSize) operBot SB (SB + noteSize)
include : VBarRight (SB + noteSize) (operBot + 0.4 * noteSize) operTop fine
include : dispiro
widths.rhs fine
g4 (SB + noteSize) operTop
bezcontrols.absolute RIGHTSB y1 RIGHTSB y2
g4 x3 y3
save 'quaver' 0x266A
symbol-block 'Metric marks'
sketch # metmark
include : VBar MIDDLE (-font.'OS/2'.usWinDescent) (font.'OS/2'.usWinAscent) SHOULDERFINE
include : HBar MIDDLE WIDTH 0 SHOULDERFINE
include : HBar MIDDLE WIDTH CAP SHOULDERFINE
include : HBar MIDDLE WIDTH XH SHOULDERFINE
include : HBar MIDDLE WIDTH DESCENDER SHOULDERFINE
include : HBar 0 MIDDLE parenMid SHOULDERFINE
include : HBar 0 MIDDLE parenTop SHOULDERFINE
include : HBar 0 MIDDLE parenBot SHOULDERFINE
save 'metmark' 0xE09F