The /n, /s, /u, /h and /two are remade (as well as other related glyphs.)

This commit is contained in:
be5invis 2015-10-27 22:25:45 +08:00
parent 1a0bcbc288
commit e6f6a6fc61
11 changed files with 42 additions and 40 deletions

View File

@ -166,6 +166,8 @@ define [buildFont para recursive] : begin
define OVERLAYSTROKE : adviceBlackness 4
define OPERATORSTROKE : adviceBlackness 3.2
define [adviceSSmooth y sign] : ((y - STROKE * 2) * 0.2 + STROKE) + sign * globalTransform.yx * para.smoothadjust
# Anchor parameters
define BASE 'base'
define MARK 'mark'

View File

@ -157,23 +157,24 @@ define [xStrand _leftx lefty _rightx righty turn straight tension] : begin
return : halfXStrand _leftx lefty middlex middley turn straight tension
:.concat : halfXStrand _rightx righty middlex middley turn straight tension
define [nShoulderKnots left _middle right fine _top _bottom _sma _smb _wide] : begin
define [nShoulderKnots left right fine _top _bottom _sma _smb _wide] : begin
local top : fallback _top XH
local bottom : fallback _bottom 0
local sma : fallback _sma SMALLSMOOTHA
local smb : fallback _smb SMALLSMOOTHB
local stroke : fallback _wide STROKE
local middle : fallback _middle [mix (left - stroke * CORRECTION_HX) right 0.5]
local slope : 0.25 + globalTransform.yx
local middle : [mix (left - stroke * CORRECTION_HX) right 0.5] + (slope - CORRECTION_OMIDX) * STROKE
return : list
flat left (top - sma - 2) [widths fine 0]
curl left (top - sma)
arcvh
g4 middle (top - O) [widths.heading 0 stroke RIGHTWARD]
g4 middle (top - O) [widths.heading 0 stroke {.y (1) .x (slope)}]
archv
flat right (top - smb)
curl right bottom [heading DOWNWARD]
define [nShoulder left middle right fine _top _bottom _sma _smb _wide] : let [a arguments] : glyph-construction
define [nShoulder left right fine _top _bottom _sma _smb _wide] : let [a arguments] : glyph-construction
include : spiro : nShoulderKnots.apply null a

View File

@ -182,13 +182,14 @@ create-glyph 'cyrghe.upright' : glyph-construction
create-glyph 'cyrghe.italic' : glyph-construction
include eMarks
local smooth : adviceSSmooth XH 1
include : spiro
widths.rhs
g4 SB (XH - SHOOK)
hookstart XO SBALANCE
g4 RIGHTSB (XH - SMOOTHB * 0.8)
g4 RIGHTSB (XH - smooth)
alsothru 0.5 0.5 [widths (ESS / 2) (ESS / 2)]
g4 SB (SMOOTHB * 0.8) [widths STROKE 0]
g4 SB (smooth) [widths STROKE 0]
hookend O SBALANCE
g4 RIGHTSB SHOOK

View File

@ -66,7 +66,7 @@ create-glyph 'cyrTshe' : glyph-construction
local left : mix SB RIGHTSB 0.15
include : nShoulder (left + STROKE * CORRECTION_HX) [mix left RIGHTSB 0.5] RIGHTSB (STROKE * 0.4)
include : nShoulder (left + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.4)
include : VBarLeft left 0 CAP
include : HBarTop SB [mix left RIGHTSB 0.5] CAP
@ -78,7 +78,7 @@ create-glyph 'cyrDje' : glyph-construction
local left : mix SB RIGHTSB 0.15
include : nShoulder (left + STROKE * CORRECTION_HX) [mix left RIGHTSB 0.5] RIGHTSB (STROKE * 0.4) XH (HOOK + HALFSTROKE + O) SMOOTHA SMOOTHB
include : nShoulder (left + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.4) XH (HOOK + HALFSTROKE + O) SMOOTHA SMOOTHB
include : VBarLeft left 0 CAP
include : HBarTop SB [mix left RIGHTSB 0.5] CAP
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX) (HOOK + HALFSTROKE + O) [Math.max ((left - RIGHTSB) / 2 + HALFSTROKE) (-HOOK * 1.2)] HOOK

View File

@ -197,7 +197,7 @@ create-glyph 'eta' : glyph-construction
include pMarks
set-anchor 'lf' BASE (SB + HALFSTROKE) 0
include : nShoulder (SB + STROKE * CORRECTION_HX) MIDDLE RIGHTSB (STROKE * 0.3) XH DESCENDER SMALLSMOOTHA SMALLSMOOTHB
include : nShoulder (SB + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.3) XH DESCENDER SMALLSMOOTHA SMALLSMOOTHB
include : VBarLeft SB 0 XH
create-glyph 'kappa' : glyph-construction

View File

@ -578,12 +578,13 @@ create-glyph 'S' : glyph-construction
set-width WIDTH
assign-unicode 'S'
include capitalMarks
define smooth : adviceSSmooth CAP (-1)
include : spiro
widths.lhs
g4 RIGHTSB (CAP - HOOK)
hookstart CAPO
g4 SB (CAP - SMOOTHA)
g4 SB (CAP - smooth)
alsothru 0.5 0.5 [widths (ESS / 2) (ESS / 2)]
g4 RIGHTSB SMOOTHA [widths 0 STROKE]
g4 RIGHTSB smooth [widths 0 STROKE]
hookend O
g4 SB HOOK

View File

@ -254,7 +254,7 @@ create-glyph 'n' : glyph-construction
assign-unicode 'n'
include eMarks
include : nShoulder (SB + STROKE * CORRECTION_HX) MIDDLE RIGHTSB (STROKE * 0.4)
include : nShoulder (SB + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.4)
include : VBarLeft SB 0 XH
create-glyph 'u' : glyph-construction
@ -270,7 +270,7 @@ create-glyph 'h' : glyph-construction
assign-unicode 'h'
include bMarks
include : nShoulder (SB + STROKE * CORRECTION_HX) MIDDLE RIGHTSB (STROKE * 0.4)
include : nShoulder (SB + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.4)
include : create-stroke
:.start-from SB 0
:.heads-to UPWARD
@ -606,14 +606,14 @@ create-glyph 's' : glyph-construction
set-width WIDTH
assign-unicode 's'
include eMarks
define smooth : adviceSSmooth XH (-1)
include : spiro
widths.lhs
g4 RIGHTSB (XH - SHOOK)
hookstart XO SBALANCE
g4 SB (XH - SMOOTHA * 0.8)
g4 SB (XH - smooth)
alsothru 0.5 0.5 [widths (ESS / 2) (ESS / 2)]
g4 RIGHTSB (SMOOTHA * 0.8) [widths 0 STROKE]
g4 RIGHTSB (smooth) [widths 0 STROKE]
hookend O SBALANCE
g4 SB SHOOK

View File

@ -390,7 +390,7 @@ create-glyph 'Eng' : glyph-construction
assign-unicode 0x14A
include capitalMarks
include : nShoulder (SB + STROKE) MIDDLE RIGHTSB (STROKE * 0.3) CAP (HOOK + HALFSTROKE + O) SMOOTHA SMOOTHB
include : nShoulder (SB + STROKE) RIGHTSB (STROKE * 0.3) CAP (HOOK + HALFSTROKE + O) SMOOTHA SMOOTHB
include : VerticalHook (RIGHTSB - HALFSTROKE * CORRECTION_HX) (HOOK + HALFSTROKE + O) [Math.max ((SB - RIGHTSB) / 2 + HALFSTROKE) (-HOOKX)] HOOK
include : VBar (SB + HALFSTROKE * CORRECTION_HX) 0 CAP
@ -440,7 +440,9 @@ create-glyph 'hwair' : glyph-construction
assign-unicode 0x195
include : VBarLeft (SB + O) 0 CAP MVERTSTROKE
include : spiro
nShoulderKnots (SB + O + MVERTSTROKE * CORRECTION_HX) nothing (MIDDLE + MVERTSTROKE * 0.5 * CORRECTION_HX) (MVERTSTROKE * 0.4) nothing (SMALLSMOOTHB * 0.6) (SMALLSMOOTHA * 0.6) (SMALLSMOOTHB * 0.6) MVERTSTROKE
nShoulderKnots (SB + O + MVERTSTROKE * CORRECTION_HX) (MIDDLE + MVERTSTROKE * 0.5 * CORRECTION_HX) (MVERTSTROKE * 0.4) nothing (XH * 0.51) (SMALLSMOOTHA * 0.6) (SMALLSMOOTHB * 0.6) MVERTSTROKE
flat (MIDDLE + MVERTSTROKE * 0.5 * CORRECTION_HX) (XH * 0.5) [heading DOWNWARD]
curl (MIDDLE + MVERTSTROKE * 0.5 * CORRECTION_HX) (SMALLSMOOTHB * 0.6)
arcvh
g4 [mix (MIDDLE - MVERTSTROKE * 0.5 * CORRECTION_HX) (RIGHTSB - O) 0.5] O [widths.heading MVERTSTROKE 0 RIGHTWARD]
archv
@ -518,13 +520,14 @@ create-glyph 'iogonek.dotless' : glyph-construction
create-glyph 'revS' : glyph-construction
assign-unicode 0x1A7
include capitalMarks
local smooth : adviceSSmooth CAP 1
include : spiro
widths.rhs
g4 SB (CAP - HOOK)
hookstart CAPO
g4 RIGHTSB (CAP - SMOOTHB)
g4 RIGHTSB (CAP - smooth)
alsothru 0.5 0.5 [widths (ESS / 2) (ESS / 2)]
g4 SB SMOOTHB [widths STROKE 0]
g4 SB smooth [widths STROKE 0]
hookend O
g4 RIGHTSB HOOK
@ -727,7 +730,7 @@ create-glyph 'latinEta' : glyph-construction
include ifMarks
set-anchor 'lf' BASE (SB + HALFSTROKE) 0
include : nShoulder (SB + STROKE) MIDDLE RIGHTSB (STROKE * 0.3) CAP DESCENDER SMALLSMOOTHA SMALLSMOOTHB
include : nShoulder (SB + STROKE) RIGHTSB (STROKE * 0.3) CAP DESCENDER SMALLSMOOTHA SMALLSMOOTHB
include : VBar (SB + HALFSTROKE * CORRECTION_HX) 0 CAP
#
@ -792,7 +795,7 @@ create-glyph 'glottalstop' : glyph-construction
g4 SB (CAP - HOOK)
hookstart CAPO
g4 RIGHTSB (CAP - SMOOTHB)
alsothru 0.5 0.45 [widths HALFSTROKE HALFSTROKE]
alsothru 0.5 0.45 [widths (ESS / 2) (ESS / 2)]
flat (MIDDLE - HALFSTROKE * CORRECTION_HX) (XH * 0.3) [widths STROKE 0]
curl (MIDDLE - HALFSTROKE * CORRECTION_HX) 0 [heading DOWNWARD]
@ -804,7 +807,7 @@ create-glyph 'revglottalstop' : glyph-construction
g4 RIGHTSB (CAP - HOOK)
hookstart CAPO
g4 SB (CAP - SMOOTHB)
alsothru 0.5 0.45 [widths HALFSTROKE HALFSTROKE]
alsothru 0.5 0.45 [widths (ESS / 2) (ESS / 2)]
flat (MIDDLE + HALFSTROKE * CORRECTION_HX) (XH * 0.3) [widths 0 STROKE]
curl (MIDDLE + HALFSTROKE * CORRECTION_HX) 0 [heading DOWNWARD]
@ -816,7 +819,7 @@ create-glyph 'smallglottalstop' : glyph-construction
g4 SB (XH - HOOK)
hookstart XO
g4 RIGHTSB (XH - SMOOTHB)
alsothru 0.5 0.45 [widths HALFSTROKE HALFSTROKE]
alsothru 0.5 0.45 [widths (ESS / 2) (ESS / 2)]
flat (MIDDLE - HALFSTROKE * CORRECTION_HX) (XH * 0.15) [widths STROKE 0]
curl (MIDDLE - HALFSTROKE * CORRECTION_HX) 0 [heading DOWNWARD]
@ -828,7 +831,7 @@ create-glyph 'invglottalstopbar' : glyph-construction
g4 RIGHTSB (XH - HOOK)
hookstart XO
g4 SB (XH - SMOOTHB)
alsothru 0.5 0.45 [widths HALFSTROKE HALFSTROKE]
alsothru 0.5 0.45 [widths (ESS / 2) (ESS / 2)]
flat (MIDDLE + HALFSTROKE * CORRECTION_HX) (XH * 0.15) [widths 0 STROKE]
curl (MIDDLE + HALFSTROKE * CORRECTION_HX) 0 [heading DOWNWARD]
include : HOverlayBar (MIDDLE - LONGJUT * 0.6) (MIDDLE + LONGJUT * 0.6) (XH * 0.25)

View File

@ -224,7 +224,7 @@ define [HooktopLeftBar stroke bottom] : glyph-construction
create-glyph 'hhooktop' : glyph-construction
assign-unicode 0x266
include bMarks
include : nShoulder (SB + STROKE * CORRECTION_HX) MIDDLE RIGHTSB (STROKE * 0.4)
include : nShoulder (SB + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.4)
include : HooktopLeftBar
create-glyph 'bhooktop' : glyph-construction
@ -479,7 +479,7 @@ create-glyph 'hltail' : glyph-construction
create-glyph 'hookturnh' : glyph-construction
assign-unicode 0x2AE
include : nShoulder (SB + STROKE * CORRECTION_HX) [mix SB RIGHTSB 0.5] RIGHTSB (STROKE * 0.4) XH (HOOK + HALFSTROKE + 1) SMOOTHA SMOOTHB
include : nShoulder (SB + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.4) XH (HOOK + HALFSTROKE + 1) SMOOTHA SMOOTHB
include : VBarLeft SB 0 CAP
include : create-glyph : glyph-construction
include glyphs.rtailBR
@ -572,7 +572,7 @@ create-glyph 'qrtail' : glyph-construction
create-glyph 'hookturnhrtail' : glyph-construction
assign-unicode 0x2AF
include : nShoulder (SB + STROKE * CORRECTION_HX) [mix SB RIGHTSB 0.5] RIGHTSB (STROKE * 0.4) XH (HOOK + HALFSTROKE + 1) SMOOTHA SMOOTHB
include : nShoulder (SB + STROKE * CORRECTION_HX) RIGHTSB (STROKE * 0.4) XH (HOOK + HALFSTROKE + 1) SMOOTHA SMOOTHB
include : VBarLeft SB 0 (XH - 1)
include : create-glyph : glyph-construction
include glyphs.rtailBR
@ -723,7 +723,7 @@ create-glyph 'ncurlytail' : glyph-construction
include eMarks
include : VBarLeft SB 0 XH wide
include : spiro
nShoulderKnots (SB + wide * CORRECTION_HX) [mix SB m1 0.5] m1 (STROKE * 0.4) nothing (fine * 2) nothing nothing wide
nShoulderKnots (SB + wide * CORRECTION_HX) m1 (STROKE * 0.4) nothing (fine * 2) nothing nothing wide
CurlyTail fine rinner m1 0 (m1 + rinner * 2 + fine) x2 y2
create-glyph 'dcurlytail' : glyph-construction

View File

@ -47,20 +47,14 @@ create-glyph 'two' : glyph-construction
local smb : SMOOTHB * 1
include : spiro
widths.rhs
g4 (SB + OXHOOK) (CAP - HOOK)
g4 ([mix RIGHTSB SB SBALANCE] - CORRECTION_OMIDS) CAPO
archv 4
g4 SB (CAP - HOOK)
hookstart (CAP - O)
g4 RIGHTSB (CAP - smb)
alsothru 0.5 0.45 [widths HALFSTROKE HALFSTROKE]
alsothru 0.5 0.45 [widths (ESS / 2) (ESS / 2)]
flat SB 1 [widths.heading STROKE 0 DOWNWARD]
curl SB 0 [heading DOWNWARD]
include : create-stroke
:.start-from (SB + HALFSTROKE) 0
:.set-width STROKE 0
:.heads-to RIGHTWARD
:.line-to RIGHTSB 0
:.heads-to RIGHTWARD
include : HBarBottom (SB + HALFSTROKE) RIGHTSB 0
create-glyph 'three' : glyph-construction

View File

@ -37,7 +37,7 @@ hookx = 170
smooth = 195
smallsmooth = 220
smoothadjust = 180
smoothadjust = 150
kappa = 0.518
ckappa = 0.618