Merge branch 'dev'

This commit is contained in:
Belleve Invis 2019-08-24 21:05:20 -07:00
commit 62eb8787bb
32 changed files with 3748 additions and 3470 deletions

View file

@ -111,9 +111,9 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
- All glyphs wider than one letter would be deleted. - All glyphs wider than one letter would be deleted.
- In case of your OS or editor cannot handle ligatures correctly, you can disable ligations with it. - In case of your OS or editor cannot handle ligatures correctly, you can disable ligations with it.
- `termlig` : Similar to `term`, the font is exact monospace to make `fontconfig` happy, while ligations are still present. - `termlig` : Similar to `term`, the font is exact monospace to make `fontconfig` happy, while ligations are still present.
- `nolig` : Disable ligation only. - `no-ligation` : Disable ligation only.
- `type` : Make some symbols, like arrows (`→`) and mathematical operators full-width. - `no-cv-ss` : Prevent generation of `cv##` and `ss##` features.
- `stress-fw` : When included, full-width characters varying form `U+FF00` to `U+FFFF` will be boxed to present a clear distinguish between ASCII and Full-width. - `type` : Make some symbols, like arrows (`→`) full-width.
* All registered `ss##` and `cv##` feature tags, including: * All registered `ss##` and `cv##` feature tags, including:
* `ss01`~`ss10` : Predefined stylistic sets based on other Monospace fonts. * `ss01`~`ss10` : Predefined stylistic sets based on other Monospace fonts.
* `cv01`~`cv53` : Standalone character variants. * `cv01`~`cv53` : Standalone character variants.

View file

@ -123,16 +123,26 @@ design = ["term", "ss11"]
[buildPlans.iosevka-aile] [buildPlans.iosevka-aile]
family = "Iosevka Aile" family = "Iosevka Aile"
design = ["type", "shape-straight-bar", "diversity-1", "v-at-fourfold", "v-j-straight", 'v-capital-i-straight', 'v-capital-j-straight'] design = ["type", "shape-straight-bar", "v-at-fourfold", "v-j-narrow", 'v-capital-i-straight', 'v-capital-j-straight', 'v-g-singlestorey', 'v-r-narrow', "no-cv-ss", "no-ligation"]
upright = ["v-i-line", "v-l-line"] upright = ["v-i-line", "v-l-line", 'v-f-narrow', 'v-t-narrow']
italic = ["v-i-tailed", "v-l-tailed"] italic = ["v-i-line", "v-l-line", 'v-f-narrow', 'v-t-narrow']
[buildPlans.iosevka-aile.post]
design = ['wd-expanded', "diversity-2"]
[buildPlans.iosevka-etoile] [buildPlans.iosevka-etoile]
family = "Iosevka Etoile" family = "Iosevka Etoile"
design = ["type", "slab", "shape-straight-bar", "diversity-1", "v-at-fourfold", 'v-j-serifed'] design = ["type", "slab", "shape-straight-bar", "diversity-1", "v-at-fourfold", 'v-j-serifed', 'no-cv-ss', "no-cv-ss", "no-ligation"]
upright = ['v-i-serifed', 'v-l-serifed'] upright = ['v-i-serifed', 'v-l-serifed']
italic = ['v-i-italic', 'v-l-italic'] italic = ['v-i-italic', 'v-l-italic']
[buildPlans.iosevka-extended]
family = "Iosevka Extended"
design = ["shape-straight-bar"]
[buildPlans.iosevka-extended.post]
design = ['wd-expanded']
# Export plans # Export plans
# This mapping affects the process of creating ZIP archives only # This mapping affects the process of creating ZIP archives only
[exportPlans] [exportPlans]
@ -166,6 +176,9 @@ iosevka-ss10 = "iosevka-ss10"
iosevka-term-ss10 = "iosevka-term-ss10" iosevka-term-ss10 = "iosevka-term-ss10"
iosevka-ss11 = "iosevka-ss11" iosevka-ss11 = "iosevka-ss11"
iosevka-term-ss11 = "iosevka-term-ss11" iosevka-term-ss11 = "iosevka-term-ss11"
experimental-iosevka-aile = "iosevka-aile"
experimental-iosevka-extended = "iosevka-extended"
experimental-iosevka-etoile = "iosevka-etoile"
# TTC collection plans # TTC collection plans
[collectPlans.iosevka] [collectPlans.iosevka]

View file

@ -41,7 +41,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
return nothing return nothing
define metrics : calculateMetrics para define metrics : calculateMetrics para
define [object globalTransform MIDDLE CAP XH SB RIGHTSB CONTRAST STROKE SUPERNESS WIDTH TANSLANT OVERLAYPOS DESCENDER MVERTSTROKE_D symbolMid parenTop parenBot operTop operBot plusTop plusBot tackTop tackBot] metrics define [object globalTransform UPM MIDDLE CAP XH SB RIGHTSB CONTRAST STROKE SUPERNESS WIDTH TANSLANT OVERLAYPOS DESCENDER MVERTSTROKE_D symbolMid parenTop parenBot operTop operBot plusTop plusBot tackTop tackBot adviceBlackness] metrics
# Anchor parameters # Anchor parameters
define [object MARK BASE] Anchor define [object MARK BASE] Anchor
@ -94,13 +94,17 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
define markset : MarksetDiv 1 define markset : MarksetDiv 1
define [DivFrame _div] : begin define [DivFrame _div _hPack] : begin
local div : fallback _div 1 local div : fallback _div 1
local hPack : Math.max 2 [fallback _hPack 0]
local sbMul : Math.min 1 : (WIDTH * div - hPack * [adviceBlackness hPack div]) / (2 * hPack * SB)
return : object return : object
div div div div
width : WIDTH * div width : WIDTH * div
middle : MIDDLE * div middle : MIDDLE * div
rightSB : WIDTH * div - SB sb : SB * sbMul
leftSB : SB * sbMul
rightSB : WIDTH * div - SB * sbMul
mvs : MVERTSTROKE_D div mvs : MVERTSTROKE_D div
markSet: MarksetDiv div markSet: MarksetDiv div
@ -198,8 +202,9 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
# Space # Space
sketch # space sketch # space
set-width WIDTH local df : DivFrame para.diversityF
include markset.e set-width df.width
include df.markSet.e
save 'space' ' ' save 'space' ' '
# IDKY, but wrapping "metrics" prevents Node.js on Arch modifying it. # IDKY, but wrapping "metrics" prevents Node.js on Arch modifying it.

View file

@ -298,7 +298,7 @@ export : define [apply] : begin
local pendingGlyphs : records.map : [record] => record.1 local pendingGlyphs : records.map : [record] => record.1
return : Miniature return : Miniature
glyphs -- [pendingGlyphs.reduce : [a b] => [a.concat b]] glyphs -- [pendingGlyphs.reduce : [a b] => [a.concat b]]
crowd -- [fallback para.smallCrowd 3.75] crowd -- 5
scale -- 0.65 scale -- 0.65
unfair -- true unfair -- true
@ -503,9 +503,10 @@ export : define [apply] : begin
local pendingGlyphs : records.map : [record] => record.1 local pendingGlyphs : records.map : [record] => record.1
local miniatureFont : Miniature local miniatureFont : Miniature
glyphs -- pendingGlyphs glyphs -- pendingGlyphs
crowd -- [fallback para.smallCrowd 3.5] crowd -- 4
scale -- 0.7 scale -- 0.7
unfair -- true unfair -- true
mono -- true
foreach {unicode glyphid pri} [items-of records] : create-glyph [suggestName : 'sup' + glyphid] : glyph-construction foreach {unicode glyphid pri} [items-of records] : create-glyph [suggestName : 'sup' + glyphid] : glyph-construction
if unicode : assign-unicode unicode if unicode : assign-unicode unicode
local middle : miniatureFont.(glyphid).advanceWidth / 2 local middle : miniatureFont.(glyphid).advanceWidth / 2
@ -522,9 +523,10 @@ export : define [apply] : begin
local pendingGlyphs : records.map : [record] => record.1 local pendingGlyphs : records.map : [record] => record.1
local miniatureFont : Miniature local miniatureFont : Miniature
glyphs -- pendingGlyphs glyphs -- pendingGlyphs
crowd -- [fallback para.smallCrowd 3.5] crowd -- 4
scale -- 0.7 scale -- 0.7
unfair -- true unfair -- true
mono -- true
foreach {unicode glyphid pri} [items-of records] : create-glyph [suggestName : 'sub' + glyphid] : glyph-construction foreach {unicode glyphid pri} [items-of records] : create-glyph [suggestName : 'sub' + glyphid] : glyph-construction
if unicode : assign-unicode unicode if unicode : assign-unicode unicode
local middle : miniatureFont.(glyphid).advanceWidth / 2 local middle : miniatureFont.(glyphid).advanceWidth / 2
@ -543,6 +545,10 @@ export : define [apply] : begin
set forkedParams.cap0 para.cap set forkedParams.cap0 para.cap
set forkedParams.cap XH set forkedParams.cap XH
set forkedParams.xheight (XH * XH / CAP) set forkedParams.xheight (XH * XH / CAP)
set forkedParams.diversityM 1
set forkedParams.diversityF 1
set forkedParams.diversityI 1
set forkedParams.diversityII 1
local sf : Fork pendingGlyphs forkedParams local sf : Fork pendingGlyphs forkedParams
foreach {unicode glyphid tfm} [items-of records] : create-glyph [suggestName : 'smcp' + glyphid] : glyph-construction foreach {unicode glyphid tfm} [items-of records] : create-glyph [suggestName : 'smcp' + glyphid] : glyph-construction
if unicode : assign-unicode unicode if unicode : assign-unicode unicode
@ -554,9 +560,10 @@ export : define [apply] : begin
local pendingGlyphs : records.map : [record] => record.1 local pendingGlyphs : records.map : [record] => record.1
local miniatureFont : Miniature local miniatureFont : Miniature
glyphs -- pendingGlyphs glyphs -- pendingGlyphs
crowd -- [fallback para.smallCrowd2 3.5] crowd -- 4
scale -- 0.7 scale -- 0.7
unfair -- true unfair -- true
mono -- true
foreach {unicode glyphid} [items-of records] : create-glyph [suggestName : 'comb' + glyphid] : glyph-construction foreach {unicode glyphid} [items-of records] : create-glyph [suggestName : 'comb' + glyphid] : glyph-construction
set-width 0 set-width 0
if unicode : assign-unicode unicode if unicode : assign-unicode unicode
@ -924,9 +931,9 @@ export : define [apply] : begin
if wide : begin if wide : begin
sketch sketch
include df2.(c2) include df2.(c2)
include : Translate WIDTH 0 include : Translate df1.(c1).advanceWidth 0
include df1.(c1) include df1.(c1)
set-width UPM set-width (df1.(c1).advanceWidth + df2.(c2).advanceWidth)
save glyphName unicode save glyphName unicode
: else : else
local kern : SB * 7/8 * (shrink1 + shrink2) local kern : SB * 7/8 * (shrink1 + shrink2)
@ -984,7 +991,7 @@ export : define [apply] : begin
list 0xAE {'R'} FULLWIDTH2 list 0xAE {'R'} FULLWIDTH2
list 0x2117 {'P'} FULLWIDTH2 list 0x2117 {'P'} FULLWIDTH2
list 0x24EA {'zero'} FULLWIDTH1 list 0x24EA {'zero'} FULLWIDTH1
if [not para.disableVariants] : compositions.push { null {'space'} FULLWIDTH1 } compositions.push { null {'space'} FULLWIDTH1 }
foreach [j : range 1 till 20] : compositions.push : list foreach [j : range 1 till 20] : compositions.push : list
0x2460 + j - 1 0x2460 + j - 1
[(j+'').split ''].map : c => unicodeGlyphs.(['0'.charCodeAt 0] + (c - 0)).name [(j+'').split ''].map : c => unicodeGlyphs.(['0'.charCodeAt 0] + (c - 0)).name
@ -1017,7 +1024,7 @@ export : define [apply] : begin
if [not recursive] : let : begin if [not recursive] : let : begin
local compositions {} local compositions {}
if [not para.disableVariants] : compositions.push { null {'space'} FULLWIDTH1 } compositions.push { null {'space'} FULLWIDTH1 }
foreach [j : range 0 26] : compositions.push {(0x1F130 + j) {unicodeGlyphs.(['A'.charCodeAt 0] + j).name} FULLWIDTH1} foreach [j : range 0 26] : compositions.push {(0x1F130 + j) {unicodeGlyphs.(['A'.charCodeAt 0] + j).name} FULLWIDTH1}
createBoxedGlyphs compositions createBoxedGlyphs compositions
@ -1028,7 +1035,7 @@ export : define [apply] : begin
if [not recursive] : let : begin if [not recursive] : let : begin
local compositions {} local compositions {}
if [not para.disableVariants] : compositions.push { null {'space'} FULLWIDTH1 } compositions.push { null {'space'} FULLWIDTH1 }
foreach [j : range 1 till 10] : compositions.push : list foreach [j : range 1 till 10] : compositions.push : list
0x24F5 + j - 1 0x24F5 + j - 1
[(j+'').split ''].map : c => unicodeGlyphs.(['0'.charCodeAt 0] + (c - 0)).name [(j+'').split ''].map : c => unicodeGlyphs.(['0'.charCodeAt 0] + (c - 0)).name
@ -1037,7 +1044,7 @@ export : define [apply] : begin
if [not recursive] : let : begin if [not recursive] : let : begin
local compositions {} local compositions {}
if [not para.disableVariants] : compositions.push { null {'space'} FULLWIDTH1 } compositions.push { null {'space'} FULLWIDTH1 }
foreach [j : range 1 till 20] : compositions.push : list foreach [j : range 1 till 20] : compositions.push : list
0x2474 + j - 1 0x2474 + j - 1
[(j+'').split ''].map : c => unicodeGlyphs.(['0'.charCodeAt 0] + (c - 0)).name [(j+'').split ''].map : c => unicodeGlyphs.(['0'.charCodeAt 0] + (c - 0)).name
@ -1103,14 +1110,6 @@ export : define [apply] : begin
if para.fullwidth_codes : foreach [j : items-of para.fullwidth_codes] : begin if para.fullwidth_codes : foreach [j : items-of para.fullwidth_codes] : begin
if (unicodeGlyphs.(j) && unicodeGlyphs.(j).advanceWidth < 1000) : begin if (unicodeGlyphs.(j) && unicodeGlyphs.(j).advanceWidth < 1000) : begin
a.push {j unicodeGlyphs.(j).name} a.push {j unicodeGlyphs.(j).name}
if (!para.noCJKV || para.makeFFXX) : begin
foreach [j : range 1 0x5f] : begin
if [not unicodeGlyphs.(0xff00 + j)] : begin
a.push {(0xff00 + j) unicodeGlyphs.(0x20 + j).name}
a.push {0xFFE0 'cent'}
a.push {0xFFE1 'sterling'}
a.push {0xFFE5 'yen'}
* a * a
if para.stressFW : begin if para.stressFW : begin

View file

@ -18,15 +18,15 @@ export : define [apply] : begin
set introduced true set introduced true
return : if introduced fs null return : if introduced fs null
define [select-variant name unicode altname altmap] : begin define [select-variant] : params [name unicode [to-name name] transform [follow name]] : begin
if (pickHash && [not pickHash.(name)]) : return nothing if (pickHash && [not pickHash.(name)]) : return nothing
local variant : variantSelector.(name) || para.defaultVariant.(name) local variant : variantSelector.(follow) || para.defaultVariant.(follow)
if [not variant] : begin if [not variant] : begin
throw : new Error "Variant for \(name) is not assigned." throw : new Error "Variant for \(name) is not assigned."
if (altmap && altmap.(variant)) : set variant altmap.(variant) if (transform && transform.(variant)) : set variant transform.(variant)
local chosenGlyph glyphs.((name + '.' + variant)) local chosenGlyph glyphs.((name + '.' + variant))
create-glyph [fallback altname name] : glyph-construction create-glyph [fallback to-name name] : glyph-construction
include chosenGlyph AS_BASE ALSO_METRICS include chosenGlyph AS_BASE ALSO_METRICS
if unicode : assign-unicode unicode if unicode : assign-unicode unicode
set currentGlyph.featureSelector : queryFeatureSelector name para set currentGlyph.featureSelector : queryFeatureSelector name para
@ -282,25 +282,25 @@ export : define [apply] : begin
define [LeftwardTopSerif x y length _sw] : glyph-construction define [LeftwardTopSerif x y length _sw] : glyph-construction
local sw : fallback _sw STROKE local sw : fallback _sw STROKE
include : dispiro include : dispiro
flat (x + HALFSTROKE * HVCONTRAST) y [widths.heading sw 0 LEFTWARD] flat (x + sw / 2 * HVCONTRAST) y [widths.heading sw 0 LEFTWARD]
curl (x - length - TANSLANT * (sw * SERIF_SHIFT_X)) y curl (x - length - TANSLANT * (sw * SERIF_SHIFT_X)) y
define [LeftwardBottomSerif x y length _sw] : glyph-construction define [LeftwardBottomSerif x y length _sw] : glyph-construction
local sw : fallback _sw STROKE local sw : fallback _sw STROKE
include : dispiro include : dispiro
flat (x + HALFSTROKE * HVCONTRAST) y [widths.heading 0 sw LEFTWARD] flat (x + sw / 2 * HVCONTRAST) y [widths.heading 0 sw LEFTWARD]
curl (x - length + TANSLANT * (sw * SERIF_SHIFT_X)) y curl (x - length + TANSLANT * (sw * SERIF_SHIFT_X)) y
define [RightwardTopSerif x y length _sw] : glyph-construction define [RightwardTopSerif x y length _sw] : glyph-construction
local sw : fallback _sw STROKE local sw : fallback _sw STROKE
include : dispiro include : dispiro
flat (x - HALFSTROKE * HVCONTRAST) y [widths.heading 0 sw RIGHTWARD] flat (x - sw / 2 * HVCONTRAST) y [widths.heading 0 sw RIGHTWARD]
curl (x + length - TANSLANT * (sw * SERIF_SHIFT_X)) y curl (x + length - TANSLANT * (sw * SERIF_SHIFT_X)) y
define [RightwardBottomSerif x y length _sw] : glyph-construction define [RightwardBottomSerif x y length _sw] : glyph-construction
local sw : fallback _sw STROKE local sw : fallback _sw STROKE
include : dispiro include : dispiro
flat (x - HALFSTROKE * HVCONTRAST) y [widths.heading sw 0 RIGHTWARD] flat (x - sw / 2 * HVCONTRAST) y [widths.heading sw 0 RIGHTWARD]
curl (x + length + TANSLANT * (sw * SERIF_SHIFT_X)) y curl (x + length + TANSLANT * (sw * SERIF_SHIFT_X)) y
define [CenterTopSerif x y length _sw] : glyph-construction define [CenterTopSerif x y length _sw] : glyph-construction
@ -416,8 +416,6 @@ export : define [apply] : begin
curl rightx righty curl rightx righty
end [function : set this.cleanmore true] end [function : set this.cleanmore true]
define [xStrand _leftx lefty _rightx righty turn straight tension] : glyph-construction define [xStrand _leftx lefty _rightx righty turn straight tension] : glyph-construction
local middlex : mix _leftx _rightx 0.5 local middlex : mix _leftx _rightx 0.5
local middley : mix lefty righty 0.5 local middley : mix lefty righty 0.5
@ -445,7 +443,7 @@ export : define [apply] : begin
define [mShoulderSpiro] : params [left right top bottom width fine diversity] : glyph-construction define [mShoulderSpiro] : params [left right top bottom width fine diversity] : glyph-construction
local fix : TANSLANT * STROKE * HVCONTRAST * width / STROKE local fix : TANSLANT * STROKE * HVCONTRAST * width / STROKE
local sm : SMALLSMOOTH * 0.7 local sm : SMALLSMOOTH * 0.7 * [fallback diversity 1]
include : spiro-outline include : spiro-outline
corner (right - width * HVCONTRAST) bottom corner (right - width * HVCONTRAST) bottom
curl (right - width * HVCONTRAST) (top - sm + fix) curl (right - width * HVCONTRAST) (top - sm + fix)
@ -670,7 +668,7 @@ export : define [apply] : begin
: else : throw ex : else : throw ex
return forkFont.glyfMap return forkFont.glyfMap
define [Miniature] : params [glyphs crowd scale [slantAngle para.slantAngle] unfair [sbscale 0.5]] : begin define [Miniature] : params [glyphs crowd scale [slantAngle para.slantAngle] unfair [sbscale (WIDTH / UPM)] [mono false]] : begin
local forkedPara : Object.create para local forkedPara : Object.create para
forkedPara.stroke = [adviceBlackness crowd] / scale forkedPara.stroke = [adviceBlackness crowd] / scale
forkedPara.ess = para.ess * forkedPara.stroke / para.stroke forkedPara.ess = para.ess * forkedPara.stroke / para.stroke
@ -679,6 +677,8 @@ export : define [apply] : begin
forkedPara.sb = SB * sbscale forkedPara.sb = SB * sbscale
forkedPara.slantAngle = slantAngle forkedPara.slantAngle = slantAngle
forkedPara.unfair = unfair forkedPara.unfair = unfair
if mono : begin
forkedPara.diversityM = 1
return : Fork glyphs forkedPara return : Fork glyphs forkedPara
define [Thinner glyphs p] : begin define [Thinner glyphs p] : begin
@ -688,9 +688,6 @@ export : define [apply] : begin
forkedPara.jut = JUT * p forkedPara.jut = JUT * p
forkedPara.longjut = LONGJUT * p forkedPara.longjut = LONGJUT * p
forkedPara.diversityM = 1 forkedPara.diversityM = 1
forkedPara.diversityM = 1
forkedPara.diversityI = 1
forkedPara.diversityF = 1
#forkedPara.hookx = HOOKX * p #forkedPara.hookx = HOOKX * p
return : Fork glyphs forkedPara return : Fork glyphs forkedPara

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -754,18 +754,19 @@ export : define [apply] : begin
set-width 0 set-width 0
set-anchor 'below' MARK markMiddle 0 markMiddle belowMarkBot set-anchor 'below' MARK markMiddle 0 markMiddle belowMarkBot
local hsw : [adviceBlackness 3.5] / STROKE * markHalfStroke
local extend : (belowMarkTop - belowMarkBot - markHalfStroke) * 1.25 local extend : (belowMarkTop - belowMarkBot - markHalfStroke) * 1.25
include : dispiro include : dispiro
g4.down.start (markMiddle - extend) belowMarkTop [widths.heading markHalfStroke markHalfStroke DOWNWARD] g4.down.start (markMiddle - extend) belowMarkTop [widths.heading hsw hsw DOWNWARD]
arcvh arcvh
g4.right.mid [mix markMiddle (markMiddle - extend) 0.5] (belowMarkBot + markHalfStroke) [heading RIGHTWARD] g4.right.mid [mix markMiddle (markMiddle - extend) 0.5] (belowMarkBot + hsw) [heading RIGHTWARD]
archv archv
g4.up.end markMiddle belowMarkTop [heading UPWARD] g4.up.end markMiddle belowMarkTop [heading UPWARD]
include : dispiro include : dispiro
g4.down.start markMiddle belowMarkTop [widths.heading markHalfStroke markHalfStroke DOWNWARD] g4.down.start markMiddle belowMarkTop [widths.heading hsw hsw DOWNWARD]
arcvh arcvh
g4.right.mid [mix markMiddle (markMiddle + extend) 0.5] (belowMarkBot + markHalfStroke) [heading RIGHTWARD] g4.right.mid [mix markMiddle (markMiddle + extend) 0.5] (belowMarkBot + hsw) [heading RIGHTWARD]
archv archv
g4.up.end (markMiddle + extend) belowMarkTop [heading UPWARD] g4.up.end (markMiddle + extend) belowMarkTop [heading UPWARD]
@ -1177,13 +1178,14 @@ export : define [apply] : begin
local fine : 0.3 * OVERLAYSTROKE local fine : 0.3 * OVERLAYSTROKE
local dx : WIDTH * 0 local dx : WIDTH * 0
local dy : WIDTH * 0.3 local dy : WIDTH * 0.3
local gap : Math.max (fine * 2) (WIDTH / 8)
set-anchor 'slash' MARK markMiddle (XH / 2) markMiddle (XH / 2) set-anchor 'slash' MARK markMiddle (XH / 2) markMiddle (XH / 2)
include : dispiro include : dispiro
flat (MIDDLE - dx - WIDTH - fine * 2) (XH / 2 - dy) [widths fine fine] flat (MIDDLE - dx - WIDTH - gap) (XH / 2 - dy) [widths fine fine]
curl (MIDDLE + dx - WIDTH - fine * 2) (XH / 2 + dy) curl (MIDDLE + dx - WIDTH - gap) (XH / 2 + dy)
include : dispiro include : dispiro
flat (MIDDLE - dx - WIDTH + fine * 2) (XH / 2 - dy) [widths fine fine] flat (MIDDLE - dx - WIDTH + gap) (XH / 2 - dy) [widths fine fine]
curl (MIDDLE + dx - WIDTH + fine * 2) (XH / 2 + dy) curl (MIDDLE + dx - WIDTH + gap) (XH / 2 + dy)
save 'arrDblVStrokeOver' save 'arrDblVStrokeOver'
sketch # slashOver sketch # slashOver

View file

@ -280,7 +280,7 @@ export : define [apply] : begin
arrow ArrowShape 'arrowrightSK' null (arrowSB + fine / 2) symbolMid arrowRSB symbolMid arrow ArrowShape 'arrowrightSK' null (arrowSB + fine / 2) symbolMid arrowRSB symbolMid
arrow ArrowShape 'arrowupSK' null arrowMidX (arrowBot + fine / 2) arrowMidX arrowTop arrow ArrowShape 'arrowupSK' null arrowMidX (arrowBot + fine / 2) arrowMidX arrowTop
arrow ArrowShape 'arrowdownSK' null arrowMidX (arrowTop - fine / 2) arrowMidX arrowBot arrow ArrowShape 'arrowdownSK' null arrowMidX (arrowTop - fine / 2) arrowMidX arrowBot
arrow ArrowShape 'arrowupleftTK' null arrowRSB arrowBot arrowSB (arrowTop - fine * 1.5) arrow ArrowShape 'arrowupleftTK' null arrowRSB arrowBot arrowSB (arrowTop - [Math.max (arrowWidth / 8) (fine * 1.5)])
composite 'arrowbarleft' glyphs.arrowleftK [VBar arrowSB (symbolMid - arrowSize) (symbolMid + arrowSize) fine] [into-unicode 0x21E4] composite 'arrowbarleft' glyphs.arrowleftK [VBar arrowSB (symbolMid - arrowSize) (symbolMid + arrowSize) fine] [into-unicode 0x21E4]
composite 'arrowbarright' glyphs.arrowrightK [VBar arrowRSB (symbolMid - arrowSize) (symbolMid + arrowSize) fine] [into-unicode 0x21E5] composite 'arrowbarright' glyphs.arrowrightK [VBar arrowRSB (symbolMid - arrowSize) (symbolMid + arrowSize) fine] [into-unicode 0x21E5]

View file

@ -181,9 +181,11 @@ export : define [apply] : begin
save 'liraSymbol' 0x20A4 save 'liraSymbol' 0x20A4
sketch # won sketch # won
include glyphs.W AS_BASE local df : DivFrame para.diversityM
include : HOverlayBar [mix SB 0 0.7] [mix RIGHTSB WIDTH 0.7] (CAP * 0.6) set-width df.width
include : HOverlayBar [mix SB 0 0.7] [mix RIGHTSB WIDTH 0.7] (CAP * 0.35) include glyphs.W AS_BASE ALSO_METRICS
include : HOverlayBar [mix SB 0 0.7] [mix df.rightSB df.width 0.7] (CAP * 0.6)
include : HOverlayBar [mix SB 0 0.7] [mix df.rightSB df.width 0.7] (CAP * 0.35)
save 'won' 0x20A9 save 'won' 0x20A9
sketch # frenchFranc sketch # frenchFranc

View file

@ -15,9 +15,11 @@ export : define [apply] : begin
save 'micro' 0xB5 save 'micro' 0xB5
sketch # forall sketch # forall
include : LambdaShape OPERATORSTROKE include : LambdaShape CAP OPERATORSTROKE para.straightBar
eject-contour 'serif' eject-contour 'serif'
include : HBar (SB + OPERATORSTROKE) (RIGHTSB - OPERATORSTROKE) (XH / 2) OPERATORSTROKE include : intersection
DeltaMaskShape CAP OPERATORSTROKE para.straightBar
HBar 0 WIDTH (XH / 2) OPERATORSTROKE
include : FlipAround MIDDLE (CAP / 2) include : FlipAround MIDDLE (CAP / 2)
save 'forall' 0x2200 save 'forall' 0x2200
@ -44,10 +46,7 @@ export : define [apply] : begin
sketch # increment sketch # increment
include markset.capital include markset.capital
include : LambdaShape OPERATORSTROKE include : DeltaShape CAP OPERATORSTROKE para.straightBar
eject-contour 'serif'
include : HBarBottom (SB + (OPERATORSTROKE / 2)) (RIGHTSB - (OPERATORSTROKE / 2)) 0 OPERATORSTROKE
save 'increment' 0x2206 save 'increment' 0x2206
turned 'nabla' 0x2207 'increment' MIDDLE (CAP / 2) turned 'nabla' 0x2207 'increment' MIDDLE (CAP / 2)

View file

@ -232,7 +232,7 @@ export : define [apply] : begin
include : VBarLeft (l + hsp) (nsBot - (MIDDLE - l - hsp) * skew) (nsTop - (MIDDLE - l - hsp) * skew) fine include : VBarLeft (l + hsp) (nsBot - (MIDDLE - l - hsp) * skew) (nsTop - (MIDDLE - l - hsp) * skew) fine
include : VBarRight (r - hsp) (nsBot - (MIDDLE - r + hsp) * skew) (nsTop - (MIDDLE - r + hsp) * skew) fine include : VBarRight (r - hsp) (nsBot - (MIDDLE - r + hsp) * skew) (nsTop - (MIDDLE - r + hsp) * skew) fine
save-glyph 'flatTone' 0x266D : sketch save-glyph 'flatTone' 0x266D : sketch
local yTerminal : mix nsBot nsTop 0.5 local yTerminal : mix nsBot nsTop 0.55
local curly 0.65 local curly 0.65
local curly2 1.1 local curly2 1.1
local curly3 0.3 local curly3 0.3
@ -245,7 +245,7 @@ export : define [apply] : begin
widths.lhs fine widths.lhs fine
g4 l (nsBot - 1) g4 l (nsBot - 1)
alsothru 0.5 curly3 alsothru 0.5 curly3
g4.up.mid (r - O + 1) ([mix nsBot yTerminal curly] + (r - l) * skew) [widths.lhs (fine + 1)] g4.up.mid (r - O + 1) ([mix nsBot yTerminal curly] + (r - l) * skew - TANSLANT * para.smoothadjust) [widths.lhs (fine + 1)]
g4.left.mid ([mix l r 0.5] - CORRECTION_OMIDX * fine) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2 + 1) g4.left.mid ([mix l r 0.5] - CORRECTION_OMIDX * fine) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2 + 1)
g4 l (yTerminal + 1) g4 l (yTerminal + 1)
difference difference
@ -253,7 +253,7 @@ export : define [apply] : begin
corner l (nsBot - UPM) corner l (nsBot - UPM)
corner l nsBot corner l nsBot
alsothru 0.5 curly3 alsothru 0.5 curly3
g4.up.mid (r - O) ([mix nsBot yTerminal curly] + (r - l) * skew) g4.up.mid (r - O) ([mix nsBot yTerminal curly] + (r - l) * skew - TANSLANT * para.smoothadjust)
g4.left.mid ([mix l r 0.5] - CORRECTION_OMIDX * fine) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2) g4.left.mid ([mix l r 0.5] - CORRECTION_OMIDX * fine) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2)
corner l yTerminal corner l yTerminal
corner l (yTerminal + 1) corner l (yTerminal + 1)
@ -271,7 +271,7 @@ export : define [apply] : begin
corner (l - UPM) nsTop corner (l - UPM) nsTop
corner (l - UPM) (nsBot - UPM) corner (l - UPM) (nsBot - UPM)
save-glyph 'neutralTone' 0x266E : sketch save-glyph 'neutralTone' 0x266E : sketch
local k 0.25 local k : 0.25 - (STROKE * 0.25 / (nsTop - nsBot))
local kr 0.5 local kr 0.5
local ll (l + hsp * kr) local ll (l + hsp * kr)
local rr (r - hsp * kr) local rr (r - hsp * kr)
@ -487,8 +487,9 @@ export : define [apply] : begin
local startY : symbolMid - offsetY * (n - 1) / 2 local startY : symbolMid - offsetY * (n - 1) / 2
local bar : adviceBlackness n local bar : adviceBlackness n
local fine : adviceBlackness 5 local fine : adviceBlackness 5
include : HBar SB (MIDDLE - fine / 2 * HVCONTRAST) (startY + offsetY * m) bar local gap : Math.max (WIDTH / 8) (fine)
include : HBar (MIDDLE + fine / 2 * HVCONTRAST) RIGHTSB (startY + offsetY * m) bar include : HBar SB (MIDDLE - gap / 2 * HVCONTRAST) (startY + offsetY * m) bar
include : HBar (MIDDLE + gap / 2 * HVCONTRAST) RIGHTSB (startY + offsetY * m) bar
define [yang m n] : glyph-construction define [yang m n] : glyph-construction
local offsetY : (2 / 3) * (operBot - operTop) / n local offsetY : (2 / 3) * (operBot - operTop) / n

View file

@ -251,12 +251,6 @@ export : define [apply] : begin
include : FlipAround MIDDLE (CAP / 2) include : FlipAround MIDDLE (CAP / 2)
save 'gnaborretni' 0x2E18 save 'gnaborretni' 0x2E18
if (!para.noCJKV) : sketch # dwquestion
set-width UPM
include : QuestionShape CAP questionBottom (UPM * 0.25) (UPM * 0.75)
include : Ring (DOTSIZE - O) O (UPM / 2 - DOTRADIUS + O) (UPM / 2 + DOTRADIUS - O) true
save 'dwquestion' 0xFF1F
sketch # questionDown sketch # questionDown
set-width WIDTH set-width WIDTH
include glyphs.question include glyphs.question
@ -551,7 +545,9 @@ export : define [apply] : begin
Italify Italify
select-variant 'asterisk' '*' select-variant 'asterisk' '*'
select-variant 'asterisk' nothing 'asterisk.dfltlow' {.high 'low' .hexhigh 'hexlow'} select-variant 'asterisk' nothing
to-name -- 'asterisk.dfltlow'
transform -- {.high 'low' .hexhigh 'hexlow'}
do "Slashes and numbersign" do "Slashes and numbersign"
define slashDefautLeft : SB + HALFSTROKE define slashDefautLeft : SB + HALFSTROKE
@ -1009,8 +1005,8 @@ export : define [apply] : begin
local m : mix l r (1 / 2) local m : mix l r (1 / 2)
local sma : SMOOTHA * 0.5 * para.diversityM local sma : SMOOTHA * 0.5 * para.diversityM
local smb : SMOOTHB * 0.5 * para.diversityM local smb : SMOOTHB * 0.5 * para.diversityM
local sw : adviceBlackness 4 para.diversityM local sw : adviceBlackness2 5 4 CAP para.diversityM
local fine : adviceBlackness 5 para.diversityM local fine : adviceBlackness2 5 5 CAP para.diversityM
local cor : HVCONTRAST / [Math.sqrt (1 - [Math.pow ((r - l - sw) / (CAP - 0)) 2])] local cor : HVCONTRAST / [Math.sqrt (1 - [Math.pow ((r - l - sw) / (CAP - 0)) 2])]
local pTerm : (fine / 2) / [Math.hypot CAP (r - l)] local pTerm : (fine / 2) / [Math.hypot CAP (r - l)]
local pFine : 1 / 2 - (STROKE / 2) / [Math.hypot CAP (r - l)] local pFine : 1 / 2 - (STROKE / 2) / [Math.hypot CAP (r - l)]
@ -1045,9 +1041,9 @@ export : define [apply] : begin
local l2 : r1 + gap local l2 : r1 + gap
local r2 : l2 + fill local r2 : l2 + fill
local l3 : r2 + gap local l3 : r2 + gap
local swp : adviceBlackness 6 local swp : adviceBlackness2 5 6.5 CAP para.diversityM
local smap : SMOOTHA * (1/3) local smap : SMOOTHA * (1/3) * para.diversityM
local smbp : SMOOTHB * (1/3) local smbp : SMOOTHB * (1/3) * para.diversityM
include : OShape otop 0 l1 r1 swp smap smbp include : OShape otop 0 l1 r1 swp smap smbp
include : OShape otop 0 l2 r2 swp smap smbp include : OShape otop 0 l2 r2 swp smap smbp
include : OShape otop 0 l3 r3 swp smap smbp include : OShape otop 0 l3 r3 swp smap smbp
@ -1079,79 +1075,3 @@ export : define [apply] : begin
alias 'mdfRevComma' 0x2BD 'revertSingleQuote' alias 'mdfRevComma' 0x2BD 'revertSingleQuote'
alias 'mdfStress' 0x2C8 'singleQuote' alias 'mdfStress' 0x2C8 'singleQuote'
turned 'mdfSecondaryStress' 0x2CC 'singleQuote' MIDDLE (XH / 2) turned 'mdfSecondaryStress' 0x2CC 'singleQuote' MIDDLE (XH / 2)
if [not para.noCJKV] : do 'Double-width punctuations'
dwc nothing 0xFF01 'exclam'
dwc nothing 0xFF1A 'colon'
dwc nothing 0xFF1B 'semicolon'
dwl nothing 0xFF0C 'comma'
dwl nothing 0xFF0E 'period'
local parenDist (WIDTH * 0.15)
dwr nothing 0xFF08 'parenLeft' (-parenDist)
dwl nothing 0xFF09 'parenRight' (parenDist)
composite 'opbdParenLeft' glyphs.parenLeft [Translate (-parenDist) 0]
composite 'opbdParenRight' glyphs.parenRight [Translate (parenDist) 0]
local r : Math.max PERIODRADIUS (WIDTH * 0.225)
local ry : r * 0.25
sketch
include : CircleDotAt MIDDLE ry (r + PERIODRADIUS * 0.5)
include : CircleDotAt MIDDLE ry (r - PERIODRADIUS * 0.4)
reverse-last
branch
set-width FULLWIDTH1
save "dwlcjkperiod" 0x3002
branch
save 'cjkperiod' 0xFF61
sketch
local k 0.9
include : dispiro
widths.center
g4 (MIDDLE - r * 1.1) (ry + r * (k - 0.2))
quadcontrols 0.5 0.45
g4 (MIDDLE + r) (ry + r * (-k - 0.35))
branch
set-width FULLWIDTH1
save "dwlcjkcomma" 0x3001
branch
save 'cjkcomma' 0xFF64
local cjkqd 0.75
local cjkqd2 0.97
local ideotop : para.ideoMid + (parenTop - symbolMid)
local ideobot : para.ideoMid - (parenTop - symbolMid)
sketch # cjkSingleQuoteLeft
include : HBarTop [mix SB RIGHTSB designParameters.bracketOutside] [mix SB RIGHTSB designParameters.bracketInside] [mix ideobot ideotop cjkqd2]
include : VBarLeft [mix SB RIGHTSB designParameters.bracketOutside] [mix ideotop ideobot cjkqd] [mix ideobot ideotop cjkqd2]
save 'cjkSingleQuoteLeft' 0xFF62
sketch # cjkSingleQuoteRight
include glyphs.cjkSingleQuoteLeft
include : FlipAround MIDDLE symbolMid
save 'cjkSingleQuoteRight' 0xFF63
sketch # cjkDoubleQuoteLeft
local sw : adviceBlackness 6
local dw : [Math.max (WIDTH * 0.175) [adviceBlackness 3.25]] + sw * 2
local outside : mix SB RIGHTSB designParameters.bracketOutside
local inside : mix SB RIGHTSB designParameters.bracketInside
local top : mix ideobot ideotop cjkqd2
local bottom : mix ideotop ideobot cjkqd
include : VBarLeft outside bottom top sw
include : HBarTop outside inside top sw
include : VBarRight inside top (top - dw) sw
include : HBarBottom outside (outside + dw) bottom sw
include : VBarRight (outside + dw) bottom (top - dw + sw) sw
include : HBarBottom (outside + dw) inside (top - dw) sw
save 'cjkDoubleQuoteLeft'
sketch # cjkSingleQuoteRight
include glyphs.cjkDoubleQuoteLeft
include : FlipAround MIDDLE symbolMid
save 'cjkDoubleQuoteRight'
dwr nothing 0x300C 'cjkSingleQuoteLeft'
dwl nothing 0x300D 'cjkSingleQuoteRight'
dwr nothing 0x300E 'cjkDoubleQuoteLeft'
dwl nothing 0x300F 'cjkDoubleQuoteRight'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 KiB

After

Width:  |  Height:  |  Size: 414 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 KiB

After

Width:  |  Height:  |  Size: 350 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 KiB

After

Width:  |  Height:  |  Size: 704 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 333 KiB

Before After
Before After

View file

@ -101,10 +101,12 @@ export : define [calculateMetrics para] : begin
define ONEBALANCE : fallback para.onebalance 0 define ONEBALANCE : fallback para.onebalance 0
# derived metrics # derived metrics
define FULLWIDTH : if (para.spacing >= 2) UPM WIDTH define NO_DIVERSITY : para.diversityM == 1 && para.diversityF == 1 && para.diversityI == 1 && para.diversityII == 1
define FULLWIDTH1 : if (para.spacing >= 1) UPM WIDTH define fullWidthRaw : if NO_DIVERSITY (WIDTH * 2) UPM
define FULLWIDTH2 : if (para.spacing >= 2) UPM WIDTH define FULLWIDTH : if (para.spacing >= 2) fullWidthRaw WIDTH
define FULLWIDTH3 : if (para.spacing >= 3) UPM WIDTH define FULLWIDTH1 : if (para.spacing >= 1) fullWidthRaw WIDTH
define FULLWIDTH2 : if (para.spacing >= 2) fullWidthRaw WIDTH
define FULLWIDTH3 : if (para.spacing >= 3) fullWidthRaw WIDTH
define OXE : OX - O define OXE : OX - O
define ESS : STROKE * [fallback para.essx CONTRAST] define ESS : STROKE * [fallback para.essx CONTRAST]
@ -134,6 +136,7 @@ export : define [calculateMetrics para] : begin
# We will estimate blackness using lower-case 'e' # We will estimate blackness using lower-case 'e'
define WHITENESS : ((XH - STROKE * 3) * (RIGHTSB - SB) * (1 / 3)) / (XH * (RIGHTSB - SB)) define WHITENESS : ((XH - STROKE * 3) * (RIGHTSB - SB) * (1 / 3)) / (XH * (RIGHTSB - SB))
define [adviceBlackness crowdedness div] : Math.min STROKE (((WIDTH * [fallback div 1]) - SB * 2) * (1 - WHITENESS) / (crowdedness * HVCONTRAST)) define [adviceBlackness crowdedness div] : Math.min STROKE (((WIDTH * [fallback div 1]) - SB * 2) * (1 - WHITENESS) / (crowdedness * HVCONTRAST))
define [adviceBlackness2 cowX cowY refH div] : Math.min [adviceBlackness cowX (refH / WIDTH)] [adviceBlackness cowY div]
define [MVERTSTROKE_D div] : adviceBlackness [fallback para.lllcrowdedness (3 + 1 / 3)] div define [MVERTSTROKE_D div] : adviceBlackness [fallback para.lllcrowdedness (3 + 1 / 3)] div
define MVERTSTROKE : MVERTSTROKE_D 1 define MVERTSTROKE : MVERTSTROKE_D 1
define OVERLAYSTROKE : adviceBlackness 3.75 define OVERLAYSTROKE : adviceBlackness 3.75
@ -144,8 +147,9 @@ export : define [calculateMetrics para] : begin
define SUPERNESS : fallback para.superness 2 define SUPERNESS : fallback para.superness 2
define [superxy x] : Math.pow (1 - [Math.pow x SUPERNESS]) (1 / SUPERNESS) define [superxy x] : Math.pow (1 - [Math.pow x SUPERNESS]) (1 / SUPERNESS)
define [adviceSSmooth y sign] : begin define [adviceSSmooth y sign _stroke] : begin
local ss : y * 0.21 + STROKE * 0.22 * [clamp 1 2 : linreg 126 1 137 1.025 STROKE] + 0.035 * (RIGHTSB - SB) local stroke : fallback _stroke STROKE
local ss : y * 0.21 + stroke * 0.22 * [clamp 1 2 : linreg 126 1 137 1.025 stroke] + 0.035 * (RIGHTSB - SB)
return : ss + sign * TANSLANT * para.smoothadjust * (ss / SMALLSMOOTH) return : ss + sign * TANSLANT * para.smoothadjust * (ss / SMALLSMOOTH)
define [adviceGlottalStopSmooth y sign] : ((y - STROKE) * 0.24 + STROKE * 0.625) + sign * TANSLANT * para.smoothadjust define [adviceGlottalStopSmooth y sign] : ((y - STROKE) * 0.24 + STROKE * 0.625) + sign * TANSLANT * para.smoothadjust
define [shoulderMidSlope _fine _stroke _dir] : 0.5 * HVCONTRAST * ([fallback _stroke STROKE] - [fallback _fine SHOULDERFINE]) / [fallback _stroke STROKE] + [fallback _dir 1] * TANSLANT define [shoulderMidSlope _fine _stroke _dir] : 0.5 * HVCONTRAST * ([fallback _stroke STROKE] - [fallback _fine SHOULDERFINE]) / [fallback _stroke STROKE] + [fallback _dir 1] * TANSLANT
@ -160,7 +164,7 @@ export : define [calculateMetrics para] : begin
TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2 TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2
FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB
MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS
WHITENESS adviceBlackness MVERTSTROKE MVERTSTROKE_D OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy WHITENESS adviceBlackness adviceBlackness2 MVERTSTROKE MVERTSTROKE_D OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy
adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope] adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope]
export : define [setFontMetrics para metrics font] : begin export : define [setFontMetrics para metrics font] : begin

View file

@ -66,12 +66,10 @@ define [buildGSUB para glyphs glyphList markGlyphs] : begin
return subtable return subtable
buildCCMP chain-rule markGlyphs commonList features lookups buildCCMP chain-rule markGlyphs commonList features lookups
if [not para.disableLigation] : do if para.enableLigation : do
define plm : progLigNameMap define plm : progLigNameMap
set plm.calt : para.customLigSet || plm.(para.defLigSet) || plm.calt set plm.calt : para.customLigSet || plm.(para.defLigSet) || plm.calt
buildLigations chain-rule lookupOrder commonList features lookups plm glyphs buildLigations chain-rule lookupOrder commonList features lookups plm glyphs
if (para.spacing > 0 && [not para.noCJKV]) : begin
buildOPBD chain-rule lookupOrder commonList features lookups
# locl, SRB # locl, SRB
local srbSubtable null local srbSubtable null
@ -107,7 +105,7 @@ define [buildGSUB para glyphs glyphList markGlyphs] : begin
set lookups.locl_bgr {.type 'gsub_single' .subtables {bgrSubtable}} set lookups.locl_bgr {.type 'gsub_single' .subtables {bgrSubtable}}
set features.locl_bgr {'locl_bgr'} set features.locl_bgr {'locl_bgr'}
if [not para.disableVariants] : begin if para.enableCvSs : begin
# cvxx # cvxx
foreach [glyph : items-of glyphList] : if glyph.featureSelector : begin foreach [glyph : items-of glyphList] : if glyph.featureSelector : begin
local fs glyph.featureSelector local fs glyph.featureSelector

View file

@ -139,9 +139,9 @@ define-macro glyph-module-entry : syntax-rules
overmarks `[define [object markExtend markHalfStroke markStress markFine markMiddle markDotsRadius aboveMarkTop aboveMarkBot aboveMarkMid belowMarkBot belowMarkTop commaOvershoot commaOvershoot2 commaAboveRadius TildeShape] $capture.overmarks] overmarks `[define [object markExtend markHalfStroke markStress markFine markMiddle markDotsRadius aboveMarkTop aboveMarkBot aboveMarkMid belowMarkBot belowMarkTop commaOvershoot commaOvershoot2 commaAboveRadius TildeShape] $capture.overmarks]
letterBasic `[define [object ISerifShape IotaShape LShape Belt VShape VHooktopShape WShape WHooktopShape YShape yBaseKnots SmallYShape KShape BShape ItalicCyrveShape PShape RShape CyrYaShape CShape GShape NShape UShape LatinUpsilon2Shape MShape SmallMShape HShape FShape fovershoot LongSShape EShape SmallEShape RevSmallEShape TShape SmallTShape] $capture.letterBasic] letterBasic `[define [object ISerifShape IotaShape LShape VShape YShape yBaseKnots SmallYShape KShape PShape NShape UShape FShape LongSShape EShape SmallEShape RevSmallEShape] $capture.letterBasic]
letterExt `[define [object LambdaShape SigmaShape PiShape EzhShape] $capture.letterExt] letterExt `[define [object LambdaShape DeltaShape DeltaMaskShape SigmaShape PiShape EzhShape] $capture.letterExt]
geometricSymbols `[define [object ArrowShape] $capture.geometricSymbols] geometricSymbols `[define [object ArrowShape] $capture.geometricSymbols]
local opts : _opts.map formOf local opts : _opts.map formOf
@ -160,7 +160,7 @@ define-macro glyph-module-entry : syntax-rules
TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2 TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2
FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB
MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS
WHITENESS adviceBlackness MVERTSTROKE MVERTSTROKE_D OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy WHITENESS adviceBlackness adviceBlackness2 MVERTSTROKE MVERTSTROKE_D OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy
adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope] metrics adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope] metrics
define [object define [object
g4 g2 corner flat curl close end straight g4 g2 corner flat curl close end straight

View file

@ -110,7 +110,7 @@ export : define [assignFontNames para metrics font] : begin
bold : not : not isBold bold : not : not isBold
italic : not : not (isItalic || isOblique) italic : not : not (isItalic || isOblique)
if (para.diversityM == 1 && para.diversityF == 1 && para.diversityI == 1) : begin if (para.diversityM == 1 && para.diversityF == 1 && para.diversityI == 1 && para.diversityII == 1) : begin
set font.OS_2.panose.3 9 # Monospaced set font.OS_2.panose.3 9 # Monospaced
set font.post.isFixedPitch true set font.post.isFixedPitch true
: else : begin : else : begin

View file

@ -11,17 +11,11 @@
"stylus": "stylus" "stylus": "stylus"
}, },
"dependencies": { "dependencies": {
"bezier-js": "^2.2.3",
"caryll-shapeops": "^0.3.1", "caryll-shapeops": "^0.3.1",
"change-case": "^3.0.2",
"colors": "^1.3.3",
"libspiro-js": "^0.3.1", "libspiro-js": "^0.3.1",
"megaminx": "^0.9.0", "megaminx": "^0.9.0",
"object-assign": "^4.1.1", "object-assign": "^4.1.1",
"otfcc-ttcize": "^0.8.0", "otfcc-ttcize": "^0.8.0",
"pad": "^1.1.0",
"patel": "^0.33.1",
"patrisika-scopes": "^0.11.1",
"primitive-quadify-off-curves": "^0.4.0", "primitive-quadify-off-curves": "^0.4.0",
"toml": "^2.3.2", "toml": "^2.3.2",
"topsort": "0.0.2", "topsort": "0.0.2",
@ -32,6 +26,9 @@
"yargs": "^12.0.0" "yargs": "^12.0.0"
}, },
"devDependencies": { "devDependencies": {
"colors": "^1.3.3",
"patel": "^0.33.1",
"patrisika-scopes": "^0.11.1",
"eslint": "^5.2.0", "eslint": "^5.2.0",
"stylus": "^0.54.5" "stylus": "^0.54.5"
} }

View file

@ -81,13 +81,17 @@ powerlineShiftX = 0 # Horizontal shift
# Full-width codes # Full-width codes
fullwidth_codes = [] fullwidth_codes = []
# Comment the line below to enable CJKV glyph generation
noCJKV = true
# Diversity widths # Diversity widths
diversityM = 1 diversityM = 1
diversityF = 1 diversityF = 1
diversityI = 1 diversityI = 1
diversityII = 1
# Whether to generate CV-SS features
enableCvSs = true
# Whether to generate ligation
enableLigation = true
[verbose] [verbose]
verbose = true verbose = true
@ -222,15 +226,12 @@ sb = 1.1
### Spacings ### Spacings
[term] [term]
spacing = 0 spacing = 0
disableLigation = true enableLigation = false
# Term variant with ligations # Term variant with ligations
[termlig] [termlig]
spacing = 0 spacing = 0
[nolig]
disableLigation = true
[type] [type]
inherits = ["xx-type"] inherits = ["xx-type"]
spacing = 2 spacing = 2
@ -244,8 +245,8 @@ spacing = 3
# HANDLE WITH EXTREME CARE # HANDLE WITH EXTREME CARE
# Expanded : I heard someone want it being wider... # Expanded : I heard someone want it being wider...
[wd-expanded.multiplies] [wd-expanded.multiplies]
width = 1.15 width = 1.152 # 576mem for normal char
sb = 1.15 sb = 1.375
[expanded] [expanded]
inherits = ['wd-expanded'] inherits = ['wd-expanded']
@ -263,7 +264,23 @@ straightBar = 1
[diversity-1] [diversity-1]
diversityM = 1.25 diversityM = 1.25
diversityF = 1.00
diversityI = 0.75 diversityI = 0.75
diversityII = 0.75
[diversity-2]
diversityM = 1.25
diversityF = 0.75
diversityI = 0.75
diversityII = 0.5
[no-ligation]
enableLigation = false
[nolig] # For compatibility
enableLigation = false
[no-cv-ss]
enableCvSs = false
###### Full-width codes ###### Full-width codes
[xx-type] [xx-type]
@ -328,10 +345,6 @@ fullwidth_codes = [
8712, #∈ 8712, #∈
] ]
# stress-fw : force distinguish full-widths
[stress-fw]
stressFW = true
# Default ligation set configuration # Default ligation set configuration
[ligset-haskell] [ligset-haskell]
defLigSet = "XHS0" defLigSet = "XHS0"

View file

@ -1,5 +1,4 @@
extern isFinite extern isFinite
import 'bezier-js' as Bezier
import './point' as Point import './point' as Point
import './transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse] import './transform' as : Transform && [object [transformPoint tp] [untransform utp] inverse]
import './anchor' as Anchor import './anchor' as Anchor

View file

@ -259,30 +259,40 @@ permille = "rings"
basepoint = "rings" basepoint = "rings"
tag = "cv63" tag = "cv63"
# "Untagged" variants, used for Aile, etc.
[simple.v-i-tailed] [simple.v-i-tailed]
dotlessi = 'tailed' dotlessi = 'tailed'
tag = "cv64"
[simple.v-j-straight] [simple.v-j-straight]
dotlessj = "straight" dotlessj = "straight"
tag = "cv65"
[simple.v-capital-i-straight] [simple.v-capital-i-straight]
I = "straight" I = "line" # set on purpose to use II diversity
tag = "cv66"
[simple.v-capital-i-serifed] [simple.v-capital-i-serifed]
I = "serifed" I = "serifed"
tag = "cv67"
[simple.v-capital-j-straight] [simple.v-capital-j-straight]
J = "straight" J = "straight"
tag = "cv68"
[simple.v-capital-j-serifed] [simple.v-capital-j-serifed]
J = 'serifed' J = 'serifed'
tag = "cv69"
[simple.v-f-narrow]
f = 'narrow'
[simple.v-t-narrow]
t = 'narrow'
[simple.v-r-standard]
r = "standard"
[simple.v-r-narrow]
r = "narrow"
[simple.v-j-narrow]
dotlessj = "narrow"
[default] [default]
design = [ design = [
@ -305,6 +315,7 @@ design = [
'v-percent-rings', 'v-percent-rings',
'v-capital-i-serifed', 'v-capital-i-serifed',
'v-capital-j-serifed', 'v-capital-j-serifed',
'v-r-standard',
'others' 'others'
] ]
upright = [ upright = [

View file

@ -235,6 +235,7 @@ const BuildTTF = files(`${BUILD}/*/*.ttf`, async (target, path) => {
await run(GC, ["-i", ttfTmp], ["-o", otd]); await run(GC, ["-i", ttfTmp], ["-o", otd]);
await run("otfccbuild", otd, "-o", path.full, "-O3", "--keep-average-char-width", "-q"); await run("otfccbuild", otd, "-o", path.full, "-O3", "--keep-average-char-width", "-q");
await rm(otdTmp); await rm(otdTmp);
await rm(ttfTmp);
await rm(otd); await rm(otd);
}); });
const BuildCM = files(`${BUILD}/*/*.charmap`, async (target, path) => { const BuildCM = files(`${BUILD}/*/*.charmap`, async (target, path) => {