Moved glyph definition into separated files
This commit is contained in:
parent
aabb255d9a
commit
a7182d4057
2 changed files with 1370 additions and 0 deletions
688
glyphs/latin-capital.patel
Normal file
688
glyphs/latin-capital.patel
Normal file
|
@ -0,0 +1,688 @@
|
|||
###### UPPER CASE
|
||||
|
||||
### A V X Y
|
||||
create-glyph 'A' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'A'
|
||||
include capitalMarks
|
||||
|
||||
local TURN [XH * 0.1]
|
||||
|
||||
local leftbar : create-stroke
|
||||
leftbar.start-from SB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width 0 STROKE
|
||||
:.line-to SB TURN
|
||||
:.heads-to UPWARD
|
||||
:.curve-to SB [TURN + 0.27 * [CAP - TURN]] [MIDDLE - STROKE / 2] CAP
|
||||
:.set-width 0 [STROKE * 0.8]
|
||||
|
||||
local rightbar : create-stroke
|
||||
rightbar.start-from RIGHTSB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width STROKE 0
|
||||
:.line-to RIGHTSB TURN
|
||||
:.heads-to UPWARD
|
||||
:.curve-to RIGHTSB [TURN + 0.27 * [CAP - TURN]] [MIDDLE + STROKE / 2] CAP
|
||||
:.set-width [STROKE * 0.8] 0
|
||||
|
||||
local hbar : create-stroke
|
||||
:.start-from [SB + STROKE] [XH / 2]
|
||||
:.heads-to RIGHTWARD
|
||||
:.set-width 0 STROKE
|
||||
:.line-to [RIGHTSB - STROKE] [XH / 2]
|
||||
:.heads-to RIGHTWARD
|
||||
|
||||
put-shapes : leftbar.form-stroke
|
||||
put-shapes : hbar.form-stroke
|
||||
put-shapes : rightbar.form-stroke
|
||||
|
||||
#top cap
|
||||
start-from [MIDDLE - STROKE / 2] CAP
|
||||
line-to [MIDDLE + STROKE / 2] CAP
|
||||
line-to MIDDLE [CAP - STROKE]
|
||||
}
|
||||
create-glyph 'V' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'V'
|
||||
include capitalMarks
|
||||
|
||||
local TURN [CAP * 0.9]
|
||||
|
||||
local leftbar : create-stroke
|
||||
leftbar.start-from SB CAP
|
||||
:.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
|
||||
|
||||
local rightbar : create-stroke
|
||||
rightbar.start-from RIGHTSB CAP
|
||||
:.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]
|
||||
|
||||
put-shapes : leftbar.form-stroke
|
||||
put-shapes : rightbar.form-stroke
|
||||
|
||||
#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 capitalMarks
|
||||
|
||||
local TURN [CAP * 0.75]
|
||||
local turn2 [CAP * 0.59]
|
||||
local wheight [CAP * 0.6]
|
||||
local bottomStroke : Math.min [STROKE * 0.8] [[WIDTH - SB * 2] * 0.175]
|
||||
local m1 : WIDTH * 0.3
|
||||
local m2 : WIDTH * 0.7
|
||||
|
||||
put-shapes: create-stroke
|
||||
:.start-from SB CAP
|
||||
:.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
|
||||
:.form-stroke
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB CAP
|
||||
:.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
|
||||
:.form-stroke
|
||||
|
||||
put-shapes: 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
|
||||
:.form-stroke
|
||||
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
|
||||
#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 'X' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'X'
|
||||
include capitalMarks
|
||||
|
||||
local TURN [XH * 0.05]
|
||||
local straight 0.6
|
||||
local strench 0.125
|
||||
|
||||
local barone : create-stroke
|
||||
:.start-from [SB + HALFSTROKE] 0
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.heads-to UPWARD
|
||||
:.line-to [SB + HALFSTROKE] TURN
|
||||
:.curve-to [SB + HALFSTROKE] [TURN + strench * [CAP - TURN]] [MIDDLE + straight * [SB + HALFSTROKE - MIDDLE]] [CAPMIDDLE + straight * [TURN + strench * [CAP - TURN] - CAPMIDDLE]]
|
||||
:.line-to [MIDDLE + straight * [RIGHTSB - HALFSTROKE - MIDDLE]] [CAPMIDDLE + straight * [CAP - TURN - strench * [CAP - TURN] - CAPMIDDLE]]
|
||||
:.curve-to [RIGHTSB - HALFSTROKE] [CAP - TURN - strench * [CAP - TURN]] [RIGHTSB - HALFSTROKE] [CAP - TURN]
|
||||
:.line-to [RIGHTSB - HALFSTROKE] CAP
|
||||
:.heads-to UPWARD
|
||||
|
||||
local bartwo : create-stroke
|
||||
:.start-from [RIGHTSB - HALFSTROKE] 0
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.heads-to UPWARD
|
||||
:.line-to [RIGHTSB - HALFSTROKE] TURN
|
||||
:.curve-to [RIGHTSB - HALFSTROKE] [TURN + strench * [CAP - TURN]] [MIDDLE + straight * [RIGHTSB - HALFSTROKE - MIDDLE]] [CAPMIDDLE + straight * [TURN + strench * [CAP - TURN] - CAPMIDDLE]]
|
||||
:.line-to [MIDDLE + straight * [SB + HALFSTROKE - MIDDLE]] [CAPMIDDLE + straight * [CAP - TURN - strench * [CAP - TURN] - CAPMIDDLE]]
|
||||
:.curve-to [SB + HALFSTROKE] [CAP - TURN - strench * [CAP - TURN]] [SB + HALFSTROKE] [CAP - TURN]
|
||||
:.line-to [SB + HALFSTROKE] CAP
|
||||
:.heads-to UPWARD
|
||||
|
||||
put-shapes : barone.form-stroke
|
||||
put-shapes : bartwo.form-stroke
|
||||
}
|
||||
create-glyph 'Y' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'Y'
|
||||
include capitalMarks
|
||||
|
||||
local TURN [XH * 0.05]
|
||||
local straight 0.6
|
||||
local strench 0.15
|
||||
local cross [CAP * 0.4]
|
||||
|
||||
local barone : create-stroke
|
||||
:.start-from MIDDLE cross
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to [MIDDLE + straight * [RIGHTSB - HALFSTROKE - MIDDLE]] [cross + straight * [CAP - TURN - strench * [CAP - TURN] - cross]]
|
||||
:.curve-to [RIGHTSB - HALFSTROKE] [CAP - TURN - strench * [CAP - TURN]] [RIGHTSB - HALFSTROKE] [CAP - TURN]
|
||||
:.line-to [RIGHTSB - HALFSTROKE] CAP
|
||||
:.heads-to UPWARD
|
||||
|
||||
local bartwo : create-stroke
|
||||
:.start-from MIDDLE cross
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to [MIDDLE + straight * [SB + HALFSTROKE - MIDDLE]] [cross + straight * [CAP - TURN - strench * [CAP - TURN] - cross]]
|
||||
:.curve-to [SB + HALFSTROKE] [CAP - TURN - strench * [CAP - TURN]] [SB + HALFSTROKE] [CAP - TURN]
|
||||
:.line-to [SB + HALFSTROKE] CAP
|
||||
:.heads-to UPWARD
|
||||
|
||||
put-shapes : barone.form-stroke
|
||||
put-shapes : bartwo.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE 0
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.heads-to UPWARD
|
||||
:.line-to MIDDLE [cross + HALFSTROKE]
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
|
||||
### B D P R
|
||||
create-glyph 'B' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'B'
|
||||
include capitalMarks
|
||||
|
||||
local bowl 451
|
||||
local tkappa [COKAPPA - 0.22]
|
||||
local bkappa [COKAPPA - 0.2]
|
||||
|
||||
local turntop : [CAP + [bowl - STROKE]] / 2
|
||||
local turnbottom : bowl / 2
|
||||
|
||||
local topbowl : create-stroke
|
||||
topbowl.start-from SB CAP
|
||||
:.heads-to RIGHTWARD
|
||||
:.line-to [RIGHTSB - SB * 0.5 - turnbottom] CAP
|
||||
:.cubic-to [RIGHTSB - SB * 0.5 - tkappa * turnbottom] CAP [RIGHTSB - SB * 0.5] [turntop + [CAP - turntop] * KAPPA] [RIGHTSB - SB * 0.5] turntop
|
||||
:.cubic-to [RIGHTSB - SB * 0.5] [turntop + KAPPA * [bowl - STROKE - turntop]] [RIGHTSB - SB * 0.5 - tkappa * turnbottom] [bowl - STROKE] [RIGHTSB - SB * 0.5 - turnbottom] [bowl - STROKE]
|
||||
:.line-to SB [bowl - STROKE]
|
||||
:.heads-to LEFTWARD
|
||||
|
||||
local bottombowl : create-stroke
|
||||
bottombowl.start-from SB 0
|
||||
:.heads-to RIGHTWARD
|
||||
:.line-to [RIGHTSB - turnbottom] 0
|
||||
:.cubic-to [RIGHTSB - bkappa * turnbottom] 0 RIGHTSB [turnbottom * KAPPA] RIGHTSB turnbottom
|
||||
:.cubic-to RIGHTSB [turnbottom + KAPPA * [bowl - turnbottom]] [RIGHTSB - bkappa * turnbottom] bowl [RIGHTSB - turnbottom] bowl
|
||||
:.line-to SB bowl
|
||||
:.heads-to LEFTWARD
|
||||
|
||||
local leftbar : create-stroke
|
||||
:.start-from SB 0
|
||||
:.heads-to UPWARD
|
||||
:.line-to SB CAP
|
||||
:.heads-to UPWARD
|
||||
|
||||
put-shapes : topbowl.form-stroke 0 STROKE
|
||||
put-shapes : bottombowl.form-stroke STROKE 0
|
||||
put-shapes : leftbar.form-stroke 0 STROKE
|
||||
}
|
||||
|
||||
create-glyph 'D' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'D'
|
||||
include capitalMarks
|
||||
|
||||
local dsmooth [SMOOTH * 1.55]
|
||||
local bsmooth [SMOOTH * 1.3]
|
||||
local bkappa [COKAPPA - 0.2]
|
||||
|
||||
local leftbar : create-stroke
|
||||
:.start-from SB 0
|
||||
:.heads-to UPWARD
|
||||
:.line-to SB CAP
|
||||
:.heads-to UPWARD
|
||||
|
||||
local bowl : create-stroke
|
||||
bowl.start-from SB 0
|
||||
:.heads-to RIGHTWARD
|
||||
:.line-to [RIGHTSB - bsmooth] 0
|
||||
:.cubic-to [RIGHTSB - bkappa * bsmooth] 0 RIGHTSB [COBKAPPA * dsmooth] RIGHTSB dsmooth
|
||||
:.line-to RIGHTSB [CAP - dsmooth]
|
||||
:.cubic-to RIGHTSB [CAP - COBKAPPA * dsmooth] [RIGHTSB - bkappa * bsmooth] CAP [RIGHTSB - bsmooth] CAP
|
||||
:.line-to SB CAP
|
||||
:.heads-to LEFTWARD
|
||||
|
||||
|
||||
put-shapes : bowl.form-stroke STROKE 0
|
||||
put-shapes : leftbar.form-stroke 0 STROKE
|
||||
}
|
||||
create-glyph 'P' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'P'
|
||||
include capitalMarks
|
||||
|
||||
local bowl CAPMIDDLE
|
||||
local bkappa [COKAPPA - 0.2]
|
||||
|
||||
local turntop : [CAP + [bowl - HALFSTROKE]] / 2
|
||||
local turnbottom : bowl / 2
|
||||
|
||||
local topbowl : create-stroke
|
||||
:.start-from [SB * 1.25] CAP
|
||||
:.heads-to RIGHTWARD
|
||||
:.line-to [RIGHTSB - turnbottom] CAP
|
||||
:.arc-hv-to [RIGHTSB - O] turntop
|
||||
:.arc-vh-to [RIGHTSB - turnbottom] [bowl - HALFSTROKE]
|
||||
:.line-to [SB * 1.25] [bowl - HALFSTROKE]
|
||||
:.heads-to LEFTWARD
|
||||
|
||||
local leftbar : create-stroke
|
||||
:.start-from [SB * 1.25] 0 :.heads-to UPWARD
|
||||
:.line-to [SB * 1.25] CAP :.heads-to UPWARD
|
||||
|
||||
put-shapes : topbowl.form-stroke 0 STROKE
|
||||
put-shapes : leftbar.form-stroke 0 STROKE
|
||||
}
|
||||
create-glyph 'R' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'R'
|
||||
include glyphs.P true
|
||||
|
||||
local TURN [XH * 0.1]
|
||||
local right [RIGHTSB - O]
|
||||
put-shapes : create-stroke
|
||||
:.start-from [right - HALFSTROKE] 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.curve-to [right - HALFSTROKE] [TURN + 0.2 * [XH - TURN]] MIDDLE CAPMIDDLE
|
||||
:.form-stroke
|
||||
}
|
||||
|
||||
### C G O zero Q U
|
||||
|
||||
create-glyph 'C' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'C'
|
||||
include capitalMarks
|
||||
|
||||
local outline : create-stroke
|
||||
outline.start-from [RIGHTSB - OXHOOK] [CAP - HOOK]
|
||||
:.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] CAPO MIDDLE CAPO
|
||||
:.heads-to LEFTWARD
|
||||
:.arc-hv-to SB [CAP - SMOOTHA]
|
||||
:.line-to SB SMOOTHB
|
||||
:.arc-vh-to MIDDLE O
|
||||
:.heads-to RIGHTWARD
|
||||
:.curve-to [MIDDLE + ITALICCORS + KAPPA_HOOK * [MIDDLE - SB]] O [RIGHTSB - OXHOOK] HOOK
|
||||
put-shapes : outline.form-stroke STROKE 0
|
||||
}
|
||||
|
||||
create-glyph 'G' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'G'
|
||||
include capitalMarks
|
||||
|
||||
local outline : create-stroke
|
||||
outline.start-from [RIGHTSB - OXHOOK] [CAP - HOOK]
|
||||
:.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] CAPO MIDDLE CAPO
|
||||
:.heads-to LEFTWARD
|
||||
:.arc-hv-to SB [CAP - SMOOTHA]
|
||||
:.line-to SB SMOOTHB
|
||||
:.arc-vh-to MIDDLE O
|
||||
:.heads-to RIGHTWARD
|
||||
:.arc-hv-to RIGHTSB SMOOTHA
|
||||
:.line-to RIGHTSB [CAP / 2 + STROKE / 2]
|
||||
:.heads-to UPWARD
|
||||
put-shapes : outline.form-stroke STROKE 0
|
||||
|
||||
local bar : create-stroke
|
||||
:.start-from MIDDLE [CAP / 2 + STROKE / 2]
|
||||
:.line-to RIGHTSB [CAP / 2 + STROKE / 2]
|
||||
:.heads-to RIGHTWARD
|
||||
put-shapes : bar.form-stroke 0 STROKE
|
||||
}
|
||||
|
||||
create-glyph 'O' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'O'
|
||||
include capitalMarks
|
||||
|
||||
local outline : create-stroke
|
||||
outline.start-from MIDDLE CAPO
|
||||
:.heads-to LEFTWARD
|
||||
:.arc-hv-to SB [CAP - SMOOTHA]
|
||||
:.line-to SB SMOOTHB
|
||||
:.arc-vh-to MIDDLE O
|
||||
:.heads-to RIGHTWARD
|
||||
:.arc-hv-to RIGHTSB SMOOTHA
|
||||
:.line-to RIGHTSB [CAP - SMOOTHB]
|
||||
:.arc-vh-to MIDDLE CAPO
|
||||
:.heads-to LEFTWARD
|
||||
put-shapes : outline.form-stroke STROKE 0
|
||||
}
|
||||
|
||||
create-glyph 'zero.slashed' : glyph-construction {
|
||||
set-width WIDTH
|
||||
|
||||
put-shapes glyphs.O.contours
|
||||
|
||||
local bar : create-stroke :.start-from [SB + STROKE / 2] [CAP * [1 - 0.65]] :.line-to [RIGHTSB - STROKE / 2] [CAP * 0.65]
|
||||
put-shapes : bar.form-stroke [STROKE / 2] [STROKE / 2]
|
||||
}
|
||||
create-glyph 'zero.unslashed' : glyph-construction {
|
||||
include glyphs.O
|
||||
}
|
||||
create-glyph 'zero.dotted' : glyph-construction {
|
||||
include glyphs.O
|
||||
put-shapes : list {
|
||||
Ring [CAPMIDDLE + DOTRADIUS] [CAPMIDDLE - DOTRADIUS] [MIDDLE + DOTRADIUS] [MIDDLE - DOTRADIUS]
|
||||
}
|
||||
}
|
||||
create-glyph 'zero' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode '0'
|
||||
include glyphs.[match variantSelector.zero {
|
||||
'slashed' 'zero.slashed'
|
||||
'dotted' 'zero.dotted'
|
||||
'unslahsed' 'zero.unslashed'
|
||||
otherwise 'zero.slashed'
|
||||
}]
|
||||
}
|
||||
|
||||
create-glyph 'Q' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'Q'
|
||||
|
||||
include glyphs.O true
|
||||
|
||||
start-from MIDDLE 0
|
||||
line-to [MIDDLE + STROKE / 2] [-CAP * 0.2]
|
||||
line-to [MIDDLE + STROKE / 2 + STROKE] [-CAP * 0.2]
|
||||
line-to [MIDDLE + STROKE] 0
|
||||
line-to [MIDDLE + STROKE * [1 - 0.5 / 3]] [STROKE * 0.5]
|
||||
reverse-last
|
||||
}
|
||||
|
||||
create-glyph 'U' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'U'
|
||||
include capitalMarks
|
||||
|
||||
local outline : create-stroke
|
||||
outline.start-from SB CAP
|
||||
:.heads-to DOWNWARD
|
||||
:.line-to SB SMOOTHB
|
||||
:.arc-vh-to MIDDLE O
|
||||
:.heads-to RIGHTWARD
|
||||
:.arc-hv-to RIGHTSB SMOOTHA
|
||||
:.line-to RIGHTSB CAP
|
||||
:.heads-to UPWARD
|
||||
put-shapes : outline.form-stroke STROKE 0
|
||||
}
|
||||
|
||||
|
||||
### F E H L I T Z
|
||||
create-glyph 'F' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'F'
|
||||
include capitalMarks
|
||||
|
||||
put-shapes : create-stroke :.start-from [SB * 1.5] 0 :.heads-to UPWARD :.set-width 0 STROKE
|
||||
:.line-to [SB * 1.5] CAP :.heads-to UPWARD :.form-stroke
|
||||
put-shapes : create-stroke :.start-from [SB * 1.5] CAP :.set-width 0 STROKE :.heads-to RIGHTWARD
|
||||
:.line-to RIGHTSB CAP :.heads-to RIGHTWARD :.form-stroke
|
||||
put-shapes : create-stroke :.start-from [SB * 1.5] CAPMIDDLE :.set-width HALFSTROKE HALFSTROKE :.heads-to RIGHTWARD
|
||||
:.line-to [RIGHTSB - HALFSTROKE] CAPMIDDLE :.heads-to RIGHTWARD :.form-stroke
|
||||
}
|
||||
create-glyph 'E' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'E'
|
||||
include glyphs.F true
|
||||
|
||||
put-shapes : create-stroke :.start-from [SB * 1.5] 0 :.set-width STROKE 0 :.heads-to RIGHTWARD
|
||||
:.line-to RIGHTSB 0 :.heads-to RIGHTWARD :.form-stroke
|
||||
}
|
||||
create-glyph 'H' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'H'
|
||||
include capitalMarks
|
||||
|
||||
put-shapes : create-stroke :.start-from SB 0 :.heads-to UPWARD :.set-width 0 STROKE
|
||||
:.line-to SB CAP :.heads-to UPWARD :.form-stroke
|
||||
put-shapes : create-stroke :.start-from RIGHTSB 0 :.heads-to UPWARD :.set-width STROKE 0
|
||||
:.line-to RIGHTSB CAP :.heads-to UPWARD :.form-stroke
|
||||
put-shapes : create-stroke :.start-from SB [CAP / 2] :.set-width HALFSTROKE HALFSTROKE :.heads-to RIGHTWARD
|
||||
:.line-to RIGHTSB [CAP / 2] :.heads-to RIGHTWARD :.form-stroke
|
||||
}
|
||||
|
||||
create-glyph 'L' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'L'
|
||||
include capitalMarks
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from [SB * 1.5] CAP
|
||||
:.set-width STROKE 0
|
||||
:.heads-to DOWNWARD
|
||||
:.line-to [SB * 1.5] 0
|
||||
:.heads-to DOWNWARD
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from [SB * 1.5] 0
|
||||
:.set-width STROKE 0
|
||||
:.heads-to RIGHTWARD
|
||||
:.line-to RIGHTSB 0
|
||||
:.heads-to RIGHTWARD
|
||||
:.form-stroke
|
||||
}
|
||||
|
||||
create-glyph 'dotlessI.straight' : glyph-construction {
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to MIDDLE CAP
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'dotlessI.symmetric' : glyph-construction {
|
||||
include glyphs.'dotlessI.straight'
|
||||
# Top serif
|
||||
put-shapes : create-stroke
|
||||
:.start-from [MIDDLE - WIDTH * 0.26 - STROKE * globalTransform.yx] CAP
|
||||
:.set-width 0 STROKE
|
||||
:.line-to [MIDDLE + WIDTH * 0.26 - STROKE * globalTransform.yx] CAP
|
||||
:.form-stroke
|
||||
# Bottom serif
|
||||
put-shapes : create-stroke
|
||||
:.start-from [MIDDLE - WIDTH * 0.26 + STROKE * globalTransform.yx] 0
|
||||
:.set-width STROKE 0
|
||||
:.line-to [MIDDLE + WIDTH * 0.26 + STROKE * globalTransform.yx] 0
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'I' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'I'
|
||||
include capitalMarks
|
||||
|
||||
include glyphs.'dotlessI.symmetric'
|
||||
}
|
||||
create-glyph 'T' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'T'
|
||||
include capitalMarks
|
||||
|
||||
put-shapes : create-stroke :.start-from MIDDLE 0 :.heads-to UPWARD :.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to MIDDLE CAP :.heads-to UPWARD :.form-stroke
|
||||
put-shapes : create-stroke :.start-from SB CAP :.heads-to RIGHTWARD :.set-width 0 STROKE
|
||||
:.line-to RIGHTSB CAP :.heads-to RIGHTWARD :.form-stroke
|
||||
}
|
||||
|
||||
create-glyph 'Z' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'Z'
|
||||
include capitalMarks
|
||||
|
||||
local cor 1.15
|
||||
|
||||
put-shapes : create-stroke :.start-from SB CAP :.heads-to RIGHTWARD :.set-width 0 STROKE
|
||||
:.line-to RIGHTSB CAP :.heads-to RIGHTWARD :.form-stroke
|
||||
put-shapes : create-stroke :.start-from SB 0 :.heads-to RIGHTWARD :.set-width STROKE 0
|
||||
:.line-to RIGHTSB 0 :.heads-to RIGHTWARD :.form-stroke
|
||||
|
||||
start-from SB STROKE
|
||||
line-to [SB + STROKE * cor] STROKE
|
||||
line-to RIGHTSB [CAP - STROKE]
|
||||
line-to [RIGHTSB - STROKE * cor] [CAP - STROKE]
|
||||
reverse-last
|
||||
}
|
||||
|
||||
### J
|
||||
|
||||
create-glyph 'J.straight' : glyph-construction {
|
||||
set-width WIDTH
|
||||
include capitalMarks
|
||||
|
||||
local slope [STROKE * 0.00092]
|
||||
local expand 0.35
|
||||
local coexpand [[1 - expand] / 2]
|
||||
local kappa KAPPA_HOOK
|
||||
local smooth : HOOK + 0.75 * STROKE
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB CAP :.set-width 0 STROKE :.heads-to DOWNWARD
|
||||
:.line-to RIGHTSB smooth
|
||||
:.arc-vh-to [MIDDLE - SB * 0.25] O :.heads-to LEFTWARD
|
||||
:.curve-to [MIDDLE - kappa * [MIDDLE - SB] - SB * 0.5] O [0.5 * SB + OXHOOK] HOOK
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'J.serifed' : glyph-construction {
|
||||
set-width WIDTH; assign-unicode 'J'
|
||||
|
||||
include glyphs.'J.straight' true
|
||||
put-shapes : leftwardTopSerif [RIGHTSB - HALFSTROKE] CAP LONGSERIF
|
||||
}
|
||||
|
||||
### M N
|
||||
create-glyph 'N' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'N'
|
||||
include capitalMarks
|
||||
|
||||
local topstroke : Math.min STROKE [[WIDTH - SB * 2] * 0.24]
|
||||
local halftopstroke : topstroke / 2
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB 0 :.heads-to UPWARD :.set-width 0 STROKE
|
||||
:.line-to SB [CAP * 0.4] :.heads-to UPWARD
|
||||
:.line-to SB CAP :.heads-to UPWARD :.set-width 0 topstroke
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB 0 :.heads-to UPWARD :.set-width topstroke 0
|
||||
:.line-to RIGHTSB [CAP * 0.6] :.heads-to UPWARD :.set-width STROKE 0
|
||||
:.line-to RIGHTSB CAP :.heads-to UPWARD
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from [SB + halftopstroke] CAP :.heads-to DOWNWARD :.set-width topstroke 0
|
||||
:.line-to [RIGHTSB - topstroke - halftopstroke] 0 :.heads-to DOWNWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'M' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'M'
|
||||
include capitalMarks
|
||||
|
||||
local topstroke : Math.min STROKE [[WIDTH - SB * 2] * 0.175]
|
||||
local halftopstroke : topstroke / 2
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB 0 :.heads-to UPWARD :.set-width 0 STROKE
|
||||
:.line-to SB [CAP * 0.2] :.heads-to UPWARD
|
||||
:.line-to SB CAP :.heads-to UPWARD :.set-width 0 topstroke
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB 0 :.heads-to UPWARD :.set-width STROKE 0
|
||||
:.line-to RIGHTSB [CAP * 0.2] :.heads-to UPWARD
|
||||
:.line-to RIGHTSB CAP :.heads-to UPWARD :.set-width topstroke 0
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from [SB + halftopstroke] CAP :.heads-to DOWNWARD :.set-width topstroke 0
|
||||
:.line-to [MIDDLE - halftopstroke] [CAP * 0.3] :.heads-to DOWNWARD
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from [MIDDLE + halftopstroke] [CAP * 0.3] :.heads-to UPWARD :.set-width topstroke 0
|
||||
:.line-to [RIGHTSB - halftopstroke] CAP :.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
|
||||
### S
|
||||
create-glyph 'S' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'S'
|
||||
include capitalMarks
|
||||
|
||||
local slope [STROKE * 0.00092]
|
||||
local expand 0.35
|
||||
local coexpand [[1 - expand] / 2]
|
||||
local ssmootha SMOOTHA
|
||||
|
||||
local bowltop : create-stroke
|
||||
bowltop.start-from [RIGHTSB - OXHOOK] [CAP - HOOK]
|
||||
:.set-width STROKE 0
|
||||
:.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] CAPO MIDDLE CAPO
|
||||
:.heads-to LEFTWARD
|
||||
:.arc-hv-to SB [CAP - ssmootha]
|
||||
|
||||
local strokemiddle : create-stroke
|
||||
strokemiddle.start-from [SB + STROKE / 2] [CAP - ssmootha]
|
||||
:.set-width [STROKE / 2] [STROKE / 2]
|
||||
:.curve-to [SB + STROKE / 2] [[0.5 + slope] * CAP + [2 * slope * CAP] / [expand * WIDTH] * [coexpand * WIDTH - SB - STROKE / 2]] [coexpand * WIDTH] [[0.5 + slope] * CAP]
|
||||
:.line-to [[1 - coexpand] * WIDTH] [[0.5 - slope] * CAP]
|
||||
:.curve-to [RIGHTSB - STROKE / 2] [[0.5 - slope] * CAP - [2 * slope * CAP] / [expand * WIDTH] * [coexpand * WIDTH - SB - STROKE / 2]] [RIGHTSB - STROKE / 2] ssmootha
|
||||
|
||||
local bowlbottom : create-stroke
|
||||
bowlbottom.start-from RIGHTSB ssmootha :.set-width 0 STROKE
|
||||
:.arc-vh-to MIDDLE O
|
||||
:.heads-to LEFTWARD
|
||||
:.curve-to [MIDDLE - KAPPA_HOOK * [MIDDLE - para.sb]] O [SB + OXHOOK] HOOK
|
||||
|
||||
put-shapes : bowltop.form-stroke
|
||||
put-shapes : strokemiddle.form-stroke
|
||||
put-shapes : bowlbottom.form-stroke
|
||||
}
|
||||
create-glyph 'dollar' : glyph-construction {
|
||||
set-width WIDTH; assign-unicode '$'
|
||||
put-shapes glyphs.S.contours
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE [CAP - HALFSTROKE]
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to MIDDLE [CAP - DESCENDER / 2]
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE [DESCENDER / 2]
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to MIDDLE HALFSTROKE
|
||||
:.form-stroke
|
||||
}
|
682
glyphs/latin-lower.patel
Normal file
682
glyphs/latin-lower.patel
Normal file
|
@ -0,0 +1,682 @@
|
|||
###### LOWER CASE
|
||||
|
||||
### o b d p q g
|
||||
create-glyph 'o' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'o'
|
||||
include eMarks
|
||||
|
||||
local outline : 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
|
||||
put-shapes : outline.form-stroke
|
||||
}
|
||||
create-glyph 'o.left' : glyph-construction {
|
||||
set-width WIDTH
|
||||
# right half
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
# left half
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'o.right' : glyph-construction {
|
||||
set-width WIDTH
|
||||
# left half
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
# right half
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'p' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'p'
|
||||
include eMarks
|
||||
|
||||
include glyphs.'o.left'
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB XH
|
||||
:.heads-to DOWNWARD
|
||||
:.set-width STROKE 0
|
||||
:.line-to SB DESCENDER
|
||||
:.heads-to DOWNWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'b' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'b'
|
||||
include bMarks
|
||||
|
||||
put-shapes glyphs.'o.left'.contours
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width 0 STROKE
|
||||
:.line-to SB CAP
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'q' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'q'
|
||||
include eMarks
|
||||
|
||||
put-shapes glyphs.'o.right'.contours
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB XH
|
||||
:.heads-to DOWNWARD
|
||||
:.set-width 0 STROKE
|
||||
:.line-to RIGHTSB DESCENDER
|
||||
:.heads-to DOWNWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'd' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'd'
|
||||
include bMarks
|
||||
|
||||
put-shapes glyphs.'o.right'.contours
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width STROKE 0
|
||||
:.line-to RIGHTSB CAP
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'g' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'g'
|
||||
include pMarks
|
||||
|
||||
put-shapes : list {
|
||||
Ring XO [XH * GBARPOS] [SB * 1.25] [RIGHTSB - 0.25 * SB] SMALLSMOOTH
|
||||
Ring [XO - STROKE] [[XH * GBARPOS] + STROKE] [SB * 1.25 + STROKE] [[RIGHTSB - 0.25 * SB] - STROKE] [SMALLSMOOTH - STROKE]
|
||||
}
|
||||
reverse-last
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE [XH * GBARPOS]
|
||||
:.set-width 0 [STROKE * 0.75]
|
||||
:.arc-hv-to [SB * 1.5 + STROKE] [[O - DESCENDER * 0.85 + XH * GBARPOS] * 0.47]
|
||||
:.set-width 0 STROKE
|
||||
:.arc-vh-to [MIDDLE + DESCENDER * 0.15] [O - DESCENDER * 0.85]
|
||||
:.line-to [MIDDLE - DESCENDER * 0.15] [O - DESCENDER * 0.85]
|
||||
:.arc-hv-to [RIGHTSB - O * 2] [[-STROKE] * globalTransform.yx * 2]
|
||||
:.arc-vh-to MIDDLE [DESCENDER + O]
|
||||
:.arc-hv-to SB [DESCENDER * 0.1]
|
||||
:.arc-vh-to [MIDDLE + DESCENDER * 0.15] [O - DESCENDER * 0.85]
|
||||
:.form-stroke
|
||||
|
||||
start-from [RIGHTSB + 0.5 * SB] XH
|
||||
line-to [RIGHTSB + 0.5 * SB] [XH - STROKE]
|
||||
line-to MIDDLE [XH - STROKE - O]
|
||||
line-to MIDDLE XH
|
||||
}
|
||||
### c e
|
||||
create-glyph 'c' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'c'
|
||||
include eMarks
|
||||
|
||||
local outline : create-stroke
|
||||
outline.start-from [RIGHTSB - OXHOOK] [XH - HOOK]
|
||||
:.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]
|
||||
put-shapes : outline.form-stroke STROKE 0
|
||||
}
|
||||
create-glyph 'e' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'e'
|
||||
include eMarks
|
||||
|
||||
local barbottom [XH * BARPOS]
|
||||
|
||||
local outline : 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 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]
|
||||
|
||||
local bar : create-stroke
|
||||
:.start-from [SB + HALFSTROKE] barbottom
|
||||
:.set-width STROKE 0
|
||||
:.heads-to RIGHTWARD
|
||||
:.line-to [RIGHTSB - HALFSTROKE] barbottom
|
||||
:.heads-to RIGHTWARD
|
||||
|
||||
put-shapes : outline.form-stroke
|
||||
put-shapes : bar.form-stroke
|
||||
}
|
||||
|
||||
### a u
|
||||
create-glyph 'a.upright' : glyph-construction {
|
||||
set-width WIDTH
|
||||
local bartop [XH * BARPOS + STROKE]
|
||||
put-shapes : 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_AHOOK * [MIDDLE - SB]] XO [SB + OXHOOK] [XH - AHOOK]
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from [WIDTH * 0.47] O
|
||||
:.set-width 0 STROKE
|
||||
:.heads-to LEFTWARD
|
||||
:.arc-hv-to [SB + O] [bartop * 0.45]
|
||||
:.arc-vh-to [WIDTH * 0.6] bartop
|
||||
:.line-to RIGHTSB bartop
|
||||
:.heads-to RIGHTWARD
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from [WIDTH * 0.47] [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]
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'a.italic' : glyph-construction {
|
||||
set-width WIDTH
|
||||
include glyphs.'o.right'
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width STROKE 0
|
||||
:.line-to RIGHTSB XH
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
put-shapes : 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]
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width STROKE 0
|
||||
:.line-to RIGHTSB XH
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
|
||||
### n h m
|
||||
create-glyph 'nbowl' : glyph-construction {
|
||||
put-shapes : create-stroke
|
||||
:.start-from RIGHTSB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width STROKE 0
|
||||
:.line-to RIGHTSB [XH - SMALLSMOOTHB]
|
||||
:.arc-vh-to MIDDLE XO
|
||||
:.heads-to LEFTWARD
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE [XO - STROKE]
|
||||
:.set-width 0 STROKE
|
||||
:.heads-to LEFTWARD
|
||||
:.arc-hv-to [SB + STROKE * ITALICCOR] [XH - SMALLSMOOTHA]
|
||||
:.heads-to DOWNWARD
|
||||
:.set-width 0 [STROKE * 0.4]
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'n' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'n'
|
||||
include eMarks
|
||||
|
||||
include glyphs.nbowl
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width 0 STROKE
|
||||
:.line-to SB XH
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'h' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'h'
|
||||
include bMarks
|
||||
|
||||
include glyphs.nbowl
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width 0 STROKE
|
||||
:.line-to SB CAP
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'm' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'm'
|
||||
include eMarks
|
||||
|
||||
local sw : Math.min STROKE [[WIDTH - SB * 2] * 0.24]
|
||||
local m1 : [MIDDLE + SB + sw * 0.25] / 2
|
||||
local m2 : m1 + [MIDDLE - sw / 2 - SB]
|
||||
put-shapes : 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]
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from [RIGHTSB - sw] 0
|
||||
:.set-width 0 sw :.heads-to UPWARD
|
||||
:.line-to [RIGHTSB - sw] [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]
|
||||
:.form-stroke
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width 0 sw
|
||||
:.line-to SB XH
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
|
||||
### i j l
|
||||
create-glyph 'dotlessi.straight' : glyph-construction {
|
||||
include eMarks
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to MIDDLE XH
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'dotlessi.hooky' : glyph-construction {
|
||||
include glyphs.'dotlessi.straight' true
|
||||
put-shapes : leftwardTopSerif MIDDLE XH LONGSERIF
|
||||
}
|
||||
create-glyph 'dotlessi.zshaped' : glyph-construction {
|
||||
include glyphs.'dotlessi.hooky' true
|
||||
put-shapes : rightwardBottomSerif MIDDLE 0 LONGSERIF
|
||||
}
|
||||
create-glyph 'dotlessi.serifed' : glyph-construction {
|
||||
include eMarks
|
||||
|
||||
local balance ILBALANCE
|
||||
put-shapes : create-stroke
|
||||
:.start-from [MIDDLE + balance] 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to [MIDDLE + balance] XH
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
put-shapes : leftwardTopSerif [MIDDLE + balance] XH [LONGSERIF - balance]
|
||||
put-shapes : rightwardBottomSerif MIDDLE 0 LONGSERIF
|
||||
put-shapes : leftwardBottomSerif MIDDLE 0 LONGSERIF
|
||||
}
|
||||
create-glyph 'dotlessi' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 0x131
|
||||
|
||||
include glyphs.[match variantSelector.zero {
|
||||
'straight' 'dotlessi.straight'
|
||||
'hooky' 'dotlessi.hooky'
|
||||
'zshaped' 'dotlessi.zshaped'
|
||||
'serifed' 'dotlessi.serifed'
|
||||
otherwise 'dotlessi.serifed'
|
||||
}] true
|
||||
}
|
||||
create-glyph 'dotaccent' : glyph-construction {
|
||||
set-width WIDTH
|
||||
set-anchor 'above' MARK MIDDLE XH MIDDLE [XH + ACCENT]
|
||||
put-shapes : list {
|
||||
Ring [XH + ACCENT + DOTRADIUS] [XH + ACCENT - DOTRADIUS] [MIDDLE - DOTRADIUS] [MIDDLE + DOTRADIUS]
|
||||
}
|
||||
}
|
||||
create-glyph 'i' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'i'
|
||||
|
||||
include glyphs.dotlessi BASE
|
||||
include glyphs.dotaccent
|
||||
}
|
||||
|
||||
create-glyph 'dotlessj.straight' : glyph-construction {
|
||||
put-shapes : 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]
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'dotlessj.serifed' : glyph-construction {
|
||||
include glyphs.'dotlessj.straight'
|
||||
put-shapes : leftwardTopSerif [MIDDLE + JBALANCE] XH LONGSERIF
|
||||
}
|
||||
|
||||
create-glyph 'dotlessj' : glyph-construction {
|
||||
set-width WIDTH
|
||||
set-anchor 'above' BASE [MIDDLE + JBALANCE] XH
|
||||
assign-unicode 0x237
|
||||
include glyphs.'dotlessj.serifed'
|
||||
}
|
||||
create-glyph 'j' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'j'
|
||||
|
||||
include glyphs.dotlessj BASE
|
||||
include glyphs.dotaccent
|
||||
}
|
||||
|
||||
create-glyph 'l.straight' : glyph-construction {
|
||||
put-shapes : create-stroke
|
||||
:.start-from MIDDLE 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to MIDDLE CAP
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
}
|
||||
create-glyph 'l.hooky' : glyph-construction {
|
||||
include glyphs.'l.straight'
|
||||
put-shapes : leftwardTopSerif MIDDLE CAP LONGSERIF
|
||||
}
|
||||
create-glyph 'l.zshaped' : glyph-construction {
|
||||
include glyphs.'l.hooky'
|
||||
put-shapes : rightwardBottomSerif MIDDLE 0 LONGSERIF
|
||||
}
|
||||
create-glyph 'l.serifed' : glyph-construction {
|
||||
local balance ILBALANCE
|
||||
put-shapes : create-stroke
|
||||
:.start-from [MIDDLE + balance] 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.line-to [MIDDLE + balance] CAP
|
||||
:.heads-to UPWARD
|
||||
:.form-stroke
|
||||
put-shapes : leftwardTopSerif [MIDDLE + balance] CAP [LONGSERIF - balance]
|
||||
put-shapes : rightwardBottomSerif MIDDLE 0 LONGSERIF
|
||||
put-shapes : leftwardBottomSerif MIDDLE 0 LONGSERIF
|
||||
}
|
||||
create-glyph 'l' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'l'
|
||||
include bMarks
|
||||
|
||||
include glyphs.[match variantSelector.zero {
|
||||
'straight' 'l.straight'
|
||||
'hooky' 'l.hooky'
|
||||
'zshaped' 'l.zshaped'
|
||||
'serifed' 'l.serifed'
|
||||
otherwise 'l.serifed'
|
||||
}]
|
||||
}
|
||||
|
||||
### x v w z
|
||||
create-glyph 'x' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'x'
|
||||
include eMarks
|
||||
|
||||
local TURN [XH * 0.1]
|
||||
|
||||
local barone : create-stroke
|
||||
:.start-from [SB + HALFSTROKE + O] 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.cubic-to [SB + HALFSTROKE + O] [TURN + 0.17 * [XH - TURN]] [RIGHTSB - HALFSTROKE - O] [XH - TURN - 0.17 * [XH - TURN]] [RIGHTSB - HALFSTROKE - O] XH
|
||||
:.heads-to UPWARD
|
||||
|
||||
local bartwo : create-stroke
|
||||
:.start-from [RIGHTSB - HALFSTROKE - O] 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.cubic-to [RIGHTSB - HALFSTROKE - O] [TURN + 0.17 * [XH - TURN]] [SB + HALFSTROKE + O] [XH - TURN - 0.17 * [XH - TURN]] [SB + HALFSTROKE + O] XH
|
||||
:.heads-to UPWARD
|
||||
|
||||
put-shapes : barone.form-stroke
|
||||
put-shapes : bartwo.form-stroke
|
||||
}
|
||||
create-glyph 'v' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'v'
|
||||
include eMarks
|
||||
|
||||
local TURN [XH * 0.9]
|
||||
|
||||
local leftbar : create-stroke
|
||||
leftbar.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
|
||||
|
||||
local rightbar : create-stroke
|
||||
rightbar.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]
|
||||
|
||||
put-shapes : leftbar.form-stroke
|
||||
put-shapes : rightbar.form-stroke
|
||||
|
||||
#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.35
|
||||
local m2 : WIDTH * 0.65
|
||||
|
||||
put-shapes: 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
|
||||
:.form-stroke
|
||||
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
|
||||
put-shapes: 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
|
||||
:.form-stroke
|
||||
|
||||
put-shapes : 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
|
||||
:.form-stroke
|
||||
|
||||
#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 'z' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 'z'
|
||||
include eMarks
|
||||
|
||||
local cor 1.2
|
||||
|
||||
put-shapes : create-stroke :.start-from SB XH :.heads-to RIGHTWARD :.set-width 0 STROKE
|
||||
:.line-to RIGHTSB XH :.heads-to RIGHTWARD :.form-stroke
|
||||
put-shapes : create-stroke :.start-from SB 0 :.heads-to RIGHTWARD :.set-width STROKE 0
|
||||
:.line-to RIGHTSB 0 :.heads-to RIGHTWARD :.form-stroke
|
||||
|
||||
start-from SB STROKE
|
||||
line-to [SB + STROKE * cor] STROKE
|
||||
line-to RIGHTSB [XH - STROKE]
|
||||
line-to [RIGHTSB - STROKE * cor] [XH - STROKE]
|
||||
reverse-last
|
||||
}
|
||||
|
||||
### s
|
||||
create-glyph 's' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode 's'
|
||||
include eMarks
|
||||
|
||||
local slope 0.015
|
||||
local expand 0.175
|
||||
local coexpand [[1 - expand] / 2]
|
||||
local ssmootha [SMOOTHA * 0.87]
|
||||
|
||||
local bowltop : create-stroke
|
||||
bowltop.start-from [RIGHTSB - OXHOOK] [XH - SHOOK]
|
||||
:.set-width STROKE 0
|
||||
:.curve-to [MIDDLE + KAPPA_AHOOK * [MIDDLE - para.sb]] XO MIDDLE XO
|
||||
:.heads-to LEFTWARD
|
||||
:.arc-hv-to SB [XH - ssmootha]
|
||||
|
||||
local strokemiddle : create-stroke
|
||||
strokemiddle.start-from [SB + STROKE / 2] [XH - ssmootha]
|
||||
:.set-width [STROKE / 2] [STROKE / 2]
|
||||
:.curve-to [SB + STROKE / 2] [[0.5 + slope] * XH + [2 * slope * XH] / [expand * WIDTH] * [coexpand * WIDTH - SB - STROKE / 2]] [coexpand * WIDTH] [[0.5 + slope] * XH]
|
||||
:.line-to [[1 - coexpand] * WIDTH] [[0.5 - slope] * XH]
|
||||
:.curve-to [RIGHTSB - STROKE / 2] [[0.5 - slope] * XH - [2 * slope * XH] / [expand * WIDTH] * [coexpand * WIDTH - SB - STROKE / 2]] [RIGHTSB - STROKE / 2] ssmootha
|
||||
|
||||
local bowlbottom : create-stroke
|
||||
bowlbottom.start-from RIGHTSB ssmootha :.set-width 0 STROKE
|
||||
:.arc-vh-to MIDDLE O
|
||||
:.heads-to LEFTWARD
|
||||
:.curve-to [MIDDLE - KAPPA_AHOOK * [MIDDLE - para.sb]] O [SB + OXHOOK] SHOOK
|
||||
|
||||
put-shapes : bowltop.form-stroke
|
||||
put-shapes : strokemiddle.form-stroke
|
||||
put-shapes : bowlbottom.form-stroke
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue