Add ligation configurability

This commit is contained in:
be5invis 2020-10-27 00:36:12 -07:00
parent c1c3ce79ee
commit 2e601b641c
14 changed files with 770 additions and 659 deletions

View file

@ -14,6 +14,8 @@ block_comment = *
block_comment_end = */ block_comment_end = */
[*.md] [*.md]
indent_style = space
indent_size = 2
insert_final_newline = false insert_final_newline = false
trim_trailing_whitespace = false trim_trailing_whitespace = false

1107
README.md

File diff suppressed because it is too large Load diff

View file

@ -46,7 +46,7 @@ family = "Iosevka Curly"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"ss20" on' snapshotFeature = '"ss20" on'
[buildPlans.iosevka-curly.variants] [buildPlans.iosevka-curly.variants]
inherits = ["ss20"] inherits = "ss20"
[buildPlans.iosevka-fixed-curly] [buildPlans.iosevka-fixed-curly]
family = "Iosevka Fixed Curly" family = "Iosevka Fixed Curly"
@ -54,7 +54,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss20" on' snapshotFeature = '"NWID" on, "ss20" on'
[buildPlans.iosevka-fixed-curly.variants] [buildPlans.iosevka-fixed-curly.variants]
inherits = ["ss20"] inherits = "ss20"
[buildPlans.iosevka-term-curly] [buildPlans.iosevka-term-curly]
family = "Iosevka Term Curly" family = "Iosevka Term Curly"
@ -62,7 +62,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss20" on' snapshotFeature = '"NWID" on, "ss20" on'
[buildPlans.iosevka-term-curly.variants] [buildPlans.iosevka-term-curly.variants]
inherits = ["ss20"] inherits = "ss20"
# Curly Slab # Curly Slab
[buildPlans.iosevka-curly-slab] [buildPlans.iosevka-curly-slab]
@ -71,7 +71,7 @@ serifs = "slab"
snapshotFamily = 'iosevka-slab' snapshotFamily = 'iosevka-slab'
snapshotFeature = '"ss20" on' snapshotFeature = '"ss20" on'
[buildPlans.iosevka-curly-slab.variants] [buildPlans.iosevka-curly-slab.variants]
inherits = ["ss20"] inherits = "ss20"
[buildPlans.iosevka-fixed-curly-slab] [buildPlans.iosevka-fixed-curly-slab]
family = "Iosevka Fixed Curly Slab" family = "Iosevka Fixed Curly Slab"
@ -80,7 +80,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka-slab' snapshotFamily = 'iosevka-slab'
snapshotFeature = '"NWID" on, "ss20" on' snapshotFeature = '"NWID" on, "ss20" on'
[buildPlans.iosevka-fixed-curly-slab.variants] [buildPlans.iosevka-fixed-curly-slab.variants]
inherits = ["ss20"] inherits = "ss20"
[buildPlans.iosevka-term-curly-slab] [buildPlans.iosevka-term-curly-slab]
family = "Iosevka Term Curly Slab" family = "Iosevka Term Curly Slab"
@ -89,7 +89,7 @@ spacing = "term"
snapshotFamily = 'iosevka-slab' snapshotFamily = 'iosevka-slab'
snapshotFeature = '"NWID" on, "ss20" on' snapshotFeature = '"NWID" on, "ss20" on'
[buildPlans.iosevka-term-curly-slab.variants] [buildPlans.iosevka-term-curly-slab.variants]
inherits = ["ss20"] inherits = "ss20"
################################################################################################### ###################################################################################################
# SSxx # SSxx
@ -106,7 +106,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss01" on' snapshotFeature = '"NWID" on, "ss01" on'
[buildPlans.iosevka-fixed-ss01.variants] [buildPlans.iosevka-fixed-ss01.variants]
inherits = ["ss01"] inherits = "ss01"
[buildPlans.iosevka-term-ss01] [buildPlans.iosevka-term-ss01]
family = "Iosevka Term SS01" family = "Iosevka Term SS01"
@ -114,7 +114,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss01" on' snapshotFeature = '"NWID" on, "ss01" on'
[buildPlans.iosevka-term-ss01.variants] [buildPlans.iosevka-term-ss01.variants]
inherits = ["ss01"] inherits = "ss01"
[buildPlans.iosevka-ss02] [buildPlans.iosevka-ss02]
@ -130,7 +130,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss02" on' snapshotFeature = '"NWID" on, "ss02" on'
[buildPlans.iosevka-fixed-ss02.variants] [buildPlans.iosevka-fixed-ss02.variants]
inherits = ["ss02"] inherits = "ss02"
[buildPlans.iosevka-term-ss02] [buildPlans.iosevka-term-ss02]
family = "Iosevka Term SS02" family = "Iosevka Term SS02"
@ -138,7 +138,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss02" on' snapshotFeature = '"NWID" on, "ss02" on'
[buildPlans.iosevka-term-ss02.variants] [buildPlans.iosevka-term-ss02.variants]
inherits = ["ss02"] inherits = "ss02"
[buildPlans.iosevka-ss03] [buildPlans.iosevka-ss03]
@ -154,7 +154,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss03" on' snapshotFeature = '"NWID" on, "ss03" on'
[buildPlans.iosevka-fixed-ss03.variants] [buildPlans.iosevka-fixed-ss03.variants]
inherits = ["ss03"] inherits = "ss03"
[buildPlans.iosevka-term-ss03] [buildPlans.iosevka-term-ss03]
family = "Iosevka Term SS03" family = "Iosevka Term SS03"
@ -162,7 +162,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss03" on' snapshotFeature = '"NWID" on, "ss03" on'
[buildPlans.iosevka-term-ss03.variants] [buildPlans.iosevka-term-ss03.variants]
inherits = ["ss03"] inherits = "ss03"
[buildPlans.iosevka-ss04] [buildPlans.iosevka-ss04]
@ -178,7 +178,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss04" on' snapshotFeature = '"NWID" on, "ss04" on'
[buildPlans.iosevka-fixed-ss04.variants] [buildPlans.iosevka-fixed-ss04.variants]
inherits = ["ss04"] inherits = "ss04"
[buildPlans.iosevka-term-ss04] [buildPlans.iosevka-term-ss04]
family = "Iosevka Term SS04" family = "Iosevka Term SS04"
@ -186,7 +186,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss04" on' snapshotFeature = '"NWID" on, "ss04" on'
[buildPlans.iosevka-term-ss04.variants] [buildPlans.iosevka-term-ss04.variants]
inherits = ["ss04"] inherits = "ss04"
[buildPlans.iosevka-ss05] [buildPlans.iosevka-ss05]
@ -202,7 +202,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss05" on' snapshotFeature = '"NWID" on, "ss05" on'
[buildPlans.iosevka-fixed-ss05.variants] [buildPlans.iosevka-fixed-ss05.variants]
inherits = ["ss05"] inherits = "ss05"
[buildPlans.iosevka-term-ss05] [buildPlans.iosevka-term-ss05]
family = "Iosevka Term SS05" family = "Iosevka Term SS05"
@ -210,7 +210,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss05" on' snapshotFeature = '"NWID" on, "ss05" on'
[buildPlans.iosevka-term-ss05.variants] [buildPlans.iosevka-term-ss05.variants]
inherits = ["ss05"] inherits = "ss05"
[buildPlans.iosevka-ss06] [buildPlans.iosevka-ss06]
@ -226,7 +226,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss06" on' snapshotFeature = '"NWID" on, "ss06" on'
[buildPlans.iosevka-fixed-ss06.variants] [buildPlans.iosevka-fixed-ss06.variants]
inherits = ["ss06"] inherits = "ss06"
[buildPlans.iosevka-term-ss06] [buildPlans.iosevka-term-ss06]
family = "Iosevka Term SS06" family = "Iosevka Term SS06"
@ -234,7 +234,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss06" on' snapshotFeature = '"NWID" on, "ss06" on'
[buildPlans.iosevka-term-ss06.variants] [buildPlans.iosevka-term-ss06.variants]
inherits = ["ss06"] inherits = "ss06"
[buildPlans.iosevka-ss07] [buildPlans.iosevka-ss07]
@ -250,7 +250,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss07" on' snapshotFeature = '"NWID" on, "ss07" on'
[buildPlans.iosevka-fixed-ss07.variants] [buildPlans.iosevka-fixed-ss07.variants]
inherits = ["ss07"] inherits = "ss07"
[buildPlans.iosevka-term-ss07] [buildPlans.iosevka-term-ss07]
family = "Iosevka Term SS07" family = "Iosevka Term SS07"
@ -258,7 +258,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss07" on' snapshotFeature = '"NWID" on, "ss07" on'
[buildPlans.iosevka-term-ss07.variants] [buildPlans.iosevka-term-ss07.variants]
inherits = ["ss07"] inherits = "ss07"
# The SS08 has curly bars, so apply ss20 first # The SS08 has curly bars, so apply ss20 first
@ -275,7 +275,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss08" on' snapshotFeature = '"NWID" on, "ss08" on'
[buildPlans.iosevka-fixed-ss08.variants] [buildPlans.iosevka-fixed-ss08.variants]
inherits = ["ss08"] inherits = "ss08"
[buildPlans.iosevka-term-ss08] [buildPlans.iosevka-term-ss08]
family = "Iosevka Term SS08" family = "Iosevka Term SS08"
@ -283,7 +283,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss08" on' snapshotFeature = '"NWID" on, "ss08" on'
[buildPlans.iosevka-term-ss08.variants] [buildPlans.iosevka-term-ss08.variants]
inherits = ["ss08"] inherits = "ss08"
[buildPlans.iosevka-ss09] [buildPlans.iosevka-ss09]
@ -299,7 +299,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss09" on' snapshotFeature = '"NWID" on, "ss09" on'
[buildPlans.iosevka-fixed-ss09.variants] [buildPlans.iosevka-fixed-ss09.variants]
inherits = ["ss09"] inherits = "ss09"
[buildPlans.iosevka-term-ss09] [buildPlans.iosevka-term-ss09]
family = "Iosevka Term SS09" family = "Iosevka Term SS09"
@ -307,7 +307,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss09" on' snapshotFeature = '"NWID" on, "ss09" on'
[buildPlans.iosevka-term-ss09.variants] [buildPlans.iosevka-term-ss09.variants]
inherits = ["ss09"] inherits = "ss09"
[buildPlans.iosevka-ss10] [buildPlans.iosevka-ss10]
@ -323,7 +323,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss10" on' snapshotFeature = '"NWID" on, "ss10" on'
[buildPlans.iosevka-fixed-ss10.variants] [buildPlans.iosevka-fixed-ss10.variants]
inherits = ["ss10"] inherits = "ss10"
[buildPlans.iosevka-term-ss10] [buildPlans.iosevka-term-ss10]
family = "Iosevka Term SS10" family = "Iosevka Term SS10"
@ -331,7 +331,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss10" on' snapshotFeature = '"NWID" on, "ss10" on'
[buildPlans.iosevka-term-ss10.variants] [buildPlans.iosevka-term-ss10.variants]
inherits = ["ss10"] inherits = "ss10"
[buildPlans.iosevka-ss11] [buildPlans.iosevka-ss11]
@ -347,7 +347,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss11" on' snapshotFeature = '"NWID" on, "ss11" on'
[buildPlans.iosevka-fixed-ss11.variants] [buildPlans.iosevka-fixed-ss11.variants]
inherits = ["ss11"] inherits = "ss11"
[buildPlans.iosevka-term-ss11] [buildPlans.iosevka-term-ss11]
family = "Iosevka Term SS11" family = "Iosevka Term SS11"
@ -355,7 +355,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss11" on' snapshotFeature = '"NWID" on, "ss11" on'
[buildPlans.iosevka-term-ss11.variants] [buildPlans.iosevka-term-ss11.variants]
inherits = ["ss11"] inherits = "ss11"
[buildPlans.iosevka-ss12] [buildPlans.iosevka-ss12]
@ -371,7 +371,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss12" on' snapshotFeature = '"NWID" on, "ss12" on'
[buildPlans.iosevka-fixed-ss12.variants] [buildPlans.iosevka-fixed-ss12.variants]
inherits = ["ss12"] inherits = "ss12"
[buildPlans.iosevka-term-ss12] [buildPlans.iosevka-term-ss12]
family = "Iosevka Term SS12" family = "Iosevka Term SS12"
@ -379,7 +379,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss12" on' snapshotFeature = '"NWID" on, "ss12" on'
[buildPlans.iosevka-term-ss12.variants] [buildPlans.iosevka-term-ss12.variants]
inherits = ["ss12"] inherits = "ss12"
[buildPlans.iosevka-ss13] [buildPlans.iosevka-ss13]
@ -395,7 +395,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss13" on' snapshotFeature = '"NWID" on, "ss13" on'
[buildPlans.iosevka-fixed-ss13.variants] [buildPlans.iosevka-fixed-ss13.variants]
inherits = ["ss13"] inherits = "ss13"
[buildPlans.iosevka-term-ss13] [buildPlans.iosevka-term-ss13]
family = "Iosevka Term SS13" family = "Iosevka Term SS13"
@ -403,7 +403,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss13" on' snapshotFeature = '"NWID" on, "ss13" on'
[buildPlans.iosevka-term-ss13.variants] [buildPlans.iosevka-term-ss13.variants]
inherits = ["ss13"] inherits = "ss13"
[buildPlans.iosevka-ss14] [buildPlans.iosevka-ss14]
@ -419,7 +419,7 @@ spacing = "fixed"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss14" on' snapshotFeature = '"NWID" on, "ss14" on'
[buildPlans.iosevka-fixed-ss14.variants] [buildPlans.iosevka-fixed-ss14.variants]
inherits = ["ss14"] inherits = "ss14"
[buildPlans.iosevka-term-ss14] [buildPlans.iosevka-term-ss14]
family = "Iosevka Term SS14" family = "Iosevka Term SS14"
@ -427,7 +427,7 @@ spacing = "term"
snapshotFamily = 'iosevka' snapshotFamily = 'iosevka'
snapshotFeature = '"NWID" on, "ss14" on' snapshotFeature = '"NWID" on, "ss14" on'
[buildPlans.iosevka-term-ss14.variants] [buildPlans.iosevka-term-ss14.variants]
inherits = ["ss14"] inherits = "ss14"
################################################################################################### ###################################################################################################

View file

@ -150,7 +150,7 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] :
set lookupRank : lookupRank + 1 set lookupRank : lookupRank + 1
do "Operator centering" do "Operator centering"
define centerizeGroups : { asterisk_center caret_center tilde_center colon_center [if [hasLG 'dotoper'] period_center nothing]}.filter (x => x) define centerizeGroups : { asterisk_center caret_center tilde_center colon_center [if [hasLG 'dot-oper'] period_center nothing]}.filter (x => x)
do "Bracket-star" do "Bracket-star"
CreateLigationLookup : keep-if 'brst' : list CreateLigationLookup : keep-if 'brst' : list

View file

@ -253,11 +253,11 @@ function createGrDisplaySheet(glyphStore, gid) {
let charVariantFeatures = []; let charVariantFeatures = [];
const decomposition = CvDecompose.get(glyph); const decomposition = CvDecompose.get(glyph);
if (decomposition) { if (decomposition) {
const variantFeatureSet = new Set(); const variantAssignmentSet = new Set();
for (const componentGn of decomposition) { for (const componentGn of decomposition) {
const component = glyphStore.queryByName(componentGn); const component = glyphStore.queryByName(componentGn);
if (!component) continue; if (!component) continue;
const cvRow = queryCvFeatureTagsOf(componentGn, component, variantFeatureSet); const cvRow = queryCvFeatureTagsOf(componentGn, component, variantAssignmentSet);
if (cvRow.length) charVariantFeatures.push(cvRow); if (cvRow.length) charVariantFeatures.push(cvRow);
} }
} else { } else {
@ -273,7 +273,7 @@ function queryPairFeatureTags(gid, f1, f2, sink) {
const re1 = new RegExp(`\\.${f1}$`), const re1 = new RegExp(`\\.${f1}$`),
re2 = new RegExp(`\\.${f2}$`); re2 = new RegExp(`\\.${f2}$`);
if (re1.test(gid) || re2.test(gid)) { if (re1.test(gid) || re2.test(gid)) {
sink.push(f1, f2); sink.push(`'${f1}' 1`, `'${f2}' 1`);
} }
} }
} }
@ -284,7 +284,7 @@ function byTagPreference(a, b) {
if (ua > ub) return 1; if (ua > ub) return 1;
return 0; return 0;
} }
function queryCvFeatureTagsOf(gid, glyph, vfs) { function queryCvFeatureTagsOf(gid, glyph, variantAssignmentSet) {
const cvs = AnyCv.query(glyph).sort(byTagPreference); const cvs = AnyCv.query(glyph).sort(byTagPreference);
let results = []; let results = [];
let existingGlyphs = new Set(); let existingGlyphs = new Set();
@ -294,10 +294,13 @@ function queryCvFeatureTagsOf(gid, glyph, vfs) {
if (target === gid) continue; if (target === gid) continue;
if (existingGlyphs.has(target)) continue; if (existingGlyphs.has(target)) continue;
existingGlyphs.add(target); existingGlyphs.add(target);
if (!vfs) results.push(tag);
else if (!vfs.has(tag)) { const assignCss = `'${tag}' ${gr.rank}`;
results.push(tag); if (!variantAssignmentSet) {
vfs.add(tag); results.push(assignCss);
} else if (!variantAssignmentSet.has(assignCss)) {
results.push(assignCss);
variantAssignmentSet.add(assignCss);
} }
} }
return results; return results;

View file

@ -9,7 +9,8 @@ module.exports = function applyLigationData(data, para, argv) {
const hives = {}; const hives = {};
hives["default"] = { caltBuildup: [] }; hives["default"] = { caltBuildup: [] };
for (const gr in data.simple) { for (const gr in data.simple) {
hives[gr] = { appends: { caltBuildup: [data.simple[gr].ligGroup] } }; hives["enable-" + gr] = { appends: { caltBuildup: [data.simple[gr].ligGroup] } };
hives["disable-" + gr] = { removes: { caltBuildup: [data.simple[gr].ligGroup] } };
} }
for (const gr in data.composite) { for (const gr in data.composite) {
const comp = data.composite[gr]; const comp = data.composite[gr];
@ -22,7 +23,7 @@ module.exports = function applyLigationData(data, para, argv) {
optInBuildup[comp.tag] = ligSets; optInBuildup[comp.tag] = ligSets;
} }
if (!comp.isOptOut) { if (!comp.isOptOut) {
hives[gr] = { caltBuildup: ligSets }; hives["ligset-" + gr] = { caltBuildup: ligSets };
} }
} }
@ -30,7 +31,22 @@ module.exports = function applyLigationData(data, para, argv) {
defaultBuildup: { ...optInBuildup, ...optOutBuildup }, defaultBuildup: { ...optInBuildup, ...optOutBuildup },
caltBuildup: [] caltBuildup: []
}; };
if (argv.ligationBuildup) Parameters.apply(para.ligation, hives, [argv.ligationBuildup]); if (argv.ligations) {
if (argv.ligations.inherits)
Parameters.apply(para.ligation, hives, ["ligset-" + argv.ligations.inherits]);
if (argv.ligations.disables)
Parameters.apply(
para.ligation,
hives,
argv.ligations.disables.map(x => `disable-${x}`)
);
if (argv.ligations.enables)
Parameters.apply(
para.ligation,
hives,
argv.ligations.enables.map(x => `enable-${x}`)
);
}
}; };
function createBuildup(simple, buildup) { function createBuildup(simple, buildup) {

View file

@ -48,6 +48,14 @@ function intro(source, style, blendArgs, sink) {
for (const k in mu) sink[k] = [...(sink[k] || []), ...mu[k]]; for (const k in mu) sink[k] = [...(sink[k] || []), ...mu[k]];
delete hive.appends; delete hive.appends;
} }
if (hive.removes) {
const mu = hive.removes;
for (const k in mu) {
const s = new Set(mu[k]);
sink[k] = [...(sink[k] || [])].filter(x => !s.has(x));
}
delete hive.removes;
}
hive = hiveBlend(hive, getBlendArg(blendArgs, style)); hive = hiveBlend(hive, getBlendArg(blendArgs, style));
for (const k in hive) sink[k] = hive[k]; for (const k in hive) sink[k] = hive[k];

View file

@ -88,10 +88,10 @@ class Composite {
} }
resolve(para, selTree, catalog, vs) { resolve(para, selTree, catalog, vs) {
if (this.inherits) { if (this.inherits) {
for (const item of this.inherits) { if (!catalog.has(this.inherits)) {
if (!catalog.has(item)) throw new Error(`Cannot find composite variant: ${item}`); throw new Error(`Cannot find composite variant: ${this.inherits}`);
catalog.get(item).resolve(para, selTree, catalog, vs);
} }
catalog.get(this.inherits).resolve(para, selTree, catalog, vs);
} }
for (const [prime, variant] of this.decompose(para, selTree)) { for (const [prime, variant] of this.decompose(para, selTree)) {
variant.resolve(para, vs); variant.resolve(para, vs);

View file

@ -1,195 +1,197 @@
[simple.calt-center-ops] [simple.center-ops]
ligGroup = 'center-ops' ligGroup = 'center-ops'
desc = 'Vertically align some of the operators (like `*`) to the center position it is before or after a "center" operator (like `+`)' desc = 'Vertically align some of the operators (like `*`) to the center position it is before or after a "center" operator (like `+`)'
[simple.calt-arrow] [simple.arrow]
ligGroup = "arrow" ligGroup = "arrow"
desc = 'Enable ligation set that forms arrows' desc = 'Enable ligation set that forms arrows'
[simple.calt-arrow2] [simple.arrow2]
ligGroup = "arrow2" ligGroup = "arrow2"
desc = 'Enable ligation for more arrows, like `>>=`' desc = 'Enable ligation for more arrows, like `>>=`'
[simple.calt-trig] [simple.trig]
ligGroup = "trig" ligGroup = "trig"
desc = 'Enable ligation for `<|`, `|>` , `<||`, and other bar-and-angle-bracket symbols' desc = 'Enable ligation for `<|`, `|>` , `<||`, and other bar-and-angle-bracket symbols'
[simple.calt-eqeqeq] [simple.eqeqeq]
ligGroup = "eqeqeq" ligGroup = "eqeqeq"
desc = 'Enable special ligation for `===` with triple lines' desc = 'Enable special ligation for `===` with triple lines'
[simple.calt-eqeq] [simple.eqeq]
ligGroup = "eqeq" ligGroup = "eqeq"
desc = 'Enable ligation for `==` and `===`' desc = 'Enable ligation for `==` and `===`'
[simple.calt-ineq] [simple.ineq]
ligGroup = "ineq" ligGroup = "ineq"
desc = 'Enable ligation for `<=` and `>=`' desc = 'Enable ligation for `<=` and `>=`'
[simple.calt-exeqeq] [simple.exeqeq]
ligGroup = "exeqeq" ligGroup = "exeqeq"
desc = 'Enable special ligation for `!==` with triple lines' desc = 'Enable special ligation for `!==` with triple lines'
[simple.calt-eqexeq] [simple.eqexeq]
ligGroup = "eqexeq" ligGroup = "eqexeq"
desc = 'Enable special ligation for `=!=` with triple lines' desc = 'Enable special ligation for `=!=` with triple lines'
[simple.calt-eqexeq-dl] [simple.eqexeq-dl]
ligGroup = "eqexeq-dl" ligGroup = "eqexeq-dl"
desc = 'Enable special ligation for `=!=` with double lines' desc = 'Enable special ligation for `=!=` with double lines'
[simple.calt-exeq] [simple.exeq]
ligGroup = "exeq" ligGroup = "exeq"
desc = 'Enable ligation for `!=` and `!==`' desc = 'Enable ligation for `!=` and `!==`'
[simple.calt-exeq-alt-1] [simple.exeq-alt-1]
ligGroup = "exeq-alt-1" ligGroup = "exeq-alt-1"
desc = 'Enable ligation for `!=` and `!==` with a dot at below for distinction' desc = 'Enable ligation for `!=` and `!==` with a dot at below for distinction'
[simple.calt-tildeeq] [simple.tildeeq]
ligGroup = "tildeeq" ligGroup = "tildeeq"
desc = 'Enable ligation for `~=` as inequality' desc = 'Enable ligation for `~=` as inequality'
[simple.calt-eqslasheq] [simple.eqslasheq]
ligGroup = "eqslasheq" ligGroup = "eqslasheq"
desc = 'Enable special triple-line ligation for `=/=` as inequality' desc = 'Enable special triple-line ligation for `=/=` as inequality'
[simple.calt-slasheq] [simple.slasheq]
ligGroup = "slasheq" ligGroup = "slasheq"
desc = 'Enable ligation for `/=` and `=/=` as inequality' desc = 'Enable ligation for `/=` and `=/=` as inequality'
[simple.calt-ltgt-ne] [simple.ltgt-ne]
ligGroup = "ltgt-ne" ligGroup = "ltgt-ne"
desc = 'Enable ligation for `<>` as inequality' desc = 'Enable ligation for `<>` as inequality'
[simple.calt-ltgt-diamond] [simple.ltgt-diamond]
ligGroup = "ltgt-diamond" ligGroup = "ltgt-diamond"
desc = 'Enable ligation for `<>` as diamond' desc = 'Enable ligation for `<>` as diamond'
[simple.calt-brst] [simple.brst]
ligGroup = "brst" ligGroup = "brst"
desc = 'Center asterisk in `(*` and `*)`' desc = 'Center asterisk in `(*` and `*)`'
[simple.calt-plusplus] [simple.plusplus]
ligGroup = "plusplus" ligGroup = "plusplus"
desc = 'Enable ligation for `++` and further plus-chaining' desc = 'Enable ligation for `++` and further plus-chaining'
[simple.calt-kern-dotty] [simple.kern-dotty]
ligGroup = "kern-dotty" ligGroup = "kern-dotty"
desc = 'Move connecting dotty punctuations closer, like for `::`, `:::` and `...`' desc = 'Move connecting dotty punctuations closer, like for `::`, `:::` and `...`'
[simple.calt-logic] [simple.logic]
ligGroup = "logic" ligGroup = "logic"
desc = 'Enable ligation for `/\` and `\/`' desc = 'Enable ligation for `/\` and `\/`'
[simple.calt-llgg] [simple.llgg]
ligGroup = "llgg" ligGroup = "llgg"
desc = 'Enable ligation for `<<`, `>>` and other angle-bracket chaining' desc = 'Enable ligation for `<<`, `>>` and other angle-bracket chaining'
[simple.calt-llggeq] [simple.llggeq]
ligGroup = "llggeq" ligGroup = "llggeq"
desc = 'Enable ligation for `<<=`, `>>=` as shift operator' desc = 'Enable ligation for `<<=`, `>>=` as shift operator'
[simple.calt-dotoper] [simple.dot-as-operator]
ligGroup = "dotoper" ligGroup = "dot-oper"
desc = 'Treat dot (`.`) as operator and perform chained centering' desc = 'Treat dot (`.`) as operator and perform chained centering'
[simple.calt-arrowZALE] [simple.lteq-as-arrow]
ligGroup = "arrowZALE" ligGroup = "arrowZALE"
desc = 'Treat `<=` as arrow' desc = 'Treat `<=` as arrow'
[simple.calt-arrowZAGE] [simple.gteq-as-co-arrow]
ligGroup = "arrowZAGE" ligGroup = "arrowZAGE"
desc = 'Treat `>=` as co-arrow' desc = 'Treat `>=` as co-arrow'
[simple.calt-html-comment] [simple.html-comment]
ligGroup = "html-comment" ligGroup = "html-comment"
desc = 'Enable ligation for `<!--` and `<!---`' desc = 'Enable ligation for `<!--` and `<!---`'
[simple.calt-colon-greater-as-colon-arrow] [simple.colon-greater-as-colon-arrow]
ligGroup = "colon-greater" ligGroup = "colon-greater"
desc = 'Transform `:>` into `:` and a narrow arrow.' desc = 'Transform `:>` into `:` and a narrow arrow.'
[composite.ligset-calt] ###################################################################################################
[composite.calt]
isOptOut = true # This feature is on by default by many software isOptOut = true # This feature is on by default by many software
tag = 'calt' tag = 'calt'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeq', 'calt-exeq', 'calt-ineq', 'calt-plusplus', 'calt-kern-dotty'] buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeq', 'exeq', 'ineq', 'plusplus', 'kern-dotty']
brief = 'Default' brief = 'Default'
desc = 'Default setting in text editors' desc = 'Default setting in text editors'
[composite.ligset-dlig] [composite.dlig]
tag = 'dlig' tag = 'dlig'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-arrow2', 'calt-llgg', 'calt-eqeq', 'calt-exeq', 'calt-ineq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-kern-dotty', 'calt-dotoper', 'calt-logic', 'calt-brst'] buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'arrow2', 'llgg', 'eqeq', 'exeq', 'ineq', 'ltgt-diamond', 'plusplus', 'kern-dotty', 'dot-as-operator', 'logic', 'brst']
brief = 'Discretionary' brief = 'Discretionary'
desc = 'Discretionary ligatures' desc = 'Discretionary ligatures'
[composite.ligset-clike] [composite.clike]
tag = 'CLIK' tag = 'CLIK'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeqeq', 'calt-eqeq', 'calt-exeqeq', 'calt-exeq', 'calt-ineq', 'calt-plusplus', 'calt-kern-dotty'] buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeqeq', 'eqeq', 'exeqeq', 'exeq', 'ineq', 'plusplus', 'kern-dotty']
desc = 'C-Like' desc = 'C-Like'
[composite.ligset-javascript] [composite.javascript]
tag = 'JSPT' tag = 'JSPT'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeqeq', 'calt-eqeq', 'calt-exeqeq', 'calt-exeq', 'calt-ineq', 'calt-plusplus', 'calt-kern-dotty'] buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeqeq', 'eqeq', 'exeqeq', 'exeq', 'ineq', 'plusplus', 'kern-dotty']
desc = 'JavaScript' desc = 'JavaScript'
[composite.ligset-php] [composite.php]
tag = 'PHPX' tag = 'PHPX'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeqeq', 'calt-eqeq', 'calt-exeqeq', 'calt-exeq', 'calt-ineq', 'calt-plusplus', 'calt-kern-dotty'] buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeqeq', 'eqeq', 'exeqeq', 'exeq', 'ineq', 'plusplus', 'kern-dotty']
desc = 'PHP' desc = 'PHP'
[composite.ligset-ml] [composite.ml]
tag = 'MLXX' tag = 'MLXX'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-trig', 'calt-eqeq', 'calt-ltgt-ne', 'calt-ineq', 'calt-brst', 'calt-plusplus', 'calt-logic'] buildup = ['center-ops', 'arrow', 'trig', 'eqeq', 'ltgt-ne', 'ineq', 'brst', 'plusplus', 'logic']
desc = 'ML' desc = 'ML'
[composite.ligset-fsharp] [composite.fsharp]
tag = 'FSHP' tag = 'FSHP'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-trig', 'calt-eqeq', 'calt-ltgt-ne', 'calt-ineq', 'calt-brst', 'calt-plusplus', 'calt-logic'] buildup = ['center-ops', 'arrow', 'trig', 'eqeq', 'ltgt-ne', 'ineq', 'brst', 'plusplus', 'logic']
desc = 'F#' desc = 'F#'
[composite.ligset-fstar] [composite.fstar]
tag = 'FSTA' tag = 'FSTA'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-trig', 'calt-eqeq', 'calt-ltgt-ne', 'calt-eqeqeq', 'calt-eqexeq', 'calt-ineq', 'calt-brst', 'calt-plusplus', 'calt-logic'] buildup = ['center-ops', 'arrow', 'trig', 'eqeq', 'ltgt-ne', 'eqeqeq', 'eqexeq', 'ineq', 'brst', 'plusplus', 'logic']
desc = 'F*' desc = 'F*'
[composite.ligset-haskell] [composite.haskell]
tag = 'HSKL' tag = 'HSKL'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-slasheq', 'calt-ineq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic'] buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'slasheq', 'ineq', 'ltgt-diamond', 'plusplus', 'dot-as-operator', 'kern-dotty', 'logic']
desc = 'Haskell' desc = 'Haskell'
[composite.ligset-idris] [composite.idris]
tag = 'IDRS' tag = 'IDRS'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-slasheq', 'calt-ineq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic'] buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'slasheq', 'ineq', 'ltgt-diamond', 'plusplus', 'dot-as-operator', 'kern-dotty', 'logic']
desc = 'Idris' desc = 'Idris'
[composite.ligset-elm] [composite.elm]
tag = 'ELMX' tag = 'ELMX'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-slasheq', 'calt-ineq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic'] buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'slasheq', 'ineq', 'ltgt-diamond', 'plusplus', 'dot-as-operator', 'kern-dotty', 'logic']
desc = 'Elm' desc = 'Elm'
[composite.ligset-purescript] [composite.purescript]
tag = 'PURS' tag = 'PURS'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-slasheq', 'calt-ineq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic'] buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'slasheq', 'ineq', 'ltgt-diamond', 'plusplus', 'dot-as-operator', 'kern-dotty', 'logic']
desc = 'PureScript' desc = 'PureScript'
[composite.ligset-swift] [composite.swift]
tag = 'SWFT' tag = 'SWFT'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-exeq', 'calt-ineq', 'calt-ltgt-diamond', 'calt-plusplus'] buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'exeq', 'ineq', 'ltgt-diamond', 'plusplus']
desc = 'Swift' desc = 'Swift'
[composite.ligset-coq] [composite.coq]
tag = 'COQX' tag = 'COQX'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ltgt-ne', 'calt-ineq', 'calt-plusplus', 'calt-dotoper', 'calt-logic', 'calt-brst'] buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ltgt-ne', 'ineq', 'plusplus', 'dot-as-operator', 'logic', 'brst']
desc = 'Coq' desc = 'Coq'
[composite.ligset-matlab] [composite.matlab]
tag = 'MTLB' tag = 'MTLB'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-tildeeq', 'calt-ineq', 'calt-plusplus', 'calt-kern-dotty'] buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'eqeq', 'tildeeq', 'ineq', 'plusplus', 'kern-dotty']
desc = 'Matlab' desc = 'Matlab'
[composite.ligset-wolfram] [composite.wolfram]
tag = 'WFLM' tag = 'WFLM'
buildup = ['calt-center-ops', 'calt-arrow', 'calt-trig', 'calt-ltgt-diamond', 'calt-eqeq', 'calt-exeq', 'calt-eqexeq-dl', 'calt-ineq', 'calt-brst', 'calt-plusplus', 'calt-logic', 'calt-colon-greater-as-colon-arrow'] buildup = ['center-ops', 'arrow', 'trig', 'ltgt-diamond', 'eqeq', 'exeq', 'eqexeq-dl', 'ineq', 'brst', 'plusplus', 'logic', 'colon-greater-as-colon-arrow']
brief = 'Wolfram' brief = 'Wolfram'
desc = 'Wolfram Language (Mathematica)' desc = 'Wolfram Language (Mathematica)'

View file

@ -2,14 +2,14 @@
family = "Iosevka Custom" # Font menu family name family = "Iosevka Custom" # Font menu family name
spacing = "normal" # Optional; Values: `normal`, `term`, `fontconfig-mono`, or `fixed` spacing = "normal" # Optional; Values: `normal`, `term`, `fontconfig-mono`, or `fixed`
serifs = "sans" # Optional; Values: `sans` or `slab` serifs = "sans" # Optional; Values: `sans` or `slab`
digit-form = "lining" # Optional; Values `lining` or `olt-style` digit-form = "lining" # Optional; Values `lining` or `old-style`
################################################################################################### ###################################################################################################
# Configure variants # Configure variants
# Optional; Whether to inherit a `ss##` variant # Optional; Whether to inherit a `ss##` variant
[buildPlans.iosevka-custom.variants] [buildPlans.iosevka-custom.variants]
inherits = ["ss01"] inherits = "ss01"
# Optional; Configure single character's variant # Optional; Configure single character's variant
[buildPlans.iosevka-custom.variants.design] [buildPlans.iosevka-custom.variants.design]
@ -28,6 +28,18 @@ l = 'italic'
# End variant section # End variant section
################################################################################################### ###################################################################################################
###################################################################################################
# Configure ligations
[buildPlans.iosevka-custom.ligations]
inherits = "calt" # Optional; inherits an existing ligation set
disables = [] # Optional; disable specific ligation groups, overrides inherited ligation set
enables = [] # Optional; enable specific ligation groups, overrides inherited ligation set
# End ligation section
###################################################################################################
################################################################################################### ###################################################################################################
# Override default building weights # Override default building weights
# When buildPlans.<plan name>.weights is absent, all weights would built and mapped to # When buildPlans.<plan name>.weights is absent, all weights would built and mapped to

View file

@ -29,10 +29,13 @@ async function main() {
async function processSs() { async function processSs() {
const variantsData = await parseVariantsData(); const variantsData = await parseVariantsData();
const md = new MdCol("Section-Stylistic-Sets"); const md = new MdCol("Section-Stylistic-Sets");
md.log(`* Styles as stylistic sets:\n`); md.log(
`* \`inherits\`: Optional, String, defines the inherited stylistic set. ` +
`Valid options include:\n`
);
for (const gr of variantsData.ssData) { for (const gr of variantsData.ssData) {
if (!gr.effective) continue; if (!gr.effective) continue;
md.log(` * \`${gr.tag}\`: Set character variant to “${gr.description}”.`); md.log(` - \`${gr.tag}\`: Set character variant to “${gr.description}”.`);
} }
return md; return md;
} }
@ -40,22 +43,28 @@ async function processCv() {
const variantsData = await parseVariantsData(); const variantsData = await parseVariantsData();
const md = new MdCol("Section-Cherry-Picking-Styles"); const md = new MdCol("Section-Cherry-Picking-Styles");
md.log( md.log(
`* Styles for individual characters. They are easy-to-understand names of the \`cv##\` styles, including:\n` `* \`design\`, \`upright\` and \`italic\`: Optional, Dictionary, ` +
`defines styles for individual characters. ` +
`The choices are organized in key-value pairs, ` +
`assigning a variant to a character group. ` +
`Alternatively, you could assign numbers to \`cv##\` tags, ` +
`like what you did when using OpenType in CSS.` +
`The valid combinations include:\n`
); );
for (const gr of variantsData.cvData) { for (const gr of variantsData.cvData) {
const sampleText = gr.descSampleText const sampleText = gr.descSampleText
.map(c => (c === "`" ? "`` ` ``" : `\`${c}\``)) .map(c => (c === "`" ? "`` ` ``" : `\`${c}\``))
.join(", "); .join(", ");
md.log(` * Styles for ${sampleText}:`); md.log(` - Styles for ${sampleText}:`);
const defaults = figureOutDefaults(variantsData, gr); const defaults = figureOutDefaults(variantsData, gr);
for (const config of gr.variants) { for (const config of gr.variants) {
if (!config.rank) continue; if (!config.rank) continue;
let selectorText = `\`${gr.key} = ${config.selector}\``; let selectorText = `\`${gr.key} = '${config.selector}'\``;
if (gr.tag && config.rank) { if (gr.tag && config.rank) {
selectorText += `, \`${gr.tag} = ${config.rank}\``; selectorText += `, \`${gr.tag} = ${config.rank}\``;
} }
md.log( md.log(
` * ${selectorText}: ` + ` + ${selectorText}: ` +
`${config.description}${formatDefaults(config.selector, defaults)}.` `${config.description}${formatDefaults(config.selector, defaults)}.`
); );
} }
@ -67,7 +76,7 @@ async function processPrivateBuildPlans() {
const md = new MdCol("Section-Private-Build-Plan-Sample"); const md = new MdCol("Section-Private-Build-Plan-Sample");
const tomlPath = path.resolve(__dirname, "../../private-build-plans.sample.toml"); const tomlPath = path.resolve(__dirname, "../../private-build-plans.sample.toml");
const toml = await fs.readFile(tomlPath, "utf-8"); const toml = await fs.readFile(tomlPath, "utf-8");
md.log(toml.replace(/^/gm, "\t")); md.log("```toml\n" + toml + "```");
return md; return md;
} }
@ -152,26 +161,30 @@ async function processLigSetCherryPicking() {
const ligData = await parseLigationData(); const ligData = await parseLigationData();
const md = new MdCol("Section-Cherry-Picking-Ligation-Sets"); const md = new MdCol("Section-Cherry-Picking-Ligation-Sets");
md.log( md.log(
`* Styles for customizing the default (\`calt\`) ligation set. By choosing one or ` + `* \`disables\` and \`enables\`: Optional, String Array, ` +
`multiple items listed below, the ligation set of \`calt\` will *only* contain the ` + `Cherry-picking ligation groups to be disabled or enabled. ` +
`corresponded ligations of the selectors you used.\n` `Valid values include:\n`
); );
for (const gr in ligData.cherry) { for (const gr in ligData.cherry) {
md.log(` * \`${gr}\`: ${ligData.cherry[gr].desc}.`); md.log(` - \`${gr}\`: ${ligData.cherry[gr].desc}.`);
} }
return md; return md;
} }
async function processLigSetPreDef() { async function processLigSetPreDef() {
const ligData = await parseLigationData(); const ligData = await parseLigationData();
const md = new MdCol("Section-Cherry-Picking-Predefined"); const md = new MdCol("Section-Predefined-Ligation-Sets");
md.log(`* Styles for ligation sets, include:\n`); md.log(
`* \`inherits\`: Optional, String, defines the inherited ligation set. ` +
`When absent, the ligation set will not inherit any other sets. ` +
`Valid values are:\n`
);
for (const gr in ligData.rawSets) { for (const gr in ligData.rawSets) {
if (ligData.rawSets[gr].isOptOut) continue; if (ligData.rawSets[gr].isOptOut) continue;
const longDesc = const longDesc =
ligData.rawSets[gr].longDesc || ligData.rawSets[gr].longDesc ||
`Default ligation set would be assigned to ${ligData.rawSets[gr].desc}`; `Default ligation set would be assigned to ${ligData.rawSets[gr].desc}`;
md.log(` * \`${gr}\`: ${longDesc}.`); md.log(` - \`${gr}\`: ${longDesc}.`);
} }
return md; return md;
} }

View file

@ -11,7 +11,8 @@ const version = require("../../package.json").version;
const charMapPath = process.argv[2]; const charMapPath = process.argv[2];
const charMapItalicPath = process.argv[3]; const charMapItalicPath = process.argv[3];
const charMapObliquePath = process.argv[4]; const charMapObliquePath = process.argv[4];
const exportPath = process.argv[5]; const exportPathMeta = process.argv[5];
const exportPathCov = process.argv[6];
execMain(main); execMain(main);
@ -24,5 +25,6 @@ async function main() {
charMapItalicPath, charMapItalicPath,
charMapObliquePath charMapObliquePath
); );
await fs.writeJson(exportPath, { version, variantsData, ligationData, ...cl }, { spaces: 2 }); await fs.writeJson(exportPathMeta, { version, variantsData, ligationData }, { spaces: 2 });
await fs.writeJson(exportPathCov, { version, ...cl }, { spaces: 2 });
} }

View file

@ -25,7 +25,7 @@ const trig = TAG("trig");
const ltgt = TAG("ltgt-diamond", "ltgt-ne"); const ltgt = TAG("ltgt-diamond", "ltgt-ne");
const llggeq_a = TAG("arrow", "llggeq"); const llggeq_a = TAG("arrow", "llggeq");
const llggeq_b = TAG("arrow2", "llggeq"); const llggeq_b = TAG("arrow2", "llggeq");
const dotOper = TAG("dotoper"); const dotOper = TAG("dot-oper");
const kernDotty = TAG("kern-dotty"); const kernDotty = TAG("kern-dotty");
const htmlComment = TAG("html-comment"); const htmlComment = TAG("html-comment");
const plusPlus = TAG("plusplus"); const plusPlus = TAG("plusplus");

View file

@ -198,6 +198,7 @@ const FontInfoOf = computed.group("metadata:font-info-of", async (target, fileNa
return { return {
name: fileName, name: fileName,
variants: bp.variants || null, variants: bp.variants || null,
ligations: bp["ligations"] || null,
featureControl: { featureControl: {
noCvSs: bp["no-cv-ss"] || false, noCvSs: bp["no-cv-ss"] || false,
noLigation: bp["no-ligation"] || false noLigation: bp["no-ligation"] || false
@ -677,7 +678,8 @@ const PagesDataExport = task(`pages:data-export`, async target => {
cm.full, cm.full,
cmi.full, cmi.full,
cmo.full, cmo.full,
Path.resolve(pagesDir, "shared/data-import/iosevka.json") Path.resolve(pagesDir, "shared/data-import/raw/metadata.json"),
Path.resolve(pagesDir, "shared/data-import/raw/coverage.json")
); );
}); });