VERSION II.
This commit is contained in:
parent
2389d422e9
commit
a08eb1600c
39 changed files with 879 additions and 2503 deletions
19
utility/make-webfont-css.js
Normal file
19
utility/make-webfont-css.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const fs = require("fs");
|
||||
|
||||
module.exports = function(output, family, hs, formats) {
|
||||
let ans = ``;
|
||||
for (const term of hs) {
|
||||
let src = formats
|
||||
.map(([ext, format]) => `url('${ext}/${term.name}.${ext}') format('${format}')`)
|
||||
.join(", ");
|
||||
ans += `
|
||||
@font-face {
|
||||
font-family: '${family + " Web"}';
|
||||
font-weight: ${term.cssWeight};
|
||||
font-style: ${term.cssStyle};
|
||||
src: ${src};
|
||||
}
|
||||
`;
|
||||
}
|
||||
fs.writeFileSync(output, ans);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue