format and fix certain build breaks
This commit is contained in:
parent
12a3b8c244
commit
d5661093ff
65 changed files with 553 additions and 862 deletions
|
@ -46,7 +46,7 @@ export default async function main(argv) {
|
|||
`<tr><td align="center">` +
|
||||
`<a href="${baseUrl}/packages-sha.txt">Package hashes (SHA-256)</a>` +
|
||||
`</td></tr>` +
|
||||
`</table>`
|
||||
`</table>`,
|
||||
);
|
||||
await fs.promises.writeFile(argv.outputPath, out.data);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ async function main(argv) {
|
|||
let readme = await fs.promises.readFile(argv.mdFilePath, "utf-8");
|
||||
const dirs = {
|
||||
images: path.posix.relative(path.dirname(argv.mdFilePath), "images"),
|
||||
fragments: path.resolve(__dirname, "fragments")
|
||||
fragments: path.resolve(__dirname, "fragments"),
|
||||
};
|
||||
readme = (await processSsOt(argv, dirs)).apply(readme);
|
||||
readme = (await processCherryPickingStyles(argv, dirs)).apply(readme);
|
||||
|
@ -30,10 +30,10 @@ async function main(argv) {
|
|||
readme = (await processLigSetCherryPicking(argv, dirs)).apply(readme);
|
||||
readme = (await processLigSetPreDef(argv, dirs)).apply(readme);
|
||||
readme = (await processLigSetOt(argv, dirs, 1, g => !isLanguageSpecificLigTag(g.tag))).apply(
|
||||
readme
|
||||
readme,
|
||||
);
|
||||
readme = (await processLigSetOt(argv, dirs, 2, g => isLanguageSpecificLigTag(g.tag))).apply(
|
||||
readme
|
||||
readme,
|
||||
);
|
||||
readme = (await processLangList(argv)).apply(readme);
|
||||
readme = (await processPrivateBuildPlans(argv, dirs)).apply(readme);
|
||||
|
|
|
@ -4,7 +4,7 @@ export class MdCol {
|
|||
this.sectionName = sectionName;
|
||||
this.matchRegex = new RegExp(
|
||||
`^([ \\t]*)<!-- BEGIN ${sectionName} -->\\n[\\s\\S]*?<!-- END ${sectionName} -->\\n`,
|
||||
`m`
|
||||
`m`,
|
||||
);
|
||||
}
|
||||
log(...s) {
|
||||
|
|
|
@ -21,7 +21,7 @@ export default async function processCherryPickingStyles(argv, dirs) {
|
|||
const info = {
|
||||
introMD: cv.description || `Styles for ${sampleText + explainText}`,
|
||||
sampleImageCountEm: sampleImageCountEmOfCv(cv),
|
||||
alternatives: []
|
||||
alternatives: [],
|
||||
};
|
||||
const defaults = figureOutDefaults(variantsData, cv);
|
||||
for (const cvv of cv.variants) {
|
||||
|
@ -31,14 +31,14 @@ export default async function processCherryPickingStyles(argv, dirs) {
|
|||
imageId: `${cv.key}-${cvv.key}`,
|
||||
selectors: [`${cv.key} = '${cvv.key}'`, `${cv.tag} = ${cvv.rank}`],
|
||||
description:
|
||||
formatDescription(cvv.description) + formatDefaults(cvv.key, defaults)
|
||||
formatDescription(cvv.description) + formatDefaults(cvv.key, defaults),
|
||||
});
|
||||
} else {
|
||||
info.alternatives.push({
|
||||
imageId: `${cv.key}-${cvv.key}`,
|
||||
selectors: [`${cv.key} = '${cvv.key}'`],
|
||||
description:
|
||||
formatDescription(cvv.description) + formatDefaults(cvv.key, defaults)
|
||||
formatDescription(cvv.description) + formatDefaults(cvv.key, defaults),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -96,26 +96,26 @@ function figureOutDefaults(variantsData, gr) {
|
|||
desc: "Sans Upright",
|
||||
mask: 1,
|
||||
result: null,
|
||||
composition: { ...variantsData.defaults.sans.upright }
|
||||
composition: { ...variantsData.defaults.sans.upright },
|
||||
},
|
||||
{
|
||||
desc: "Sans Italic",
|
||||
mask: 2,
|
||||
result: null,
|
||||
composition: { ...variantsData.defaults.sans.italic }
|
||||
composition: { ...variantsData.defaults.sans.italic },
|
||||
},
|
||||
{
|
||||
desc: "Slab Upright",
|
||||
mask: 4,
|
||||
result: null,
|
||||
composition: { ...variantsData.defaults.slab.upright }
|
||||
composition: { ...variantsData.defaults.slab.upright },
|
||||
},
|
||||
{
|
||||
desc: "Slab Italic",
|
||||
mask: 8,
|
||||
result: null,
|
||||
composition: { ...variantsData.defaults.slab.italic }
|
||||
}
|
||||
composition: { ...variantsData.defaults.slab.italic },
|
||||
},
|
||||
];
|
||||
for (const variant of gr.variants) {
|
||||
for (const dc of defaultConfigs) {
|
||||
|
|
|
@ -6,12 +6,12 @@ export default async function processCvInfluences(argv) {
|
|||
const cl = await getCharMapAndSupportedLanguageList(
|
||||
argv.charMapPath,
|
||||
argv.charMapItalicPath,
|
||||
argv.charMapObliquePath
|
||||
argv.charMapObliquePath,
|
||||
);
|
||||
|
||||
let m = {
|
||||
upright: new Map(),
|
||||
italic: new Map()
|
||||
italic: new Map(),
|
||||
};
|
||||
|
||||
for (const block of cl.unicodeCoverage) {
|
||||
|
|
|
@ -19,7 +19,7 @@ export default async function processCvOt(argv, dirs) {
|
|||
for (let rid = 0; rid < rowsNeeded; rid++) {
|
||||
const entriesInThisRow = Math.min(
|
||||
entriesPerRow,
|
||||
effVariants.length - rid * entriesPerRow
|
||||
effVariants.length - rid * entriesPerRow,
|
||||
);
|
||||
const tailBlankColumnsCount = TableColumns - entryWidth * entriesInThisRow;
|
||||
// Image row
|
||||
|
|
|
@ -6,7 +6,7 @@ export default async function processLangList(argv) {
|
|||
const cl = await getCharMapAndSupportedLanguageList(
|
||||
argv.charMapPath,
|
||||
argv.charMapItalicPath,
|
||||
argv.charMapObliquePath
|
||||
argv.charMapObliquePath,
|
||||
);
|
||||
const md = new MdCol("Section-Language-List");
|
||||
md.log(`${cl.languages.length} Supported Languages: \n`);
|
||||
|
|
|
@ -35,7 +35,7 @@ export default async function processPackageList(argv, dirs) {
|
|||
ttcCells = [
|
||||
`<td><b><a href="${sTtcLink}">Super\u00A0TTC</b></td>`,
|
||||
`<td><b><a href="${ttcLink}">TTC</b></td>`,
|
||||
`<td colspan="2"> </td>`
|
||||
`<td colspan="2"> </td>`,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ export default async function processPackageList(argv, dirs) {
|
|||
`<tr>`,
|
||||
`<td colspan="3"><b>📦 ${familyName}</b> — ${desc}</td>`,
|
||||
...ttcCells,
|
||||
`</tr>`
|
||||
`</tr>`,
|
||||
);
|
||||
md.log(
|
||||
`<tr>`,
|
||||
|
@ -51,7 +51,7 @@ export default async function processPackageList(argv, dirs) {
|
|||
`<td><b>Spacing</b></td>`,
|
||||
`<td><b>Ligatures</b></td>`,
|
||||
`<td colspan="4"><b>Downloads</b></td>`,
|
||||
`</tr>`
|
||||
`</tr>`,
|
||||
);
|
||||
let lastSubGroupID = null;
|
||||
for (const [subGroupID, subGr] of Object.entries(gr.subGroups)) {
|
||||
|
@ -78,7 +78,7 @@ export default async function processPackageList(argv, dirs) {
|
|||
`(${createLink("Unhinted", "PkgTTF-Unhinted")})</td>`,
|
||||
`<td>${createLink("WebFont", "PkgWebFont")} ` +
|
||||
`(${createLink("Unhinted", "PkgWebFont-Unhinted")})</td>`,
|
||||
`</tr>`
|
||||
`</tr>`,
|
||||
);
|
||||
}
|
||||
md.log(`<tr>`, `<td colspan="8">${img}</td>`, `</tr>`);
|
||||
|
@ -98,7 +98,7 @@ const Spacings = {
|
|||
type: ["Default", true],
|
||||
term: ["Terminal", true],
|
||||
fixed: ["Fixed", false],
|
||||
"quasi-proportional": ["Default", false]
|
||||
"quasi-proportional": ["Default", false],
|
||||
};
|
||||
function flag(f) {
|
||||
return f ? "<b>Yes</b>" : "No";
|
||||
|
|
|
@ -18,7 +18,7 @@ export default async function processSsOt(argv, dirs) {
|
|||
`<tr>`,
|
||||
`<td>${ImgX(`${dirs.images}/ss-u-${ss.tag}-${ss.rank}`)}</td>`,
|
||||
`<td>${ImgX(`${dirs.images}/ss-i-${ss.tag}-${ss.rank}`)}</td>`,
|
||||
`</tr>`
|
||||
`</tr>`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue