Iosevka/glyphs/latin-lower.patel
2015-07-24 07:48:08 +08:00

748 lines
20 KiB
Plaintext

###### LOWER CASE
### components
create-glyph 'fbar' : glyph-construction {
include : create-stroke
:.start-from [MIDDLE - LONGJUT] XH
:.heads-to RIGHTWARD
:.set-width 0 STROKE
:.line-to [MIDDLE + LONGJUT] XH
:.heads-to RIGHTWARD
}
### o b d p q g
create-glyph 'o' : glyph-construction {
set-width WIDTH
assign-unicode 'o'
include eMarks
include : create-stroke
:.start-from MIDDLE XO
:.set-width STROKE 0
:.heads-to LEFTWARD
:.arc-hv-to [SB + O] [XH - SMALLSMOOTHA]
:.line-to [SB + O] SMALLSMOOTHB
:.arc-vh-to MIDDLE O
:.heads-to RIGHTWARD
:.arc-hv-to [RIGHTSB - O] SMALLSMOOTHA
:.line-to [RIGHTSB - O] [XH - SMALLSMOOTHB]
:.arc-vh-to MIDDLE XO
:.heads-to LEFTWARD
}
create-glyph 'o.left' : glyph-construction {
set-width WIDTH
# right half
include : create-stroke
:.start-from MIDDLE XO
:.heads-to RIGHTWARD
:.set-width 0 STROKE
:.arc-hv-to [RIGHTSB - O] [XH - SMALLSMOOTHB]
:.line-to [RIGHTSB - O] SMALLSMOOTHA
:.arc-vh-to MIDDLE O
:.heads-to LEFTWARD
# left half
include : create-stroke
:.start-from MIDDLE [O + STROKE]
:.heads-to LEFTWARD
:.set-width STROKE 0
:.arc-hv-to [SB + STROKE] [SMALLSMOOTHB - STROKE * 0.05]
:.set-width HALFSTROKE 0
:.line-to [SB + STROKE] [XH - SMALLSMOOTHA + STROKE * 0.05]
:.set-width HALFSTROKE 0
:.arc-vh-to MIDDLE [XO - STROKE]
:.set-width STROKE 0
:.heads-to RIGHTWARD
}
create-glyph 'o.right' : glyph-construction {
set-width WIDTH
# left half
include : create-stroke
:.start-from MIDDLE XO
:.heads-to LEFTWARD
:.set-width STROKE 0
:.arc-hv-to [SB + O] [XH - SMALLSMOOTHA]
:.line-to [SB + O] SMALLSMOOTHB
:.arc-vh-to MIDDLE O
:.heads-to RIGHTWARD
# right half
include : create-stroke
:.start-from MIDDLE [O + STROKE]
:.heads-to RIGHTWARD
:.set-width 0 STROKE
:.arc-hv-to [RIGHTSB - STROKE] [SMALLSMOOTHA - STROKE * 0.05]
:.set-width 0 HALFSTROKE
:.line-to [RIGHTSB - STROKE] [XH - SMALLSMOOTHB + STROKE * 0.05]
:.set-width 0 HALFSTROKE
:.arc-vh-to MIDDLE [XO - STROKE]
:.set-width 0 STROKE
:.heads-to LEFTWARD
}
create-glyph 'p' : glyph-construction {
set-width WIDTH
assign-unicode 'p'
include eMarks
include glyphs.'o.left'
include : create-stroke
:.start-from SB XH
:.heads-to DOWNWARD
:.set-width STROKE 0
:.line-to SB DESCENDER
:.heads-to DOWNWARD
}
create-glyph 'b' : glyph-construction {
set-width WIDTH
assign-unicode 'b'
include bMarks
put-shapes glyphs.'o.left'.contours
include : create-stroke
:.start-from SB 0
:.heads-to UPWARD
:.set-width 0 STROKE
:.line-to SB CAP
:.heads-to UPWARD
}
create-glyph 'q' : glyph-construction {
set-width WIDTH
assign-unicode 'q'
include eMarks
put-shapes glyphs.'o.right'.contours
include : create-stroke
:.start-from RIGHTSB XH
:.heads-to DOWNWARD
:.set-width 0 STROKE
:.line-to RIGHTSB DESCENDER
:.heads-to DOWNWARD
}
create-glyph 'd' : glyph-construction {
set-width WIDTH
assign-unicode 'd'
include bMarks
put-shapes glyphs.'o.right'.contours
include : create-stroke
:.start-from RIGHTSB 0
:.heads-to UPWARD
:.set-width STROKE 0
:.line-to RIGHTSB CAP
:.heads-to UPWARD
:.to-outline
}
create-glyph 'g' : glyph-construction {
set-width WIDTH
assign-unicode 'g'
include pMarks
include : list {
Ring XO [XH * GBARPOS] SB [RIGHTSB - 0.3 * SB] SMALLSMOOTH
Ring [XO - STROKE] [[XH * GBARPOS] + STROKE] [SB + STROKE] [[RIGHTSB - 0.3 * SB] - STROKE] [SMALLSMOOTH - STROKE]
}
reverse-last
local gleftx [SB * 0.8 + O]
local grightx [RIGHTSB + SB * 0.1 - O]
local groundy [O - DESCENDER * 0.85]
include : create-stroke
:.start-from MIDDLE [XH * GBARPOS]
:.set-width 0 [STROKE * 0.75]
:.arc-hv-to [SB * 1.25 + STROKE] [mix groundy [XH * GBARPOS] 0.5]
:.set-width 0 STROKE
:.arc-vh-to [MIDDLE + DESCENDER * 0.15] groundy
:.line-to [MIDDLE - DESCENDER * 0.15] groundy
:.arc-hv-to grightx [mix [DESCENDER + O] groundy 0.53]
:.arc-vh-to [mix gleftx grightx 0.5] [DESCENDER + O]
:.arc-hv-to gleftx [mix [DESCENDER + O] groundy 0.53]
:.arc-vh-to [MIDDLE + DESCENDER * 0.15] groundy
start-from [RIGHTSB + 0.25 * SB] XH
line-to [RIGHTSB + 0.25 * SB] [XH - STROKE]
line-to MIDDLE [XH - STROKE - O]
line-to MIDDLE XH
}
### c e t
create-glyph 'c' : glyph-construction {
set-width WIDTH
assign-unicode 'c'
include eMarks
include : create-stroke
:.start-from [RIGHTSB - OXHOOK] [XH - HOOK]
:.set-width STROKE 0
:.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] XO MIDDLE XO
:.heads-to LEFTWARD
:.arc-hv-to [SB + O] [XH - SMALLSMOOTHA]
:.line-to [SB + O] SMALLSMOOTHB
:.arc-vh-to MIDDLE O
:.heads-to RIGHTWARD
:.curve-to [MIDDLE + [KAPPA_HOOK + TAILADJKAPPA * globalTransform.yx] * [MIDDLE - SB]] O [RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx] [HOOK - TAILADJY * globalTransform.yx]
}
create-glyph 'e.upright' : glyph-construction {
set-width WIDTH
local barbottom [XH * EBARPOS]
local hookx [RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx]
local hookmiddle [mix [SB + O] hookx 0.55]
include : create-stroke
:.start-from [RIGHTSB - O] barbottom
:.heads-to UPWARD
:.set-width STROKE 0
:.line-to [RIGHTSB - O] [XH - SMALLSMOOTHB]
:.arc-vh-to MIDDLE XO
:.heads-to LEFTWARD
:.arc-hv-to [SB + O] [XH - SMALLSMOOTHA]
:.line-to [SB + O] SMALLSMOOTHB
:.arc-vh-to hookmiddle O
:.heads-to RIGHTWARD
:.curve-to [mix hookmiddle hookx KAPPA_HOOK] O hookx [SHOOK - TAILADJY * globalTransform.yx]
include : create-stroke
:.start-from [SB + HALFSTROKE] barbottom
:.set-width STROKE 0
:.heads-to RIGHTWARD
:.line-to [RIGHTSB - HALFSTROKE] barbottom
:.heads-to RIGHTWARD
}
create-glyph 'e.italic' : glyph-construction {
set-width WIDTH
local barbottom [XH * [BARPOS - 0.04]]
include : create-stroke
:.start-from [SB + O + STROKE] barbottom
:.set-width STROKE 0
:.arc-hv-to [RIGHTSB - O] [XH - SMALLSMOOTHB * 0.95]
:.arc-vh-to MIDDLE XO
:.heads-to LEFTWARD
:.arc-hv-to [SB + O] [XH - SMALLSMOOTHA]
:.line-to [SB + O] SMALLSMOOTHB
:.arc-vh-to MIDDLE O
:.heads-to RIGHTWARD
:.curve-to [MIDDLE + [KAPPA_HOOK + TAILADJKAPPA * globalTransform.yx] * [MIDDLE - SB]] O [RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx] [HOOK - TAILADJY * globalTransform.yx]
}
create-glyph 'e' : glyph-construction {
set-width WIDTH
assign-unicode 'e'
include eMarks
if [para.italicangle > 0] {
then : include glyphs.'e.italic'
else : include glyphs.'e.upright'
}
}
create-glyph 't' : glyph-construction {
set-width WIDTH
assign-unicode 't'
include bMarks
local center [MIDDLE - TBALANCE - HALFSTROKE]
local hookx [center + [WIDTH - SB * 2] * 0.78 - OXHOOK + TAILADJX * globalTransform.yx]
local turn : mix center hookx [0.5 + globalTransform.yx * 0.5]
local smb : [turn - center] * 1.1
include : create-stroke
:.start-from center CAP
:.set-width STROKE 0
:.heads-to DOWNWARD
:.line-to center smb
:.arc-vh-to turn O
:.curve-to [turn + [KAPPA_HOOK + TAILADJKAPPA * globalTransform.yx + 0.1] * [hookx - turn]] O hookx [HOOK - TAILADJY * globalTransform.yx]
include : create-stroke
:.start-from [center + HALFSTROKE - LONGJUT + TBALANCE2] XH
:.heads-to RIGHTWARD
:.set-width 0 STROKE
:.line-to [center + HALFSTROKE + LONGJUT + TBALANCE2] XH
:.heads-to RIGHTWARD
}
### a u
create-glyph 'a.upright' : glyph-construction {
set-width WIDTH
local bartop [XH * BARPOS + STROKE]
local lowmiddle : mix SB [RIGHTSB - STROKE] [linreg 80 0.55 120 0.625 STROKE]
local barsmooth : mix SB RIGHTSB 0.6
include : create-stroke
:.start-from RIGHTSB 0
:.heads-to UPWARD
:.set-width STROKE 0
:.line-to RIGHTSB [XH - SMOOTHA]
:.arc-vh-to MIDDLE XO
:.heads-to LEFTWARD
:.curve-to [MIDDLE - KAPPA_HOOK * [MIDDLE - SB]] XO [SB + OXHOOK] [XH - AHOOK]
include : create-stroke
:.start-from lowmiddle O
:.set-width 0 STROKE
:.heads-to LEFTWARD
:.arc-hv-to [SB + O] [bartop * 0.45]
:.arc-vh-to barsmooth bartop
:.line-to RIGHTSB bartop
:.heads-to RIGHTWARD
include : create-stroke
:.start-from lowmiddle [O + STROKE]
:.set-width 0 STROKE
:.heads-to RIGHTWARD
:.arc-hv-to [RIGHTSB - STROKE] [SMALLSMOOTHA * 0.65]
:.heads-to UPWARD
:.set-width 0 [STROKE * 0.4]
}
create-glyph 'a.italic' : glyph-construction {
set-width WIDTH
include glyphs.'o.right'
include : create-stroke
:.start-from RIGHTSB 0
:.heads-to UPWARD
:.set-width STROKE 0
:.line-to RIGHTSB XH
:.heads-to UPWARD
}
create-glyph 'a' : glyph-construction {
set-width WIDTH
assign-unicode 'a'
include eMarks
if [para.italicangle > 0] {
then : include glyphs.'a.italic'
else : include glyphs.'a.upright'
}
}
create-glyph 'u' : glyph-construction {
set-width WIDTH
assign-unicode 'u'
include eMarks
include : create-stroke
:.start-from SB XH
:.heads-to DOWNWARD
:.set-width STROKE 0
:.line-to SB SMALLSMOOTHA
:.arc-vh-to MIDDLE O
:.heads-to RIGHTWARD
include : create-stroke
:.start-from MIDDLE [O + STROKE]
:.set-width 0 STROKE
:.heads-to RIGHTWARD
:.arc-hv-to [RIGHTSB - STROKE * ITALICCOR] SMALLSMOOTHA
:.heads-to UPWARD
:.set-width 0 [STROKE * 0.4]
include : create-stroke
:.start-from RIGHTSB 0
:.heads-to UPWARD
:.set-width STROKE 0
:.line-to RIGHTSB XH
:.heads-to UPWARD
}
### n h m
create-glyph 'n' : glyph-construction {
set-width WIDTH
assign-unicode 'n'
include eMarks
put-shapes : nBowl [SB + STROKE * ITALICCOR] MIDDLE RIGHTSB [STROKE * 0.4]
include : create-stroke
:.start-from SB 0
:.heads-to UPWARD
:.set-width 0 STROKE
:.line-to SB XH
:.heads-to UPWARD
}
create-glyph 'h' : glyph-construction {
set-width WIDTH
assign-unicode 'h'
include bMarks
put-shapes : nBowl [SB + STROKE * ITALICCOR] MIDDLE RIGHTSB [STROKE * 0.4]
include : create-stroke
:.start-from SB 0
:.heads-to UPWARD
:.set-width 0 STROKE
:.line-to SB CAP
:.heads-to UPWARD
}
create-glyph 'm' : glyph-construction {
set-width WIDTH
assign-unicode 'm'
include eMarks
local sw : Math.min STROKE [[WIDTH - SB * 2] * 0.26]
local m1 : [MIDDLE + SB + sw * 0.25] / 2
local m2 : m1 + [MIDDLE - sw / 2 - SB]
include : create-stroke
:.start-from [MIDDLE - sw / 2] 0
:.set-width 0 sw :.heads-to UPWARD
:.line-to [MIDDLE - sw / 2] [XH - SMALLSMOOTHA]
:.arc-vh-to m1 [XO - STROKE]
:.set-width 0 STROKE
:.heads-to LEFTWARD
:.arc-hv-to [SB + sw * 0.75] [XH - SMALLSMOOTHA]
:.heads-to DOWNWARD
:.set-width 0 [sw * 0.4]
include : create-stroke
:.start-from [RIGHTSB - sw - O] 0
:.set-width 0 sw :.heads-to UPWARD
:.line-to [RIGHTSB - sw - O] [XH - SMALLSMOOTHA]
:.arc-vh-to m2 [XO - STROKE]
:.set-width 0 STROKE
:.heads-to LEFTWARD
:.arc-hv-to [MIDDLE + sw * 0.25] [XH - SMALLSMOOTHA]
:.heads-to DOWNWARD
:.set-width 0 [sw * 0.4]
include : create-stroke
:.start-from [SB + O] 0
:.heads-to UPWARD
:.set-width 0 sw
:.line-to [SB + O] XH
:.heads-to UPWARD
}
### i j l
create-glyph 'dotlessi.straight' : glyph-construction {
include eMarks
include : create-stroke
:.start-from MIDDLE 0
:.heads-to UPWARD
:.set-width HALFSTROKE HALFSTROKE
:.line-to MIDDLE XH
:.heads-to UPWARD
}
create-glyph 'dotlessi.hooky' : glyph-construction {
include glyphs.'dotlessi.straight' true
put-shapes : leftwardTopSerif MIDDLE XH LONGJUT
}
create-glyph 'dotlessi.zshaped' : glyph-construction {
include glyphs.'dotlessi.hooky' true
put-shapes : rightwardBottomSerif MIDDLE 0 LONGJUT
}
create-glyph 'dotlessi.serifed' : glyph-construction {
include eMarks
local balance ILBALANCE
include : create-stroke
:.start-from [MIDDLE + balance] 0
:.heads-to UPWARD
:.set-width HALFSTROKE HALFSTROKE
:.line-to [MIDDLE + balance] XH
:.heads-to UPWARD
include : leftwardTopSerif [MIDDLE + balance] XH [LONGJUT - balance]
include : rightwardBottomSerif MIDDLE 0 LONGJUT
include : leftwardBottomSerif MIDDLE 0 LONGJUT
}
select-variant 'dotlessi' 0x131 'serifed'
create-glyph 'i' : glyph-construction {
set-width WIDTH
assign-unicode 'i'
include glyphs.dotlessi BASE
include glyphs.dotAbove
}
create-glyph 'dotlessj.straight' : glyph-construction {
set-anchor 'above' BASE [MIDDLE + JBALANCE] XH
include : create-stroke
:.start-from [MIDDLE + JBALANCE] XH
:.heads-to DOWNWARD
:.set-width HALFSTROKE HALFSTROKE
:.line-to [MIDDLE + JBALANCE] 0
:.arc-vh-to [MIDDLE + DESCENDER] [DESCENDER + HALFSTROKE]
}
create-glyph 'dotlessj.serifed' : glyph-construction {
include glyphs.'dotlessj.straight' BASE
put-shapes : leftwardTopSerif [MIDDLE + JBALANCE] XH LONGJUT
}
select-variant 'dotlessj' 0x237 'serifed'
create-glyph 'j' : glyph-construction {
set-width WIDTH
assign-unicode 'j'
include glyphs.dotlessj BASE
include glyphs.dotAbove
}
create-glyph 'l.straight' : glyph-construction {
include bMarks
include : create-stroke
:.start-from MIDDLE 0
:.heads-to UPWARD
:.set-width HALFSTROKE HALFSTROKE
:.line-to MIDDLE CAP
:.heads-to UPWARD
}
create-glyph 'l.hooky' : glyph-construction {
include bMarks
include glyphs.'l.straight'
put-shapes : leftwardTopSerif MIDDLE CAP LONGJUT
}
create-glyph 'l.zshaped' : glyph-construction {
include bMarks
include glyphs.'l.hooky'
put-shapes : rightwardBottomSerif MIDDLE 0 LONGJUT
}
create-glyph 'l.serifed' : glyph-construction {
include bMarks
local balance ILBALANCE
include : create-stroke
:.start-from [MIDDLE + balance] 0
:.heads-to UPWARD
:.set-width HALFSTROKE HALFSTROKE
:.line-to [MIDDLE + balance] CAP
:.heads-to UPWARD
put-shapes : leftwardTopSerif [MIDDLE + balance] CAP [LONGJUT - balance]
put-shapes : rightwardBottomSerif MIDDLE 0 LONGJUT
put-shapes : leftwardBottomSerif MIDDLE 0 LONGJUT
}
select-variant 'l' 'l' 'serifed'
### x v w y z k
create-glyph 'x' : glyph-construction {
set-width WIDTH
assign-unicode 'x'
include eMarks
local TURN [XH * 0.1]
include : xStrand SB 0 RIGHTSB XH 0.05 0.4 0.14
include : xStrand SB XH RIGHTSB 0 0.05 0.4 0.14
}
create-glyph 'v' : glyph-construction {
set-width WIDTH
assign-unicode 'v'
include eMarks
local TURN [XH * 0.9]
include : create-stroke
:.start-from SB XH
:.heads-to DOWNWARD
:.set-width STROKE 0
:.line-to SB TURN
:.heads-to DOWNWARD
:.curve-to SB [[1 - 0.27] * TURN] [MIDDLE - STROKE / 2] 0
:.set-width [STROKE * 0.8] 0
include : create-stroke
:.start-from RIGHTSB XH
:.heads-to DOWNWARD
:.set-width 0 STROKE
:.line-to RIGHTSB TURN
:.heads-to DOWNWARD
:.curve-to RIGHTSB [[1 - 0.27] * TURN] [MIDDLE + STROKE / 2] 0
:.set-width 0 [STROKE * 0.8]
#bottom cap
start-from [MIDDLE + STROKE / 2] 0
line-to [MIDDLE - STROKE / 2] 0
line-to MIDDLE STROKE
}
create-glyph 'w' : glyph-construction {
set-width WIDTH
assign-unicode 'w'
include eMarks
local TURN [XH * 0.75]
local turn2 [XH * 0.59]
local wheight [XH * 0.6]
local bottomStroke : Math.min [STROKE * 0.8] [[WIDTH - SB * 2] * 0.175]
local m1 : WIDTH * 0.325
local m2 : WIDTH * 0.675
include : create-stroke
:.start-from SB XH
:.heads-to DOWNWARD
:.set-width STROKE 0
:.line-to SB TURN
:.heads-to DOWNWARD
:.curve-to SB [[1 - 0.27] * TURN] [m1 - bottomStroke / 2] 0
:.set-width bottomStroke 0
include : create-stroke
:.start-from RIGHTSB XH
:.heads-to DOWNWARD
:.set-width 0 STROKE
:.line-to RIGHTSB TURN
:.heads-to DOWNWARD
:.curve-to RIGHTSB [[1 - 0.27] * TURN] [m2 + bottomStroke / 2] 0
:.set-width 0 bottomStroke
include : create-stroke
:.start-from [MIDDLE + bottomStroke / 2] wheight
:.heads-to DOWNWARD
:.set-width 0 bottomStroke
:.line-to [MIDDLE + bottomStroke / 2] turn2
:.heads-to DOWNWARD
:.curve-to [MIDDLE + bottomStroke / 2] [[1 - 0.1] * turn2] [m1 + bottomStroke / 2] 0
:.set-width 0 bottomStroke
include : create-stroke
:.start-from [MIDDLE - bottomStroke / 2] wheight
:.heads-to DOWNWARD
:.set-width bottomStroke 0
:.line-to [MIDDLE - bottomStroke / 2] turn2
:.heads-to DOWNWARD
:.curve-to [MIDDLE - bottomStroke / 2] [[1 - 0.1] * turn2] [m2 - bottomStroke / 2] 0
:.set-width bottomStroke 0
#bottom cap
start-from [m1 + bottomStroke / 2] 0
line-to [m1 - bottomStroke / 2] 0
line-to m1 bottomStroke
start-from [m2 + bottomStroke / 2] 0
line-to [m2 - bottomStroke / 2] 0
line-to m2 bottomStroke
}
create-glyph 'y' : glyph-construction {
set-width WIDTH
assign-unicode 'y'
include pMarks
local xbottom : mix SB RIGHTSB 0.28
local turnp : XH / [XH - DESCENDER]
local xb : mix SB RIGHTSB 0.51
local yb : mix 0 XH [0.1 * turnp]
include : xStrand xbottom DESCENDER RIGHTSB XH 0.1 0.6 0.14
include : halfXStrand SB XH xb yb [0.1 * turnp] 0.4 [0.14 * turnp]
}
create-glyph 'z' : glyph-construction {
set-width WIDTH
assign-unicode 'z'
include eMarks
local cor 1.2
include : create-stroke :.start-from SB XH :.heads-to RIGHTWARD :.set-width 0 STROKE
:.line-to RIGHTSB XH :.heads-to RIGHTWARD :.to-outline
include : create-stroke :.start-from SB 0 :.heads-to RIGHTWARD :.set-width STROKE 0
:.line-to RIGHTSB 0 :.heads-to RIGHTWARD :.to-outline
start-from SB STROKE
line-to [SB + STROKE * cor] STROKE
line-to RIGHTSB [XH - STROKE]
line-to [RIGHTSB - STROKE * cor] [XH - STROKE]
reverse-last
}
create-glyph 'k' : glyph-construction {
set-width WIDTH
assign-unicode 'k'
include bMarks
local TURN [XH * 0.99]
local rturn [XH * 0.1]
local right [RIGHTSB - O]
local attach [XH * 0.4]
local attach2 [MIDDLE - WIDTH * 0.1]
local fine : Math.min STROKE [[WIDTH - SB * 2] * 0.25]
include : create-stroke
:.start-from SB 0
:.set-width 0 STROKE
:.heads-to UPWARD
:.line-to SB CAP
:.heads-to UPWARD
include : create-stroke
:.start-from RIGHTSB XH
:.heads-to DOWNWARD
:.set-width 0 STROKE
:.line-to RIGHTSB TURN
:.heads-to DOWNWARD
:.curve-to RIGHTSB [[1 - 0.18] * TURN] [SB + STROKE] attach
:.set-width 0 fine
include : create-stroke
:.start-from [right - HALFSTROKE] 0
:.heads-to UPWARD
:.set-width HALFSTROKE HALFSTROKE
:.curve-to [right - HALFSTROKE] [rturn + 0.05 * [XH - rturn]] attach2 [XH * 0.5 + HALFSTROKE]
:.set-width [fine / 2] [fine / 2]
}
### s
create-glyph 's' : glyph-construction {
set-width WIDTH
assign-unicode 's'
include eMarks
include : sHookUpper XH [SMOOTHA * 0.87] SHOOK
include : sHookLower 0 [SMOOTHA * 0.87] SHOOK
include : sStrand [XH - [SMOOTHA * 0.87]] [SMOOTHA * 0.87] 0.2 0.45
}
### r
create-glyph 'r' : glyph-construction {
set-width WIDTH
assign-unicode 'r'
include eMarks
local slope 0.015
local expand 0.175
local coexpand [[1 - expand] / 2]
local rhookx : RIGHTSB + JBALANCE / 2
local rmiddle : mix [SB + RBALANCE + STROKE] [rhookx - HALFSTROKE] 0.5
include : create-stroke
:.start-from rhookx [XH - RHOOK]
:.set-width STROKE 0
:.curve-to [mix rmiddle rhookx KAPPA_AHOOK] XO rmiddle XO
:.heads-to LEFTWARD
include : create-stroke
:.start-from rmiddle [XO - STROKE]
:.set-width 0 STROKE
:.heads-to LEFTWARD
:.arc-hv-to [SB + STROKE * ITALICCOR + RBALANCE] [XH - SMALLSMOOTHA]
:.heads-to DOWNWARD
:.set-width 0 [STROKE * 0.3]
include : create-stroke
:.start-from [SB + RBALANCE] 0
:.heads-to UPWARD
:.set-width 0 STROKE
:.line-to [SB + RBALANCE] XH
}
### f
create-glyph 'f.upright' : glyph-construction {
set-width WIDTH
include bMarks
include : create-stroke
:.start-from MIDDLE 0
:.heads-to UPWARD
:.set-width HALFSTROKE HALFSTROKE
:.line-to MIDDLE [CAP - SHOOK * 1.4]
:.arc-vh-to [MIDDLE + SHOOK * 2] [CAP - HALFSTROKE - O * 6]
:.heads-to RIGHTWARD
include glyphs.fbar
}
create-glyph 'f.italic' : glyph-construction {
set-width WIDTH
include ifMarks
include : create-stroke
:.start-from [MIDDLE - SHOOK * 2] [HALFSTROKE + O * 6 - SHOOK]
:.heads-to RIGHTWARD
:.set-width HALFSTROKE HALFSTROKE
:.arc-hv-to MIDDLE 0
:.line-to MIDDLE [CAP - SHOOK]
:.arc-vh-to [MIDDLE + SHOOK * 2] [CAP - HALFSTROKE - O * 6]
:.heads-to RIGHTWARD
include glyphs.fbar
}
create-glyph 'f' : glyph-construction {
set-width WIDTH
assign-unicode 'f'
if [para.italicangle > 0] {
then : include glyphs.'f.italic' true
else : include glyphs.'f.upright' true
}
}