3.2.2 recovery
|
@ -195,7 +195,7 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i
|
||||||
|
|
||||||
|
|
||||||
<!-- END Section-Private-Build-Plan-Sample -->
|
<!-- END Section-Private-Build-Plan-Sample -->
|
||||||
|
|
||||||
|
|
||||||
3. Run `npm run build -- contents::<your plan name>` and the built fonts would be avaliable in `dist/`. Aside from `contents::<plan>`, other options are:
|
3. Run `npm run build -- contents::<your plan name>` and the built fonts would be avaliable in `dist/`. Aside from `contents::<plan>`, other options are:
|
||||||
|
|
||||||
|
|
1
changes/3.2.2.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* Fix broken ligation of kerning colons and dot-related symbols.
|
|
@ -7,6 +7,54 @@ module.exports = function gcFont(gs, excludedChars, restFont, cfg) {
|
||||||
sweep(gs, restFont, sink);
|
sweep(gs, restFont, sink);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function markSweepOtl(table) {
|
||||||
|
if (!table || !table.features || !table.lookups) return;
|
||||||
|
const accessibleLookupsIds = new Set();
|
||||||
|
markLookups(table, accessibleLookupsIds);
|
||||||
|
let lookups1 = {};
|
||||||
|
for (const l in table.lookups) {
|
||||||
|
if (accessibleLookupsIds.has(l)) lookups1[l] = table.lookups[l];
|
||||||
|
}
|
||||||
|
table.lookups = lookups1;
|
||||||
|
|
||||||
|
let features1 = {};
|
||||||
|
for (let f in table.features) {
|
||||||
|
const feature = table.features[f];
|
||||||
|
if (!feature) continue;
|
||||||
|
const featureFiltered = [];
|
||||||
|
for (const l of feature) if (accessibleLookupsIds.has(l)) featureFiltered.push(l);
|
||||||
|
if (!featureFiltered.length) continue;
|
||||||
|
features1[f] = featureFiltered;
|
||||||
|
}
|
||||||
|
table.features = features1;
|
||||||
|
}
|
||||||
|
function markLookups(table, sink) {
|
||||||
|
if (!table || !table.features) return;
|
||||||
|
for (let f in table.features) {
|
||||||
|
const feature = table.features[f];
|
||||||
|
if (!feature) continue;
|
||||||
|
for (const l of feature) sink.add(l);
|
||||||
|
}
|
||||||
|
let loop = 0,
|
||||||
|
lookupSetChanged = false;
|
||||||
|
do {
|
||||||
|
lookupSetChanged = false;
|
||||||
|
let sizeBefore = sink.size;
|
||||||
|
for (const l of Array.from(sink)) {
|
||||||
|
const lookup = table.lookups[l];
|
||||||
|
if (!lookup || !lookup.subtables) continue;
|
||||||
|
if (lookup.type === "gsub_chaining" || lookup.type === "gpos_chaining") {
|
||||||
|
for (let st of lookup.subtables) {
|
||||||
|
if (!st || !st.apply) continue;
|
||||||
|
for (const app of st.apply) sink.add(app.lookup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loop++;
|
||||||
|
lookupSetChanged = sizeBefore !== sink.size;
|
||||||
|
} while (loop < 0xff && lookupSetChanged);
|
||||||
|
}
|
||||||
|
|
||||||
function mark(gs, excludedChars, restFont, cfg) {
|
function mark(gs, excludedChars, restFont, cfg) {
|
||||||
const sink = markInitial(gs, excludedChars);
|
const sink = markInitial(gs, excludedChars);
|
||||||
while (markStep(sink, restFont, cfg));
|
while (markStep(sink, restFont, cfg));
|
||||||
|
@ -25,72 +73,19 @@ function markInitial(gs, excludedChars) {
|
||||||
|
|
||||||
function markStep(sink, restFont, cfg) {
|
function markStep(sink, restFont, cfg) {
|
||||||
const glyphCount = sink.size;
|
const glyphCount = sink.size;
|
||||||
|
|
||||||
if (restFont.GSUB) {
|
if (restFont.GSUB) {
|
||||||
for (const l in restFont.GSUB.lookups) {
|
for (const l in restFont.GSUB.lookups) {
|
||||||
const lookup = restFont.GSUB.lookups[l];
|
const lookup = restFont.GSUB.lookups[l];
|
||||||
if (!lookup || !lookup.subtables) continue;
|
if (!lookup || !lookup.subtables) continue;
|
||||||
if (lookup && lookup.subtables) {
|
for (let st of lookup.subtables) {
|
||||||
for (let st of lookup.subtables) {
|
markSubtable(sink, lookup.type, st, cfg);
|
||||||
markSubtable(sink, lookup.type, st, cfg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const glyphCount1 = sink.size;
|
const glyphCount1 = sink.size;
|
||||||
return glyphCount1 > glyphCount;
|
return glyphCount1 > glyphCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
function markSweepOtl(table) {
|
|
||||||
if (!table || !table.features || !table.lookups) return;
|
|
||||||
const accessibleLookupsIds = new Set();
|
|
||||||
markLookups(table, accessibleLookupsIds);
|
|
||||||
|
|
||||||
let lookups1 = {};
|
|
||||||
for (const l in table.lookups) {
|
|
||||||
if (accessibleLookupsIds.has(l)) lookups1[l] = table.lookups[l];
|
|
||||||
}
|
|
||||||
table.lookups = lookups1;
|
|
||||||
|
|
||||||
let features1 = {};
|
|
||||||
for (let f in table.features) {
|
|
||||||
const feature = table.features[f];
|
|
||||||
if (!feature) continue;
|
|
||||||
const featureFiltered = [];
|
|
||||||
for (const l of feature) if (accessibleLookupsIds.has(l)) featureFiltered.push(l);
|
|
||||||
if (!featureFiltered.length) continue;
|
|
||||||
features1[f] = featureFiltered;
|
|
||||||
}
|
|
||||||
table.features = features1;
|
|
||||||
}
|
|
||||||
function markLookups(gsub, sink) {
|
|
||||||
if (!gsub || !gsub.features) return;
|
|
||||||
for (let f in gsub.features) {
|
|
||||||
const feature = gsub.features[f];
|
|
||||||
if (!feature) continue;
|
|
||||||
for (const l of feature) sink.add(l);
|
|
||||||
}
|
|
||||||
let loop = 0,
|
|
||||||
lookupSetChanged = false;
|
|
||||||
do {
|
|
||||||
lookupSetChanged = false;
|
|
||||||
let sizeBefore = sink.size;
|
|
||||||
for (const l of Array.from(sink)) {
|
|
||||||
const lookup = gsub.lookups[l];
|
|
||||||
if (!lookup || !lookup.subtables) continue;
|
|
||||||
if (lookup.type === "gsub_chaining" || lookup.type === "gpos_chaining") {
|
|
||||||
for (let st of lookup.subtables) {
|
|
||||||
if (!st || !st.apply) continue;
|
|
||||||
for (const app of st.apply) sink.add(app.lookup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
loop++;
|
|
||||||
lookupSetChanged = sizeBefore !== sink.size;
|
|
||||||
} while (loop < 0xff && lookupSetChanged);
|
|
||||||
}
|
|
||||||
|
|
||||||
function markSubtable(sink, type, st, cfg) {
|
function markSubtable(sink, type, st, cfg) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "gsub_single":
|
case "gsub_single":
|
||||||
|
@ -143,24 +138,109 @@ function sweepOtl(gsub, sink) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sweepSubtable(st, type, sink) {
|
function sweepSubtable(st, type, gs) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "gsub_ligature": {
|
case "gsub_single":
|
||||||
if (!st.substitutions) return false;
|
return sweep_GsubSingle(st, gs);
|
||||||
let newSubst = [];
|
case "gsub_multiple":
|
||||||
for (const rule of st.substitutions) {
|
return sweep_GsubMultiple(st, gs);
|
||||||
let include = true;
|
case "gsub_ligature":
|
||||||
if (!sink.has(rule.to)) include = false;
|
return sweep_GsubLigature(st, gs);
|
||||||
for (const from of rule.from) if (!sink.has(from)) include = false;
|
case "gsub_chaining":
|
||||||
if (include) newSubst.push(rule);
|
return sweep_GsubChaining(st, gs);
|
||||||
}
|
case "gsub_reverse":
|
||||||
st.substitutions = newSubst;
|
return sweep_gsubReverse(st, gs);
|
||||||
return true;
|
default:
|
||||||
}
|
|
||||||
default: {
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function sweep_GsubSingle(st, gs) {
|
||||||
|
let nonEmpty = false;
|
||||||
|
let from = Object.keys(st);
|
||||||
|
for (const gidFrom of from) {
|
||||||
|
if (!gs.has(gidFrom) || !gs.has(st[gidFrom])) {
|
||||||
|
delete st[gidFrom];
|
||||||
|
} else {
|
||||||
|
nonEmpty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return nonEmpty;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sweep_GsubMultiple(st, gs) {
|
||||||
|
let nonEmpty = false;
|
||||||
|
let from = Object.keys(st);
|
||||||
|
for (const gidFrom of from) {
|
||||||
|
let include = gs.has(gidFrom);
|
||||||
|
if (st[gidFrom]) {
|
||||||
|
for (const gidTo of st[gidFrom]) {
|
||||||
|
include = include && gs.has(gidTo);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
include = false;
|
||||||
|
}
|
||||||
|
if (!include) {
|
||||||
|
delete st[gidFrom];
|
||||||
|
} else {
|
||||||
|
nonEmpty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nonEmpty;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sweep_GsubLigature(st, gs) {
|
||||||
|
if (!st.substitutions) return false;
|
||||||
|
let newSubst = [];
|
||||||
|
for (const rule of st.substitutions) {
|
||||||
|
let include = true;
|
||||||
|
if (!gs.has(rule.to)) include = false;
|
||||||
|
for (const from of rule.from) if (!gs.has(from)) include = false;
|
||||||
|
if (include) newSubst.push(rule);
|
||||||
|
}
|
||||||
|
st.substitutions = newSubst;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sweep_GsubChaining(st, gs) {
|
||||||
|
const newMatch = [];
|
||||||
|
for (let j = 0; j < st.match.length; j++) {
|
||||||
|
newMatch[j] = [];
|
||||||
|
for (let k = 0; k < st.match[j].length; k++) {
|
||||||
|
const gidFrom = st.match[j][k];
|
||||||
|
if (gs.has(gidFrom)) {
|
||||||
|
newMatch[j].push(gidFrom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!newMatch[j].length) return false;
|
||||||
|
}
|
||||||
|
st.match = newMatch;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sweep_gsubReverse(st, gs) {
|
||||||
|
const newMatch = [],
|
||||||
|
newTo = [];
|
||||||
|
for (let j = 0; j < st.match.length; j++) {
|
||||||
|
newMatch[j] = [];
|
||||||
|
for (let k = 0; k < st.match[j].length; k++) {
|
||||||
|
const gidFrom = st.match[j][k];
|
||||||
|
let include = gs.has(gidFrom);
|
||||||
|
if (j === st.inputIndex) {
|
||||||
|
include = include && gs.has(st.to[k]);
|
||||||
|
if (include) {
|
||||||
|
newMatch[j].push(gidFrom);
|
||||||
|
newTo.push(st.to[k]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (include) newMatch[j].push(gidFrom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!newMatch[j].length) return false;
|
||||||
|
}
|
||||||
|
st.match = newMatch;
|
||||||
|
st.to = newTo;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterInPlace(a, condition) {
|
function filterInPlace(a, condition) {
|
||||||
|
|
|
@ -1602,7 +1602,7 @@ glyph-block Symbol-Punctuation-Ties : begin
|
||||||
g4 (RightSB - OX) 0
|
g4 (RightSB - OX) 0
|
||||||
save "undertie" 0x203F
|
save "undertie" 0x203F
|
||||||
|
|
||||||
glyph-block Symbol-Punctuation-Ligation Variants : begin
|
glyph-block Symbol-Punctuation-Ligation-Variants : begin
|
||||||
glyph-block-import CommonShapes
|
glyph-block-import CommonShapes
|
||||||
glyph-block-import Overmarks
|
glyph-block-import Overmarks
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 171 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 400 KiB After Width: | Height: | Size: 400 KiB |
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 344 KiB |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 341 KiB |
Before Width: | Height: | Size: 974 KiB After Width: | Height: | Size: 974 KiB |
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iosevka",
|
"name": "iosevka",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"main": "./generate.js",
|
"main": "./generate.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "verda -f verdafile.js",
|
"build": "verda -f verdafile.js",
|
||||||
|
|