Added glyph one, two; added shape sStrand
This commit is contained in:
parent
cd8f1b2302
commit
625b22273a
7 changed files with 1564 additions and 1451 deletions
2859
buildglyphs.js
2859
buildglyphs.js
File diff suppressed because it is too large
Load diff
|
@ -419,34 +419,6 @@ create-glyph 'O' : glyph-construction {
|
|||
put-shapes : outline.to-outline 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.to-outline [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'
|
||||
|
@ -673,15 +645,33 @@ create-glyph 'M' : glyph-construction {
|
|||
:.to-outline
|
||||
}
|
||||
|
||||
define [sStrand leftlimit rightlimit _expansion _roundp] : begin {
|
||||
local strand : new Stroke
|
||||
strand.gizmo = globalTransform
|
||||
|
||||
local expansion : _expansion || 0.25
|
||||
local roundsize : [SMOOTHA * [_roundp || 0.4]] * [if [leftlimit < rightlimit] [-1] 1]
|
||||
local roundleft [leftlimit - roundsize]
|
||||
local roundright [rightlimit + roundsize]
|
||||
local sxleft [SB + HALFSTROKE + [RIGHTSB - SB - STROKE] * [0.5 - expansion]]
|
||||
local sxright [WIDTH - sxleft]
|
||||
local syleft [roundleft + [roundright - roundleft] * [0.5 - expansion]]
|
||||
local syright [roundleft + [roundright - roundleft] * [0.5 + expansion]]
|
||||
|
||||
return : strand.start-from [SB + HALFSTROKE] leftlimit
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.curve-to [SB + HALFSTROKE] roundleft sxleft syleft
|
||||
:.line-to sxright syright
|
||||
:.curve-to [RIGHTSB - HALFSTROKE] roundright [RIGHTSB - HALFSTROKE] rightlimit
|
||||
:.to-outline
|
||||
}
|
||||
|
||||
### 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
|
||||
|
@ -690,14 +680,7 @@ create-glyph 'S' : glyph-construction {
|
|||
:.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
|
||||
|
@ -705,8 +688,8 @@ create-glyph 'S' : glyph-construction {
|
|||
:.curve-to [MIDDLE - KAPPA_HOOK * [MIDDLE - para.sb]] O [SB + OXHOOK] HOOK
|
||||
|
||||
put-shapes : bowltop.to-outline
|
||||
put-shapes : strokemiddle.to-outline
|
||||
put-shapes : bowlbottom.to-outline
|
||||
put-shapes : sStrand [CAP - ssmootha] ssmootha
|
||||
}
|
||||
create-glyph 'dollar' : glyph-construction {
|
||||
set-width WIDTH; assign-unicode '$'
|
||||
|
|
|
@ -824,13 +824,6 @@ create-glyph 's' : glyph-construction {
|
|||
:.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
|
||||
|
@ -838,8 +831,9 @@ create-glyph 's' : glyph-construction {
|
|||
:.curve-to [MIDDLE - [KAPPA_AHOOK + TAILADJSKAPPA * globalTransform.yx] * [MIDDLE - para.sb]] O [SB + OXHOOK - + TAILADJSX * globalTransform.yx] [SHOOK - TAILADJSY * globalTransform.yx]
|
||||
|
||||
put-shapes : bowltop.to-outline
|
||||
put-shapes : strokemiddle.to-outline
|
||||
put-shapes : bowlbottom.to-outline
|
||||
|
||||
put-shapes : sStrand [XH - ssmootha] ssmootha 0.2 0.45
|
||||
}
|
||||
|
||||
### r
|
||||
|
|
75
glyphs/numbers.patel
Normal file
75
glyphs/numbers.patel
Normal file
|
@ -0,0 +1,75 @@
|
|||
|
||||
### NUMBERS
|
||||
|
||||
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.to-outline [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 'one' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode '1'
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from [MIDDLE + JBALANCE * 0.6] 0
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.heads-to UPWARD
|
||||
:.line-to [MIDDLE + JBALANCE * 0.6] CAP
|
||||
:.heads-to UPWARD
|
||||
:.to-outline
|
||||
put-shapes : create-stroke
|
||||
:.start-from [MIDDLE - HALFSTROKE + JBALANCE * 0.6] CAP
|
||||
:.set-width STROKE 0
|
||||
:.line-to [MIDDLE - HOOK * 1.5 + JBALANCE * 0.5] [CAP - HOOK * 0.75]
|
||||
:.to-outline
|
||||
}
|
||||
|
||||
create-glyph 'two' : glyph-construction {
|
||||
set-width WIDTH
|
||||
assign-unicode '2'
|
||||
include capitalMarks
|
||||
|
||||
|
||||
local ssmootha SMOOTHA
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from [SB + OXHOOK] [CAP - HOOK]
|
||||
:.set-width 0 STROKE
|
||||
:.curve-to [MIDDLE - KAPPA_HOOK * [MIDDLE - SB]] CAPO MIDDLE CAPO
|
||||
:.heads-to RIGHTWARD
|
||||
:.arc-hv-to RIGHTSB [CAP - ssmootha]
|
||||
:.to-outline
|
||||
|
||||
put-shapes : sStrand STROKE [CAP - ssmootha]
|
||||
|
||||
put-shapes : create-stroke
|
||||
:.start-from SB 0
|
||||
:.set-width STROKE 0
|
||||
:.heads-to RIGHTWARD
|
||||
:.line-to RIGHTSB 0
|
||||
:.heads-to RIGHTWARD
|
||||
:.to-outline
|
||||
}
|
6
makefile
6
makefile
|
@ -1,5 +1,5 @@
|
|||
SUPPORT_FILES = support/glyph.js support/stroke.js parameters.js
|
||||
GLYPH_SEGMENTS = glyphs/latin-capital.patel glyphs/latin-lower.patel
|
||||
GLYPH_SEGMENTS = glyphs/latin-capital.patel glyphs/latin-lower.patel glyphs/numbers.patel
|
||||
|
||||
FILES = $(SUPPORT_FILES) buildglyphs.js
|
||||
|
||||
|
@ -17,10 +17,10 @@ codex-bolditalic.ttf : $(FILES)
|
|||
update : $(FILES)
|
||||
|
||||
$(SUPPORT_FILES) :
|
||||
patel-c $< -o $@
|
||||
patel-c $< -o $@ --strict
|
||||
|
||||
buildglyphs.js : buildglyphs-intro.patel $(GLYPH_SEGMENTS) buildglyphs-final.patel
|
||||
cat $^ | patel-c -o $@
|
||||
cat $^ | patel-c --strict -o $@
|
||||
support/glyph.js : support/glyph.patel
|
||||
support/stroke.js : support/stroke.patel
|
||||
parameters.js : parameters.patel
|
|
@ -40,6 +40,7 @@
|
|||
r0_bold['barpos'] = 0.42;
|
||||
r0_bold['hook'] = 150;
|
||||
r0_bold['ahook'] = 100;
|
||||
r0_bold['smooth'] = 200;
|
||||
r0_bold['oxhook'] = 0;
|
||||
r0_bold['kappa_hook'] = 0.7;
|
||||
r0_bold['kappa_ahook'] = 0.6;
|
||||
|
|
|
@ -40,6 +40,7 @@ bold.dotsize = 160
|
|||
bold.barpos = 0.42
|
||||
bold.hook = 150
|
||||
bold.ahook = 100
|
||||
bold.smooth = 200
|
||||
bold.oxhook = 0
|
||||
bold.kappa_hook = 0.7
|
||||
bold.kappa_ahook = 0.60
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue