Added seven, right and ampersand.
This commit is contained in:
parent
d5a872944e
commit
3d210a49a2
9 changed files with 2258 additions and 2075 deletions
4173
buildglyphs.js
4173
buildglyphs.js
File diff suppressed because it is too large
Load diff
53
glyphs/ascii-symbols.patel
Normal file
53
glyphs/ascii-symbols.patel
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
|
||||||
|
###### ASCII SYMBOLS
|
||||||
|
|
||||||
|
create-glyph 'dollar' : glyph-construction {
|
||||||
|
set-width WIDTH; assign-unicode '$'
|
||||||
|
include glyphs.S
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from MIDDLE [CAP - HALFSTROKE]
|
||||||
|
:.set-width HALFSTROKE HALFSTROKE
|
||||||
|
:.line-to MIDDLE [CAP - DESCENDER / 2]
|
||||||
|
:.to-outline
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from MIDDLE [DESCENDER / 2]
|
||||||
|
:.set-width HALFSTROKE HALFSTROKE
|
||||||
|
:.line-to MIDDLE HALFSTROKE
|
||||||
|
:.to-outline
|
||||||
|
}
|
||||||
|
|
||||||
|
create-glyph 'ampersand' : glyph-construction {
|
||||||
|
set-width WIDTH
|
||||||
|
assign-unicode '&'
|
||||||
|
|
||||||
|
local fine : Math.min STROKE [[RIGHTSB - SB] * 0.25]
|
||||||
|
local p 0.85
|
||||||
|
local l 0.05
|
||||||
|
local pr 0.9
|
||||||
|
local q 0.45
|
||||||
|
local r 1.1
|
||||||
|
local s 0
|
||||||
|
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from [RIGHTSB - O] CAPMIDDLE
|
||||||
|
:.set-width 0 STROKE
|
||||||
|
:.heads-to DOWNWARD
|
||||||
|
:.line-to [RIGHTSB - O] SMOOTHA
|
||||||
|
:.arc-vh-to MIDDLE O
|
||||||
|
:.heads-to LEFTWARD
|
||||||
|
:.arc-hv-to [SB + O] SMOOTHB
|
||||||
|
:.to-outline
|
||||||
|
|
||||||
|
put-shapes : xsStrand [SB + O] SMOOTHB [mix SB RIGHTSB p] [CAP - SMOOTHB * pr] HALFSTROKE [fine / 2]
|
||||||
|
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from [mix SB RIGHTSB p] [CAP - SMOOTHB * pr]
|
||||||
|
:.set-width fine 0
|
||||||
|
:.arc-vh-to [mix SB RIGHTSB [mix p l 0.5]] CAPO
|
||||||
|
:.heads-to LEFTWARD
|
||||||
|
:.arc-hv-to [mix SB RIGHTSB l] [CAP - SMOOTHA * pr]
|
||||||
|
:.to-outline
|
||||||
|
|
||||||
|
put-shapes : xsStrand [mix SB RIGHTSB l] [CAP - SMOOTHA * pr] [mix SB RIGHTSB r] [SMOOTHA * s] [fine / 2] [fine / 2] null null [SMOOTHA * pr * 0.6]
|
||||||
|
|
||||||
|
}
|
|
@ -70,16 +70,19 @@ define [rightwardBottomSerif x y length] : begin {
|
||||||
:.to-outline
|
:.to-outline
|
||||||
}
|
}
|
||||||
|
|
||||||
define [sStrand leftlimit rightlimit _expansion _roundp] : begin {
|
define [xsStrand _xleft yleft _xright yright _halfstroke0 _halfstroke1 _ess _expansion _roundp] : begin {
|
||||||
local expansion : _expansion || 0.25
|
local expansion : _expansion || 0.25
|
||||||
|
local halfstroke0 : _halfstroke0 || HALFSTROKE
|
||||||
|
local halfstroke1 : _halfstroke1 || HALFSTROKE
|
||||||
|
local ess : _ess || [halfstroke0 + halfstroke1] / 2
|
||||||
local yItalicCorrection [globalTransform.yx * 0.98]
|
local yItalicCorrection [globalTransform.yx * 0.98]
|
||||||
local xItalicCorrection : 1 / [Math.sqrt [1 - yItalicCorrection * yItalicCorrection]]
|
local xItalicCorrection : 1 / [Math.sqrt [1 - yItalicCorrection * yItalicCorrection]]
|
||||||
|
|
||||||
local roundsize : [SMOOTHA * [_roundp || 0.4]] * [if [leftlimit < rightlimit] [-1] 1]
|
local roundsize : [_roundp || SMOOTHA * 0.4] * [if [yleft < yright] [-1] 1]
|
||||||
local roundleft [leftlimit - roundsize]
|
local roundleft [yleft - roundsize]
|
||||||
local roundright [rightlimit + roundsize]
|
local roundright [yright + roundsize]
|
||||||
local xleft : SB + HALFSTROKE * xItalicCorrection
|
local xleft : _xleft + halfstroke0 * xItalicCorrection
|
||||||
local xright : RIGHTSB - HALFSTROKE * xItalicCorrection
|
local xright : _xright - halfstroke1 * xItalicCorrection
|
||||||
local sxleft : mix xleft xright [0.5 - expansion]
|
local sxleft : mix xleft xright [0.5 - expansion]
|
||||||
local sxright : mix xleft xright [0.5 + expansion]
|
local sxright : mix xleft xright [0.5 + expansion]
|
||||||
local syleft : mix roundleft roundright [0.5 - expansion]
|
local syleft : mix roundleft roundright [0.5 - expansion]
|
||||||
|
@ -87,14 +90,20 @@ define [sStrand leftlimit rightlimit _expansion _roundp] : begin {
|
||||||
|
|
||||||
return : new Stroke
|
return : new Stroke
|
||||||
:.set-transform globalTransform
|
:.set-transform globalTransform
|
||||||
:.start-from xleft [leftlimit - HALFSTROKE * yItalicCorrection]
|
:.start-from xleft [yleft - halfstroke0 * yItalicCorrection]
|
||||||
:.set-width HALFSTROKE HALFSTROKE
|
:.set-width halfstroke0 halfstroke0
|
||||||
:.curve-to xleft roundleft sxleft syleft
|
:.curve-to xleft roundleft sxleft syleft
|
||||||
|
:.set-width ess ess
|
||||||
:.line-to sxright syright
|
:.line-to sxright syright
|
||||||
:.curve-to xright roundright xright [rightlimit + HALFSTROKE * yItalicCorrection]
|
:.curve-to xright roundright xright [yright + halfstroke1 * yItalicCorrection]
|
||||||
|
:.set-width halfstroke1 halfstroke1
|
||||||
:.to-outline
|
:.to-outline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define [sStrand yleft yright _expansion] : begin {
|
||||||
|
return : xsStrand SB yleft RIGHTSB yright HALFSTROKE HALFSTROKE HALFSTROKE _expansion [SMOOTHA * 0.4]
|
||||||
|
}
|
||||||
|
|
||||||
define [nBowl left middle right fine] : begin {
|
define [nBowl left middle right fine] : begin {
|
||||||
local bandLeft : new Stroke
|
local bandLeft : new Stroke
|
||||||
:.set-transform globalTransform
|
:.set-transform globalTransform
|
||||||
|
|
|
@ -290,9 +290,8 @@ create-glyph 'D' : glyph-construction {
|
||||||
assign-unicode 'D'
|
assign-unicode 'D'
|
||||||
include capitalMarks
|
include capitalMarks
|
||||||
|
|
||||||
local dsmooth [SMOOTH * 1.55]
|
local dsmooth [SMOOTH * 1.35]
|
||||||
local bsmooth [SMOOTH * 1.3]
|
local bsmooth [SMOOTH * 1.1]
|
||||||
local bkappa [COKAPPA - 0.2]
|
|
||||||
|
|
||||||
local leftbar : create-stroke
|
local leftbar : create-stroke
|
||||||
:.start-from SB 0
|
:.start-from SB 0
|
||||||
|
@ -304,9 +303,9 @@ create-glyph 'D' : glyph-construction {
|
||||||
bowl.start-from SB 0
|
bowl.start-from SB 0
|
||||||
:.heads-to RIGHTWARD
|
:.heads-to RIGHTWARD
|
||||||
:.line-to [RIGHTSB - bsmooth] 0
|
:.line-to [RIGHTSB - bsmooth] 0
|
||||||
:.cubic-to [RIGHTSB - bkappa * bsmooth] 0 RIGHTSB [COBKAPPA * dsmooth] RIGHTSB dsmooth
|
:.cubic-to [RIGHTSB - BKAPPA * bsmooth] 0 RIGHTSB [COBKAPPA * dsmooth] RIGHTSB dsmooth
|
||||||
:.line-to RIGHTSB [CAP - dsmooth]
|
:.line-to RIGHTSB [CAP - dsmooth]
|
||||||
:.cubic-to RIGHTSB [CAP - COBKAPPA * dsmooth] [RIGHTSB - bkappa * bsmooth] CAP [RIGHTSB - bsmooth] CAP
|
:.cubic-to RIGHTSB [CAP - COBKAPPA * dsmooth] [RIGHTSB - BKAPPA * bsmooth] CAP [RIGHTSB - bsmooth] CAP
|
||||||
:.line-to SB CAP
|
:.line-to SB CAP
|
||||||
:.heads-to LEFTWARD
|
:.heads-to LEFTWARD
|
||||||
|
|
||||||
|
@ -654,18 +653,4 @@ create-glyph 'S' : glyph-construction {
|
||||||
put-shapes : sHookUpper CAP SMOOTHA HOOK
|
put-shapes : sHookUpper CAP SMOOTHA HOOK
|
||||||
put-shapes : sHookLower 0 SMOOTHA HOOK
|
put-shapes : sHookLower 0 SMOOTHA HOOK
|
||||||
put-shapes : sStrand [CAP - SMOOTHA] SMOOTHA
|
put-shapes : sStrand [CAP - SMOOTHA] SMOOTHA
|
||||||
}
|
|
||||||
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]
|
|
||||||
:.to-outline
|
|
||||||
put-shapes : create-stroke
|
|
||||||
:.start-from MIDDLE [DESCENDER / 2]
|
|
||||||
:.set-width HALFSTROKE HALFSTROKE
|
|
||||||
:.line-to MIDDLE HALFSTROKE
|
|
||||||
:.to-outline
|
|
||||||
}
|
}
|
|
@ -812,9 +812,9 @@ create-glyph 'r' : glyph-construction {
|
||||||
local ssmootha [SMOOTHA * 0.87]
|
local ssmootha [SMOOTHA * 0.87]
|
||||||
|
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
:.start-from [RIGHTSB - OXHOOK + JBALANCE / 2] [XH - RHOOK]
|
:.start-from [RIGHTSB + JBALANCE / 2] [XH - RHOOK]
|
||||||
:.set-width STROKE 0
|
:.set-width STROKE 0
|
||||||
:.curve-to [MIDDLE + BKAPPA * [MIDDLE - para.sb] + JBALANCE / 2] XO [MIDDLE + JBALANCE * 0.75] XO
|
:.curve-to [MIDDLE + KAPPA_AHOOK * [MIDDLE - para.sb] + JBALANCE / 2] XO [MIDDLE + JBALANCE * 0.75] XO
|
||||||
:.heads-to LEFTWARD
|
:.heads-to LEFTWARD
|
||||||
:.to-outline
|
:.to-outline
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
### NUMBERS
|
###### NUMBERS
|
||||||
|
|
||||||
create-glyph 'zero.slashed' : glyph-construction {
|
create-glyph 'zero.slashed' : glyph-construction {
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
|
@ -158,6 +158,51 @@ create-glyph 'six' : glyph-construction {
|
||||||
:.to-outline
|
:.to-outline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create-glyph 'seven' : glyph-construction {
|
||||||
|
set-width WIDTH
|
||||||
|
assign-unicode '7'
|
||||||
|
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from SB CAP :.heads-to RIGHTWARD :.set-width 0 STROKE
|
||||||
|
:.line-to RIGHTSB CAP :.heads-to RIGHTWARD :.to-outline
|
||||||
|
|
||||||
|
local cor 1.15
|
||||||
|
local x : mix SB RIGHTSB 0.15
|
||||||
|
|
||||||
|
start-from x 0
|
||||||
|
line-to [x + STROKE * cor] 0
|
||||||
|
line-to RIGHTSB [CAP - STROKE]
|
||||||
|
line-to [RIGHTSB - STROKE * cor] [CAP - STROKE]
|
||||||
|
reverse-last
|
||||||
|
}
|
||||||
|
|
||||||
|
create-glyph 'eight' : glyph-construction {
|
||||||
|
set-width WIDTH
|
||||||
|
assign-unicode '8'
|
||||||
|
|
||||||
|
local sma : SMOOTHA * 0.975
|
||||||
|
local smb : SMOOTHB * 0.975
|
||||||
|
|
||||||
|
put-shapes : sStrand [CAP - sma] sma
|
||||||
|
put-shapes : sStrand smb [CAP - smb]
|
||||||
|
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from RIGHTSB [CAP - smb]
|
||||||
|
:.set-width STROKE 0
|
||||||
|
:.arc-vh-to MIDDLE [CAP - O]
|
||||||
|
:.heads-to LEFTWARD
|
||||||
|
:.arc-hv-to SB [CAP - sma]
|
||||||
|
:.to-outline
|
||||||
|
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from SB smb
|
||||||
|
:.set-width STROKE 0
|
||||||
|
:.arc-vh-to MIDDLE O
|
||||||
|
:.heads-to RIGHTWARD
|
||||||
|
:.arc-hv-to RIGHTSB sma
|
||||||
|
:.to-outline
|
||||||
|
}
|
||||||
|
|
||||||
create-glyph 'nine' : glyph-construction {
|
create-glyph 'nine' : glyph-construction {
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
assign-unicode '9'
|
assign-unicode '9'
|
||||||
|
|
2
makefile
2
makefile
|
@ -1,5 +1,5 @@
|
||||||
SUPPORT_FILES = support/glyph.js support/stroke.js parameters.js
|
SUPPORT_FILES = support/glyph.js support/stroke.js parameters.js
|
||||||
GLYPH_SEGMENTS = glyphs/common-shapes.patel glyphs/latin-capital.patel glyphs/latin-lower.patel glyphs/numbers.patel
|
GLYPH_SEGMENTS = glyphs/common-shapes.patel glyphs/latin-capital.patel glyphs/latin-lower.patel glyphs/numbers.patel glyphs/ascii-symbols.patel
|
||||||
OBJDIR = build
|
OBJDIR = build
|
||||||
|
|
||||||
FILES = $(SUPPORT_FILES) buildglyphs.js
|
FILES = $(SUPPORT_FILES) buildglyphs.js
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
r0_bold['hook'] = 150;
|
r0_bold['hook'] = 150;
|
||||||
r0_bold['ahook'] = 100;
|
r0_bold['ahook'] = 100;
|
||||||
r0_bold['smooth'] = 200;
|
r0_bold['smooth'] = 200;
|
||||||
r0_bold['oxhook'] = 0;
|
r0_bold['oxhook'] = -10;
|
||||||
r0_bold['kappa_hook'] = 0.7;
|
r0_bold['kappa_hook'] = 0.7;
|
||||||
r0_bold['kappa_ahook'] = 0.6;
|
r0_bold['kappa_ahook'] = 0.6;
|
||||||
r0_bold['jbalance'] = 60;
|
r0_bold['jbalance'] = 60;
|
||||||
|
|
|
@ -45,7 +45,7 @@ bold.barpos = 0.42
|
||||||
bold.hook = 150
|
bold.hook = 150
|
||||||
bold.ahook = 100
|
bold.ahook = 100
|
||||||
bold.smooth = 200
|
bold.smooth = 200
|
||||||
bold.oxhook = 0
|
bold.oxhook = [-10]
|
||||||
bold.kappa_hook = 0.7
|
bold.kappa_hook = 0.7
|
||||||
bold.kappa_ahook = 0.60
|
bold.kappa_ahook = 0.60
|
||||||
bold.jbalance = 60
|
bold.jbalance = 60
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue