Fixup format
This commit is contained in:
parent
0b1452a3a7
commit
e6da99af60
15 changed files with 47 additions and 45 deletions
|
@ -2,3 +2,5 @@
|
|||
printWidth: 100
|
||||
useTabs: true
|
||||
tabWidth: 4
|
||||
trailingComma: none
|
||||
arrowParens: avoid
|
|
@ -12,7 +12,7 @@ const formLigationData = require("../support/ligation-data");
|
|||
const regulateGlyphs = require("../support/regulate-glyph");
|
||||
const toml = require("toml");
|
||||
|
||||
main().catch((e) => {
|
||||
main().catch(e => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
|
@ -57,7 +57,7 @@ async function getParameters(argv) {
|
|||
version: argv.ver,
|
||||
weight: argv["menu-weight"] - 0,
|
||||
width: argv["menu-width"] - 0,
|
||||
slant: argv["menu-slant"],
|
||||
slant: argv["menu-slant"]
|
||||
};
|
||||
|
||||
return para;
|
||||
|
@ -108,7 +108,7 @@ async function saveCharMap(font) {
|
|||
glyph.name,
|
||||
glyph.unicode,
|
||||
typographicFeatures,
|
||||
glyph.featureSelector ? Object.keys(glyph.featureSelector) : [],
|
||||
glyph.featureSelector ? Object.keys(glyph.featureSelector) : []
|
||||
]);
|
||||
}
|
||||
await fs.writeFile(argv.charmap, JSON.stringify(charMap), "utf8");
|
||||
|
|
|
@ -48,7 +48,7 @@ const ligationSamples = [
|
|||
arrow("<-->"),
|
||||
arrow("<--->"),
|
||||
arrow("<---->"),
|
||||
htmlComment("<!--"),
|
||||
htmlComment("<!--")
|
||||
],
|
||||
[
|
||||
arrow2("=<<"),
|
||||
|
@ -69,7 +69,7 @@ const ligationSamples = [
|
|||
arrow("<==>"),
|
||||
arrow("<===>"),
|
||||
arrow("<====>"),
|
||||
htmlComment("<!---"),
|
||||
htmlComment("<!---")
|
||||
],
|
||||
[
|
||||
arrow("<------"),
|
||||
|
@ -91,7 +91,7 @@ const ligationSamples = [
|
|||
eqeqeq("==="),
|
||||
exeqeq("!=="),
|
||||
eqslasheq("=/="),
|
||||
eqexeq("=!="),
|
||||
eqexeq("=!=")
|
||||
],
|
||||
[
|
||||
centerOps(":="),
|
||||
|
@ -114,8 +114,8 @@ const ligationSamples = [
|
|||
plusplus("++"),
|
||||
plusplus("+++"),
|
||||
logc("|-"),
|
||||
logc("-|"),
|
||||
],
|
||||
logc("-|")
|
||||
]
|
||||
];
|
||||
|
||||
const ligationSamplesNarrow = [
|
||||
|
@ -129,7 +129,7 @@ const ligationSamplesNarrow = [
|
|||
arrow("->>"),
|
||||
arrow("-->"),
|
||||
arrow("--->"),
|
||||
htmlComment("<!--"),
|
||||
htmlComment("<!--")
|
||||
],
|
||||
[
|
||||
arrow2("-<<"),
|
||||
|
@ -140,7 +140,7 @@ const ligationSamplesNarrow = [
|
|||
arrow2(">>-"),
|
||||
arrow("<-->"),
|
||||
arrow("<--->"),
|
||||
arrow("<---->"),
|
||||
arrow("<---->")
|
||||
],
|
||||
[
|
||||
arrow("<=="),
|
||||
|
@ -152,7 +152,7 @@ const ligationSamplesNarrow = [
|
|||
arrow("=>>"),
|
||||
arrow("==>"),
|
||||
arrow("===>"),
|
||||
htmlComment("<!---"),
|
||||
htmlComment("<!---")
|
||||
],
|
||||
[
|
||||
arrow2("=<<"),
|
||||
|
@ -163,7 +163,7 @@ const ligationSamplesNarrow = [
|
|||
arrow2(">>="),
|
||||
arrow("<==>"),
|
||||
arrow("<===>"),
|
||||
arrow("<====>"),
|
||||
arrow("<====>")
|
||||
],
|
||||
[
|
||||
arrow("<-------"),
|
||||
|
@ -172,7 +172,7 @@ const ligationSamplesNarrow = [
|
|||
arrow("<~~"),
|
||||
arrow("<~"),
|
||||
arrow("~>"),
|
||||
arrow("~~>"),
|
||||
arrow("~~>")
|
||||
],
|
||||
[
|
||||
logc("\\/"),
|
||||
|
@ -185,7 +185,7 @@ const ligationSamplesNarrow = [
|
|||
eqeqeq("==="),
|
||||
exeqeq("!=="),
|
||||
eqslasheq("=/="),
|
||||
eqexeq("=!="),
|
||||
eqexeq("=!=")
|
||||
],
|
||||
[
|
||||
centerOps(":="),
|
||||
|
@ -199,7 +199,7 @@ const ligationSamplesNarrow = [
|
|||
trig("|>"),
|
||||
centerOps("+:"),
|
||||
centerOps("-:"),
|
||||
centerOps("=:"),
|
||||
centerOps("=:")
|
||||
],
|
||||
[
|
||||
kernDotty("::"),
|
||||
|
@ -211,18 +211,18 @@ const ligationSamplesNarrow = [
|
|||
plusplus("++"),
|
||||
plusplus("+++"),
|
||||
logc("|-"),
|
||||
logc("-|"),
|
||||
],
|
||||
logc("-|")
|
||||
]
|
||||
];
|
||||
|
||||
module.exports = async function getLigationData() {
|
||||
const ligToml = await fs.readFile(path.join(__dirname, "../../ligation-set.toml"), "utf8");
|
||||
const ligData = toml.parse(ligToml);
|
||||
|
||||
const ligationSets = buildLigationSet(ligData, (comp) => comp.buildup.join(","));
|
||||
const ligationSets = buildLigationSet(ligData, comp => comp.buildup.join(","));
|
||||
const nonMergeLigationSets = buildLigationSet(
|
||||
ligData,
|
||||
(comp) => comp.tag + comp.buildup.join(",")
|
||||
comp => comp.tag + comp.buildup.join(",")
|
||||
);
|
||||
|
||||
return {
|
||||
|
@ -231,13 +231,13 @@ module.exports = async function getLigationData() {
|
|||
cherry: ligData.simple,
|
||||
rawSets: ligData.composite,
|
||||
sets: [...ligationSets.values()],
|
||||
nonMergeSets: [...nonMergeLigationSets.values()],
|
||||
nonMergeSets: [...nonMergeLigationSets.values()]
|
||||
};
|
||||
};
|
||||
|
||||
function buildLigationSet(ligData, getKey) {
|
||||
const ligationSets = new Map([
|
||||
["*off", { tag: "calt", switch: "off", desc: "Ligation Off", brief: "Off", buildup: [] }],
|
||||
["*off", { tag: "calt", switch: "off", desc: "Ligation Off", brief: "Off", buildup: [] }]
|
||||
]);
|
||||
for (const sel in ligData.composite) {
|
||||
const comp = ligData.composite[sel];
|
||||
|
@ -250,7 +250,7 @@ function buildLigationSet(ligData, getKey) {
|
|||
buildup: comp.buildup,
|
||||
tagName: comp.tag,
|
||||
desc: comp.desc,
|
||||
brief: comp.brief || comp.desc,
|
||||
brief: comp.brief || comp.desc
|
||||
};
|
||||
ligationSets.set(key, item);
|
||||
} else {
|
||||
|
|
|
@ -18,7 +18,7 @@ module.exports = async function (charMapPath) {
|
|||
...(exemplar.auxiliary || []),
|
||||
...(exemplar.index || []),
|
||||
...(exemplar.numbers || []),
|
||||
...(exemplar.punctuation || []),
|
||||
...(exemplar.punctuation || [])
|
||||
].join("");
|
||||
|
||||
let fullSupport = true;
|
||||
|
@ -64,9 +64,9 @@ module.exports = async function (charMapPath) {
|
|||
return {
|
||||
stats: {
|
||||
glyphCount: charMap.length,
|
||||
codePointCount: rawCoverage.size,
|
||||
codePointCount: rawCoverage.size
|
||||
},
|
||||
unicodeCoverage: gatherCov(rawCoverage),
|
||||
languages: Array.from(supportLangSet).sort(),
|
||||
languages: Array.from(supportLangSet).sort()
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue