The grades for width is updated to make the unit width of Extended subfamily being 0.6em.

This commit is contained in:
be5invis 2021-04-05 19:57:20 -07:00
parent 01734df49f
commit 584e7a7fe0
8 changed files with 127 additions and 175 deletions

View file

@ -643,7 +643,7 @@ at = "fourfold"
percent = "rings-continuous-slash"
[buildPlans.iosevka-aile.widths.normal]
shape = 576
shape = 600
menu = 5
css = "normal"
@ -660,18 +660,28 @@ snapshotFeature = '"NWID" off'
[buildPlans.iosevka-etoile.variants.design]
at = 'fourfold'
capital-w = 'straight-flat-top'
j = 'serifed'
f = "flat-hook-serifed"
j = 'flat-hook-serifed'
t = "flat-hook"
w = 'straight-flat-top'
[buildPlans.iosevka-etoile.variants.italic]
f = "flat-hook-tailed"
# Letterform control for U+1D670 ... U+1D6A3
[buildPlans.iosevka-etoile.derivingVariants.mathtt.design]
at = 'threefold'
capital-w = 'straight-flat-top'
j = 'serifed'
f = "flat-hook-serifed"
j = 'flat-hook-serifed'
t = "flat-hook"
w = 'straight-flat-top'
[buildPlans.iosevka-etoile.derivingVariants.mathtt.italic]
f = "flat-hook-tailed"
[buildPlans.iosevka-etoile.widths.normal]
shape = 576
shape = 600
menu = 5
css = "normal"

View file

@ -0,0 +1 @@
* \[**Breaking**\]: The grades for width is updated to make the unit width of Extended subfamily being 0.6em.

View file

@ -148,24 +148,29 @@ glyph-block Letter-Latin-Lower-F : begin
DiagonalTailL df xBarMiddle Descender [DiagonalTailStdDepth df Stroke] Stroke
define [StandardSmallFShape df m bh counterHook] : glyph-proc
local barAtCenter : (counterHook === CH-HOOK) || (counterHook === CH-DIAGONAL-HOOK)
local barLeft0 : [mix SB RightSB 0.35] - Stroke * 0.25 * HVContrast
local barLeft : [mix SB RightSB : if (counterHook > 1) 0.45 0.35] - Stroke * [if (counterHook > 1) 0.45 0.25] * HVContrast
local barLeft : [mix SB RightSB : if barAtCenter 0.45 0.35] - Stroke * [if barAtCenter 0.45 0.25] * HVContrast
include : StdFShapeT dispiro 0 barLeft0 Stroke
include : Translate (barLeft - barLeft0) 0
include : HCrossBar.top SB [mix SB RightSB m] bh
if (counterHook === 1) : include : SmallFDownExtension barLeft
if (counterHook === 2) : begin
local barRight : barLeft + Stroke * HVContrast
local crossRight : mix df.width df.rightSB m
local counterHookLeft : Math.max SB : barRight - (crossRight - barLeft)
include : SmallFDownHook df barRight counterHookLeft
if (counterHook === 3) : include : SmallFDiagonalTail df barLeft
match counterHook
[Just CH-EXTENSION] : include : SmallFDownExtension barLeft
[Just CH-HOOK] : begin
local barRight : barLeft + Stroke * HVContrast
local crossRight : mix df.width df.rightSB m
local counterHookLeft : Math.max SB : barRight - (crossRight - barLeft)
include : SmallFDownHook df barRight counterHookLeft
[Just CH-DIAGONAL-HOOK] : include : SmallFDiagonalTail df barLeft
[Just CH-SERIF] : include : SmallFBottomSerif df 0
define [NarrowFShape df m bh counterHook] : glyph-proc
local barAtCenter : (counterHook === CH-HOOK) || (counterHook === CH-DIAGONAL-HOOK)
local crossLeft : mix 0 df.leftSB m
local crossRight : mix df.width df.rightSB m
local barLeft : if (counterHook > 1)
local barLeft : if barAtCenter
df.middle - HalfStroke * HVContrast
[mix crossLeft crossRight 0.42] - Stroke * 0.375 * HVContrast + df.width / 32
local hd : FlatHookDepth df
@ -177,147 +182,60 @@ glyph-block Letter-Latin-Lower-F : begin
flat barLeft [Math.max XH (CAP - hd.y)]
curl barLeft 0 [heading Downward]
include : HCrossBar.top crossLeft crossRight bh
if (counterHook === 1) : include : SmallFDownExtension barLeft
if (counterHook === 2) : begin
local barRight : barLeft + Stroke * HVContrast
local crossRight : mix df.width df.rightSB m
local counterHookLeft : barRight - (crossRight - barLeft)
include : SmallFDownHook df barRight counterHookLeft
if (counterHook === 3) : include : SmallFDiagonalTail df barLeft
match counterHook
[Just CH-EXTENSION] : include : SmallFDownExtension barLeft
[Just CH-HOOK] : begin
local barRight : barLeft + Stroke * HVContrast
local crossRight : mix df.width df.rightSB m
local counterHookLeft : barRight - (crossRight - barLeft)
include : SmallFDownHook df barRight counterHookLeft
[Just CH-DIAGONAL-HOOK] : include : SmallFDiagonalTail df barLeft
[Just CH-SERIF] : include : CenterBottomSerif df.middle 0 (LongJut * df.div)
create-glyph 'f.serifless' : glyph-proc
include : MarkSet.b
include : StandardSmallFShape [DivFrame 1] 0.95 fbar
create-glyph 'f.phoneticLeft' : glyph-proc
include : MarkSet.b
include : StandardSmallFShape [DivFrame 1] 1 fbar
if SLAB : include : SmallFBottomSerif [DivFrame 1] 0
create-glyph 'f.serifed' : glyph-proc
include : MarkSet.b
include : StandardSmallFShape [DivFrame 1] 0.95 fbar
include : SmallFBottomSerif [DivFrame 1] 0
create-glyph 'fltail' 0x192 : glyph-proc
include : MarkSet.if
include : StandardSmallFShape [DivFrame 1] 1 fbar 2
create-glyph 'f.extended' : glyph-proc
include : MarkSet.if
include : StandardSmallFShape [DivFrame 1] 0.95 fbar 1
create-glyph 'f.tailed' : glyph-proc
include : MarkSet.if
include : StandardSmallFShape [DivFrame 1] 1 fbar 2
create-glyph 'f.diagonalTailed' : glyph-proc
include : MarkSet.if
include : StandardSmallFShape [DivFrame 1] 1 fbar 3
create-glyph 'f.seriflessCrossbarAtXHeight' : glyph-proc
include : MarkSet.b
include : StandardSmallFShape [DivFrame 1] 0.95 XH
create-glyph 'f.serifedCrossbarAtXHeight' : glyph-proc
include : MarkSet.b
include : StandardSmallFShape [DivFrame 1] 0.95 XH
include : SmallFBottomSerif [DivFrame 1] 0
create-glyph 'f.extendedCrossbarAtXHeight' : glyph-proc
include : MarkSet.if
include : StandardSmallFShape [DivFrame 1] 0.95 XH 1
create-glyph 'f.tailedCrossbarAtXHeight' : glyph-proc
include : MarkSet.if
include : StandardSmallFShape [DivFrame 1] 1 XH 2
create-glyph 'f.diagonalTailedCrossbarAtXHeight' : glyph-proc
include : MarkSet.if
include : StandardSmallFShape [DivFrame 1] 1 XH 3
create-glyph 'f.narrow' : glyph-proc
define df : DivFrame para.diversityF
set-width df.width
include : df.markSet.b
include : NarrowFShape df 0.5 fbar
define CH-NONE 0
define CH-SERIF 1
define CH-EXTENSION 2
define CH-HOOK 3
define CH-DIAGONAL-HOOK 4
define dfNarrowF : DivFrame para.diversityF
create-glyph 'f.flatHook' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.b
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] fbar
define pNarrowSide : mix 1 para.diversityF 1.5
create-glyph 'f.flatHookCrossbarAtXHeight' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.b
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] XH
define SmallFConfig : object
'serifless' { { StandardSmallFShape [DivFrame 1] } { 0.95 fbar CH-NONE } { 'b' 'p' } }
'serifed' { { StandardSmallFShape [DivFrame 1] } { 0.95 fbar CH-SERIF } { 'b' 'p' } }
'extended' { { StandardSmallFShape [DivFrame 1] } { 0.95 fbar CH-EXTENSION } { 'if' 'if' } }
'tailed' { { StandardSmallFShape [DivFrame 1] } { 1 fbar CH-HOOK } { 'if' 'if' } }
'diagonalTailed' { { StandardSmallFShape [DivFrame 1] } { 1 fbar CH-DIAGONAL-HOOK } { 'if' 'if' } }
'seriflessCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 0.95 XH CH-NONE } { 'b' 'p' } }
'serifedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 0.95 XH CH-SERIF } { 'b' 'p' } }
'extendedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 0.95 XH CH-EXTENSION } { 'if' 'if' } }
'tailedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 1 XH CH-HOOK } { 'if' 'if' } }
'diagonalTailedCrossbarAtXHeight' { { StandardSmallFShape [DivFrame 1] } { 1 XH CH-DIAGONAL-HOOK } { 'if' 'if' } }
'flatHook' { { NarrowFShape dfNarrowF } { pNarrowSide fbar CH-NONE } { 'b' 'p' } }
'flatHookSerifed' { { NarrowFShape dfNarrowF } { pNarrowSide fbar CH-SERIF } { 'b' 'p' } }
'flatHookExtended' { { NarrowFShape dfNarrowF } { pNarrowSide fbar CH-EXTENSION } { 'if' 'if' } }
'flatHookTailed' { { NarrowFShape dfNarrowF } { pNarrowSide fbar CH-HOOK } { 'if' 'if' } }
'flatHookDiagonalTailed' { { NarrowFShape dfNarrowF } { pNarrowSide fbar CH-DIAGONAL-HOOK } { 'if' 'if' } }
'flatHookCrossbarAtXHeight' { { NarrowFShape dfNarrowF } { pNarrowSide XH CH-NONE } { 'b' 'p' } }
'flatHookSerifedCrossbarAtXHeight' { { NarrowFShape dfNarrowF } { pNarrowSide XH CH-SERIF } { 'b' 'p' } }
'flatHookExtendedCrossbarAtXHeight' { { NarrowFShape dfNarrowF } { pNarrowSide XH CH-EXTENSION } { 'if' 'if' } }
'flatHookTailedCrossbarAtXHeight' { { NarrowFShape dfNarrowF } { pNarrowSide XH CH-HOOK } { 'if' 'if' } }
'flatHookDiagonalTailedCrossbarAtXHeight' { { NarrowFShape dfNarrowF } { pNarrowSide XH CH-DIAGONAL-HOOK } { 'if' 'if' } }
create-glyph 'f.flatHookSerifed' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.b
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] fbar
include : SmallFBottomSerif dfNarrowF 0.035
'phoneticLeft' { { StandardSmallFShape [DivFrame 1] } { 1 fbar [if SLAB 4 0] } { 'b' 'p' } }
create-glyph 'f.flatHookSerifedCrossbarAtXHeight' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.b
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] XH
include : SmallFBottomSerif dfNarrowF 0.035
create-glyph 'f.flatHookExtended' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.if
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] fbar 1
create-glyph 'f.flatHookExtendedCrossbarAtXHeight' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.if
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] XH 1
create-glyph 'f.flatHookTailed' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.if
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] fbar 2
create-glyph 'f.flatHookTailedCrossbarAtXHeight' : glyph-proc
set-width dfNarrowF.width
include : dfNarrowF.markSet.if
include : NarrowFShape dfNarrowF [mix 1 dfNarrowF.div 2] XH 2
create-glyph 'f.flatHookDiagonalTailed' : glyph-proc
include : MarkSet.if
include : NarrowFShape [DivFrame 1] 1 fbar 3
create-glyph 'f.flatHookDiagonalTailedCrossbarAtXHeight' : glyph-proc
include : MarkSet.if
include : NarrowFShape [DivFrame 1] 1 XH 3
foreach { suffix {{Body df} {pBar yBar ch} {mk mkTurn}}} [Object.entries SmallFConfig] : do
create-glyph "f.\(suffix)" : glyph-proc
set-width df.width
include : df.markSet.(mk)
include : Body df pBar yBar ch
turned "turnf.\(suffix)" nothing "f.\(suffix)" df.middle (XH / 2) [df.markSet.(mkTurn)]
select-variant 'f' 'f'
alias 'lenisf' 0xAB35 'f.serifless'
turned 'turnf.serifless' nothing 'f.serifless' Middle (XH / 2) [MarkSet.p]
turned 'turnf.serifed' nothing 'f.serifed' Middle (XH / 2) [MarkSet.p]
turned 'turnf.tailed' nothing 'f.tailed' Middle (XH / 2) [MarkSet.if]
turned 'turnf.diagonalTailed' nothing 'f.diagonalTailed' Middle (XH / 2) [MarkSet.if]
turned 'turnf.extended' nothing 'f.extended' Middle (XH / 2) [MarkSet.if]
turned 'turnf.seriflessCrossbarAtXHeight' nothing 'f.seriflessCrossbarAtXHeight' Middle (XH / 2) [MarkSet.p]
turned 'turnf.serifedCrossbarAtXHeight' nothing 'f.serifedCrossbarAtXHeight' Middle (XH / 2) [MarkSet.p]
turned 'turnf.tailedCrossbarAtXHeight' nothing 'f.tailedCrossbarAtXHeight' Middle (XH / 2) [MarkSet.if]
turned 'turnf.diagonalTailedCrossbarAtXHeight' nothing 'f.diagonalTailedCrossbarAtXHeight' Middle (XH / 2) [MarkSet.if]
turned 'turnf.extendedCrossbarAtXHeight' nothing 'f.extendedCrossbarAtXHeight' Middle (XH / 2) [MarkSet.if]
turned 'turnf.flatHook' nothing 'f.flatHook' dfNarrowF.middle (XH / 2) [dfNarrowF.markSet.p]
turned 'turnf.flatHookSerifed' nothing 'f.flatHookSerifed' dfNarrowF.middle (XH / 2) [dfNarrowF.markSet.p]
turned 'turnf.flatHookTailed' nothing 'f.flatHookTailed' dfNarrowF.middle [mix Descender CAP 0.5] [dfNarrowF.markSet.if]
turned 'turnf.flatHookDiagonalTailed' nothing 'f.flatHookDiagonalTailed' dfNarrowF.middle [mix Descender CAP 0.5] [dfNarrowF.markSet.if]
turned 'turnf.flatHookExtended' nothing 'f.flatHookExtended' dfNarrowF.middle [mix Descender CAP 0.5] [dfNarrowF.markSet.if]
turned 'turnf.flatHookCrossbarAtXHeight' nothing 'f.flatHookCrossbarAtXHeight' dfNarrowF.middle (XH / 2) [dfNarrowF.markSet.p]
turned 'turnf.flatHookSerifedCrossbarAtXHeight' nothing 'f.flatHookSerifedCrossbarAtXHeight' dfNarrowF.middle (XH / 2) [dfNarrowF.markSet.p]
turned 'turnf.flatHookTailedCrossbarAtXHeight' nothing 'f.flatHookTailedCrossbarAtXHeight' dfNarrowF.middle [mix Descender CAP 0.5] [dfNarrowF.markSet.if]
turned 'turnf.flatHookDiagonalTailedCrossbarAtXHeight' nothing 'f.flatHookDiagonalTailedCrossbarAtXHeight' Middle [mix Descender CAP 0.5] [MarkSet.if]
turned 'turnf.flatHookExtendedCrossbarAtXHeight' nothing 'f.flatHookExtendedCrossbarAtXHeight' Middle [mix Descender CAP 0.5] [MarkSet.if]
alias 'fltail' 0x192 'f.tailed'
select-variant 'turnf' 0x25F (follow -- 'f')
glyph-block-import Letter-Blackboard : BBS BBD

View file

@ -8,14 +8,33 @@ function initPara(data, argv) {
apply(para, data, ["iosevka"]);
if (argv.shape.serifs) apply(para, data, ["serifs-" + argv.shape.serifs]);
if (argv.shape.spacing) apply(para, data, ["spacing-" + argv.shape.spacing]);
apply(para, data, ["shapeWeight"], { shapeWeight: argv.shape.weight });
apply(para, data, ["shapeWidth"], { shapeWidth: argv.shape.width });
apply(para, data, [`s-${argv.shape.slope}`]);
applyBlendingParam(argv, para, data, "shapeWeight", "weight");
applyBlendingParam(argv, para, data, "shapeWidth", "width");
applyAlternatesParam(argv, para, data, "slope", "slope");
if (argv.featureControl.noCvSs) para.enableCvSs = false;
if (argv.featureControl.noLigation) para.enableLigation = false;
return para;
}
function applyBlendingParam(argv, para, data, key, keyArgv) {
applySingleBlendingParam(argv, para, data, key, keyArgv);
if (argv.shape.serifs)
applySingleBlendingParam(argv, para, data, `${key}-serifs-${argv.shape.serifs}`, keyArgv);
if (argv.shape.spacing)
applySingleBlendingParam(argv, para, data, `${key}-spacing-${argv.shape.spacing}`, keyArgv);
}
function applySingleBlendingParam(argv, para, data, key, keyArgv) {
apply(para, data, [key], { [key]: argv.shape[keyArgv] });
}
function applyAlternatesParam(argv, para, data, key, keyArgv) {
const kBase = `${key}-${argv.shape[keyArgv]}`;
apply(para, data, [kBase]);
if (argv.shape.serifs) apply(para, data, [`${kBase}-serifs-${argv.shape.serifs}`]);
if (argv.shape.spacing) apply(para, data, [`${kBase}-spacing-${argv.shape.spacing}`]);
}
exports.apply = apply;
function apply(sink, parametersData, styles, blendArgs) {
if (!styles) return;

View file

@ -1,6 +1,6 @@
{
"name": "iosevka",
"version": "5.2.1",
"version": "6.0.0-preview.1",
"main": "./font-src/index.js",
"scripts": {
"build": "node utility/ensure-verda-exists && verda -f verdafile.js",

View file

@ -108,10 +108,10 @@ diversityI = 0.75
diversityII = 0.50
###### Slopes
[s-italic]
[slope-italic]
isItalic = true
slopeAngle = 9.4
[s-oblique]
[slope-oblique]
isOblique = true
slopeAngle = 9.4

View file

@ -13,12 +13,12 @@ tbalance = 1
smallsmooth = 1
# "Grade 9"
[shapeWidth.blend.664]
width = 664
[shapeWidth.multiplies.blend.664]
[shapeWidth.blend.720]
width = 720
[shapeWidth.multiplies.blend.720]
contrast = 1.044
stroke = 1.103 # Make strokes a little thicker
sb = 1.777
sb = 1.891
jut = 1.323
refJut = 1.323
longjut = 1.323
@ -28,11 +28,11 @@ tbalance = 1.210
smallsmooth = 1.103
# "Grade 8"
[shapeWidth.blend.618]
width = 618
[shapeWidth.multiplies.blend.618]
[shapeWidth.blend.657]
width = 657
[shapeWidth.multiplies.blend.657]
stroke = 1.075 # Make strokes a little thicker
sb = 1.539
sb = 1.612
jut = 1.233
refJut = 1.233
longjut = 1.233
@ -42,11 +42,11 @@ tbalance = 1.154
smallsmooth = 1.075
# "Grade 7"
[shapeWidth.blend.576]
width = 576
[shapeWidth.multiplies.blend.576]
[shapeWidth.blend.600]
width = 600
[shapeWidth.multiplies.blend.600]
stroke = 1.050 # Make strokes a little thicker
sb = 1.333
sb = 1.375
jut = 1.150
refJut = 1.150
longjut = 1.150
@ -56,11 +56,11 @@ tbalance = 1.100
smallsmooth = 1.050
# "Grade 6"
[shapeWidth.blend.537]
width = 537
[shapeWidth.multiplies.blend.537]
[shapeWidth.blend.547]
width = 547
[shapeWidth.multiplies.blend.547]
stroke = 1.023 # Make strokes a little thicker
sb = 1.154
sb = 1.173
jut = 1.072
refJut = 1.072
longjut = 1.072
@ -70,12 +70,12 @@ tbalance = 1.049
smallsmooth = 1.023
# "Grade 4"
[shapeWidth.blend.466]
width = 466
[shapeWidth.multiplies.blend.466]
[shapeWidth.blend.456]
width = 456
[shapeWidth.multiplies.blend.456]
contrast = 1
stroke = 0.975
sb = 0.866
sb = 0.853
jut = 0.933
refJut = 0.933
longjut = 0.933
@ -85,12 +85,12 @@ tbalance = 0.953
smallsmooth = 0.975
# "Grade 3"
[shapeWidth.blend.434]
width = 434
[shapeWidth.multiplies.blend.434]
[shapeWidth.blend.416]
width = 416
[shapeWidth.multiplies.blend.416]
contrast = 1
stroke = 0.952
sb = 0.750
sb = 0.727
jut = 0.870
refJut = 0.870
longjut = 0.870
@ -98,3 +98,7 @@ rhook = 1
rbalance = 0.868
tbalance = 0.909
smallsmooth = 0.952
# Slab correlation
[shapeWidth-serifs-slab.multiplies.blend.500]
sb = 1.075

View file

@ -923,7 +923,7 @@ const VlMenuWeight = VlCssWeight;
const g_widthFixupMemory = new Map();
const VlShapeWidth = {
validate: x => x >= 433 && x <= 665,
validate: x => x >= 416 && x <= 720,
fix(x) {
if (x >= 3 && x <= 9) {
if (g_widthFixupMemory.has(x)) return g_widthFixupMemory.get(x);