Skip to content

Commit bab4c9f

Browse files
committed
Release 1.0.39
2 parents 13453a7 + 127705e commit bab4c9f

145 files changed

Lines changed: 598 additions & 1530 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierrc.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

biome.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"includes": [
11+
"make/**/*.mjs",
12+
"tools/**/*.mjs",
13+
"verdafile.mjs",
14+
"check-env.mjs",
15+
"!hcfg",
16+
"!sources"
17+
]
18+
},
19+
"formatter": {
20+
"enabled": true,
21+
"indentStyle": "tab",
22+
"indentWidth": 4,
23+
"lineEnding": "lf",
24+
"lineWidth": 100
25+
},
26+
"javascript": {
27+
"formatter": {
28+
"arrowParentheses": "asNeeded"
29+
}
30+
},
31+
"linter": {
32+
"enabled": true,
33+
"rules": {
34+
"recommended": true,
35+
"complexity": {
36+
"noExcessiveCognitiveComplexity": "off"
37+
},
38+
"style": {
39+
"useConst": "error"
40+
}
41+
}
42+
},
43+
"overrides": [
44+
{
45+
"includes": [".vscode/**/*.json"],
46+
"json": {
47+
"parser": {
48+
"allowComments": true,
49+
"allowTrailingCommas": true
50+
}
51+
}
52+
}
53+
],
54+
"assist": {
55+
"actions": {
56+
"source": {
57+
"organizeImports": {
58+
"level": "on",
59+
"options": {
60+
"groups": [
61+
[":NODE:"],
62+
":BLANK_LINE:",
63+
[":PACKAGE:"],
64+
":BLANK_LINE:",
65+
"../**",
66+
":BLANK_LINE:",
67+
"./**"
68+
]
69+
}
70+
}
71+
}
72+
}
73+
}
74+
}

check-env.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function check(util) {
44
try {
55
which.sync(util);
66
console.log(` * External dependency <${util}> is present.`);
7-
} catch (e) {
7+
} catch (_e) {
88
console.error(` * External dependency <${util}> not found.`);
99
}
1010
}

eslint.config.mjs

Lines changed: 0 additions & 38 deletions
This file was deleted.

make/helpers/alias-feature.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export function unifySameFeatures(table) {
2-
if (!table || !table.scripts || !table.features) return;
2+
if (!table?.scripts || !table.features) return;
33

4-
let nonAliasable = [];
5-
let aliases = new Map();
4+
const nonAliasable = [];
5+
const aliases = new Map();
66

77
out: for (const feature of table.features) {
88
for (const existing of nonAliasable) {
@@ -22,19 +22,19 @@ export function unifySameFeatures(table) {
2222

2323
function processLang(lang, aliases) {
2424
if (lang.requiredFeature) {
25-
let alias = aliases.get(lang.requiredFeature);
25+
const alias = aliases.get(lang.requiredFeature);
2626
if (alias) lang.requiredFeature = alias;
2727
}
2828
for (let i = 0; i < lang.features.length; i++) {
29-
let alias = aliases.get(lang.features[i]);
29+
const alias = aliases.get(lang.features[i]);
3030
if (alias) lang.features[i] = alias;
3131
}
3232
}
3333

3434
function featureAliasable(a, b) {
3535
if (a.tag !== b.tag) return false;
36-
let lookupsA = new Set(a.lookups);
37-
let lookupsB = new Set(b.lookups);
36+
const lookupsA = new Set(a.lookups);
37+
const lookupsB = new Set(b.lookups);
3838

3939
for (const x of lookupsA) if (!lookupsB.has(x)) return false;
4040
for (const x of lookupsB) if (!lookupsA.has(x)) return false;

make/helpers/drop.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export function dropGlyphNames(a) {
1010
}
1111

1212
export function dropCharacters(a, fn) {
13-
for (const [ch, g] of a.cmap.unicode.entries()) {
13+
for (const [ch, _g] of a.cmap.unicode.entries()) {
1414
if (fn(ch)) a.cmap.unicode.delete(ch);
1515
}
16-
for (const [ch, vs, g] of a.cmap.vs.entries()) {
16+
for (const [ch, vs, _g] of a.cmap.vs.entries()) {
1717
if (fn(ch)) a.cmap.vs.delete(ch, vs);
1818
}
1919
}

make/helpers/feature-simplify.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Ot } from "ot-builder";
22

33
export function simplifySingleSub(table, tag) {
4-
if (!table || !table.features || !table.lookups) return;
4+
if (!table?.features || !table.lookups) return;
55

6-
let mapping = new Map();
6+
const mapping = new Map();
77
for (const feature of table.features) {
88
if (feature.tag !== tag) continue;
99
for (const lookup of feature.lookups) {

make/helpers/font-io.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fs from "fs";
1+
import fs from "node:fs";
22

33
import { FontIo, Ot } from "ot-builder";
44

make/helpers/geometry.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function copyGeometryData(gDst, gSrc) {
1212
if (gSrc.vertical) gDst.vertical = { ...gSrc.vertical };
1313
if (gSrc.geometry) {
1414
gDst.geometry = new Ot.Glyph.ContourSet(
15-
Ot.GeometryUtil.apply(Ot.GeometryUtil.Flattener, gSrc.geometry)
15+
Ot.GeometryUtil.apply(Ot.GeometryUtil.Flattener, gSrc.geometry),
1616
);
1717
}
1818
}

make/helpers/glyph-finder.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class GlyphFinder {
1515
if (!this.font.gsub) return g;
1616

1717
let features = this.font.gsub.features;
18-
let candidateLookups = [];
18+
const candidateLookups = [];
1919
if (scriptTag) {
2020
const script = this.font.gsub.scripts.get(scriptTag);
2121
const language = languageTag
@@ -32,7 +32,7 @@ export class GlyphFinder {
3232

3333
for (const lookup of candidateLookups) {
3434
if (!(lookup instanceof Ot.Gsub.Single)) continue;
35-
let mapped = lookup.mapping.get(g);
35+
const mapped = lookup.mapping.get(g);
3636
if (mapped) return mapped;
3737
}
3838

0 commit comments

Comments
 (0)