Add "Crisp" subfamily

This commit is contained in:
Belleve Invis 2019-10-28 22:24:40 -07:00
parent 9e58e45751
commit 7739b53660
3 changed files with 125 additions and 38 deletions

View file

@ -40,6 +40,48 @@ design = ["termlig", "slab"]
family = "IosevkaCC Slab"
design = ["cc", "slab"]
# Crisp
[buildPlans.iosevka-crisp]
family = "Iosevka Crisp"
design = ["shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-term-crisp]
family = "Iosevka Term Crisp"
design = ["term", "shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-type-crisp]
family = "Iosevka Type Crisp"
design = ["type", "shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-term-lig-crisp]
family = "Iosevka TermLig Crisp"
design = ["termlig", "shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-cc-crisp]
family = "IosevkaCC Crisp"
design = ["cc", "shape-straight-bar", "v-at-fourfold"]
# Crisp Slab
[buildPlans.iosevka-crisp-slab]
family = "Iosevka Crisp Slab"
design = ["slab", "shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-term-crisp-slab]
family = "Iosevka Term Crisp Slab"
design = ["term", "slab", "shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-type-crisp-slab]
family = "Iosevka Type Crisp Slab"
design = ["type", "slab", "shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-term-lig-crisp-slab]
family = "Iosevka TermLig Crisp Slab"
design = ["termlig", "slab", "shape-straight-bar", "v-at-fourfold"]
[buildPlans.iosevka-cc-crisp-slab]
family = "IosevkaCC Crisp Slab"
design = ["cc", "slab", "shape-straight-bar", "v-at-fourfold"]
# SSxx
[buildPlans.iosevka-ss01]
family = "Iosevka SS01"
@ -163,16 +205,32 @@ design = ['wd-extended', 'menu-subfamily-extended']
# Export plans
# This mapping affects the process of creating ZIP archives only
[exportPlans]
# Standard set
01-iosevka = "iosevka"
02-iosevka-term = "iosevka-term"
03-iosevka-type = "iosevka-type"
04-iosevka-cc-DEPRECATED = "iosevka-cc"
05-iosevka-term-lig = "iosevka-term-lig"
06-iosevka-slab = "iosevka-slab"
07-iosevka-term-slab = "iosevka-term-slab"
08-iosevka-type-slab = "iosevka-type-slab"
09-iosevka-cc-slab-DEPRECATED = "iosevka-cc-slab"
10-iosevka-term-lig-slab = "iosevka-term-lig-slab"
04-iosevka-term-lig = "iosevka-term-lig"
05-iosevka-slab = "iosevka-slab"
06-iosevka-term-slab = "iosevka-term-slab"
07-iosevka-type-slab = "iosevka-type-slab"
08-iosevka-term-lig-slab = "iosevka-term-lig-slab"
09-iosevka-crisp = "iosevka-crisp"
10-iosevka-term-crisp = "iosevka-term-crisp"
11-iosevka-type-crisp = "iosevka-type-crisp"
12-iosevka-term-lig-crisp = "iosevka-term-lig-crisp"
13-iosevka-crisp-slab = "iosevka-crisp-slab"
14-iosevka-term-crisp-slab = "iosevka-term-crisp-slab"
15-iosevka-type-crisp-slab = "iosevka-type-crisp-slab"
16-iosevka-term-lig-crisp-slab = "iosevka-term-lig-crisp-slab"
# "CC" variants (deprecated -- will be removed in next release)
iosevka-cc-DEPRECATED = "iosevka-cc"
iosevka-cc-slab-DEPRECATED = "iosevka-cc-slab"
iosevka-cc-crisp-DEPRECATED = "iosevka-cc-crisp"
iosevka-cc-slab-crisp-DEPRECATED = "iosevka-cc-slab-crisp"
# Style set variants
iosevka-ss01 = "iosevka-ss01"
iosevka-term-ss01 = "iosevka-term-ss01"
iosevka-ss02 = "iosevka-ss02"
@ -195,6 +253,8 @@ iosevka-ss10 = "iosevka-ss10"
iosevka-term-ss10 = "iosevka-term-ss10"
iosevka-ss11 = "iosevka-ss11"
iosevka-term-ss11 = "iosevka-term-ss11"
# Experimental variants
experimental-iosevka-aile = "iosevka-aile"
experimental-iosevka-etoile = "iosevka-etoile"
experimental-iosevka-extended = "iosevka-extended"
@ -206,7 +266,7 @@ from = [
"iosevka",
"iosevka-term",
"iosevka-type",
"iosevka-cc"
"iosevka-term-lig"
]
[collectPlans.iosevka-slab]
@ -214,7 +274,23 @@ from = [
"iosevka-slab",
"iosevka-term-slab",
"iosevka-type-slab",
"iosevka-cc-slab"
"iosevka-term-lig-slab"
]
[collectPlans.iosevka-crisp]
from = [
"iosevka-crisp",
"iosevka-term-crisp",
"iosevka-type-crisp",
"iosevka-term-lig-crisp"
]
[collectPlans.iosevka-crisp-slab]
from = [
"iosevka-crisp-slab",
"iosevka-term-crisp-slab",
"iosevka-type-crisp-slab",
"iosevka-term-lig-crisp-slab"
]
# Weight mappings (style => shape weight, CSS weight)

View file

@ -798,10 +798,10 @@ export : define [apply] : begin
do "W, w and related ========================================================================="
define [WShape top barStraight df] : glyph-construction
local fineOuter : if barStraight
adviceBlackness WShape.fineS df.div
adviceBlackness WShape.fineSOuter df.div
adviceBlackness WShape.fineOuter df.div
local fineInner : if barStraight
adviceBlackness WShape.fineS df.div
adviceBlackness WShape.fineSInner df.div
adviceBlackness WShape.fineInner df.div
local fineHeight : (fineOuter + fineInner) / 2
@ -813,7 +813,7 @@ export : define [apply] : begin
local fineOffsetInner : hwCO * HVCONTRAST
local m1 : [mix (df.leftSB + delimBias) (df.rightSB - delimBias) : if barStraight WShape.m1S WShape.m1] + [if barStraight O 0]
local m2 : [mix (df.leftSB + delimBias) (df.rightSB - delimBias) : if barStraight WShape.m2S WShape.m2] - [if barStraight O 0]
local wMidHeight : if barStraight top (top * 0.6)
local wMidHeight : if barStraight (top * [Math.min 1 (df.div * 0.9)]) (top * 0.6)
if barStraight : begin
include : dispiro
@ -882,13 +882,14 @@ export : define [apply] : begin
set WShape.fineOuter 5
set WShape.fineInner 6
set WShape.fineS 5.5
set WShape.fineSOuter 5.5
set WShape.fineSInner 5.5
set WShape.hwCO 5
set WShape.hwCOS 4
set WShape.m1 0.25
set WShape.m2 0.75
set WShape.m1S 0.24
set WShape.m2S 0.76
set WShape.hwCOS 3.5
set WShape.m1 0.25
set WShape.m2 : 1 - WShape.m1
set WShape.m1S 0.235
set WShape.m2S : 1 - WShape.m1S
sketch # W
local df : DivFrame para.diversityM 3
@ -910,7 +911,7 @@ export : define [apply] : begin
define [WHooktopShape top barStraight df] : glyph-construction
local fineOuter : if barStraight
adviceBlackness WShape.fineS df.div
adviceBlackness WShape.fineSOuter df.div
adviceBlackness WShape.fineOuter df.div
local hwCO : if barStraight
@ -1716,27 +1717,30 @@ export : define [apply] : begin
### R and CyrYa
do "R and related ============================================================================="
define [RShape top] : glyph-construction
local m : if SLAB (0.5 + HALFSTROKE / CAP) PBARPOS
include : PShape top 1 m
local right (RIGHTSB - O - [if SLAB (JUT / 8) 0])
define [RLegShape right bottom top charTop] : glyph-construction
if para.straightBar : do
local shift : if SLAB (-JUT / 2 + 0.25 * STROKE * HVCONTRAST) 0
local xRightBottom : right - OX * 2 - HALFSTROKE * HVCONTRAST
include : dispiro
widths.center (STROKE * [diagCor top WIDTH 0 (STROKE * 2)])
corner (MIDDLE + shift / 2) ((top - STROKE) * m) [heading DOWNWARD]
corner (xRightBottom + shift) 0 [heading DOWNWARD]
widths.center (STROKE * [diagCor charTop WIDTH 0 (STROKE * 2)])
corner (MIDDLE + shift / 2) top [heading DOWNWARD]
corner (xRightBottom + shift) bottom [heading DOWNWARD]
if SLAB : begin
include : RightwardBottomSerif (xRightBottom + shift + 0.25 * STROKE * HVCONTRAST) 0 (SIDEJUT + JUT / 8)
include : RightwardBottomSerif (xRightBottom + shift + 0.25 * STROKE * HVCONTRAST) bottom (SIDEJUT + JUT / 8)
: else : begin
include : dispiro
widths.center
g4.up.start (right ) 0 [heading UPWARD]
g4.up.start (right - HALFSTROKE * HVCONTRAST) bottom [heading UPWARD]
quadcontrols 0 [if SLAB 0.3 0.4] 8
g4 MIDDLE ((top - STROKE) * m)
g4 MIDDLE top
if SLAB : begin
include : RightwardBottomSerif right 0 (SIDEJUT + JUT / 8)
include : RightwardBottomSerif right bottom (SIDEJUT + JUT / 8)
define [RShape top] : glyph-construction
local m : if SLAB (0.5 + HALFSTROKE / CAP) PBARPOS
include : PShape top 1 m
local right (RIGHTSB - O - [if SLAB (JUT / 8) 0])
include : RLegShape right 0 ((top - STROKE) * m) top
sketch # R
set-width WIDTH
@ -1761,13 +1765,8 @@ export : define [apply] : begin
include : PShape top 1 bp
include : VBarLeft SB (top - 1) CAP
local TURN (XH * 0.1)
local right (RIGHTSB - O)
include : dispiro
widths.center
g4.up.start (right - HALFSTROKE) DESCENDER [heading UPWARD]
quadcontrols 0 0.4 8
g4 MIDDLE ((top - STROKE) * bp)
local right (RIGHTSB - O - [if SLAB (JUT / 8) 0])
include : RLegShape right DESCENDER ((top - STROKE) * bp) (top - DESCENDER)
save 'Yr' 0x1A6

View file

@ -189,7 +189,9 @@ const CollectPlans = computed(`collect-plans`, async target => {
const HivesOf = computed.group("hives-of", async (target, gid) => {
const [{ fontInfos }] = await target.need(FontBuildingParameters);
return fontInfos[gid];
const hvs = fontInfos[gid];
if (!hvs) throw new Error(`Build plan for ${gid} not found.`);
return hvs;
});
const GroupInfo = computed.group("group-info", async (target, gid) => {
@ -451,6 +453,16 @@ const AllArchives = task(`all:archives`, async target => {
);
});
const AllTtfArchives = task(`all:ttf`, async target => {
const [exportPlans] = await target.need(ExportPlans);
await target.need(Object.keys(exportPlans).map(GroupArchives));
});
const AllTtcArchives = task(`all:ttc`, async target => {
const [collectPlans] = await target.need(CollectPlans);
await target.need(Object.keys(collectPlans.groups).map(CollectionArchive));
});
phony(`clean`, async () => {
await rm(`build`);
await rm(`dist`);