Skip to content

Commit

Permalink
Release 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Dec 31, 2023
2 parents 083706f + 3e09184 commit ded5c64
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 27 deletions.
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"Ui": {
"isPWID": true,
"isTNUM": true,
"latinGroup": "Inter",
"naming": {
"en_US": "Sarasa UI",
Expand Down Expand Up @@ -255,7 +256,7 @@
"styleMap": {
"SemiBold": "Medium"
},
"classicalRegion": "cl",
"classicalRegion": "CL",
"classicalOverridePrefix": "AdvocateAncientSansTC",
"classicalOverrideSuffixMap": {
"ExtraLight": "ExtraLight-subset",
Expand Down
6 changes: 4 additions & 2 deletions make/pass1/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { setFontMetadata } from "./metadata.mjs";

const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
const globalConfig = JSON.parse(fs.readFileSync(path.resolve(__dirname, "../../config.json")));
const packageConfig = JSON.parse(fs.readFileSync(path.resolve(__dirname, "../../package.json")));
const ENCODINGS = globalConfig.os2encodings;

export default pass;
Expand Down Expand Up @@ -44,6 +43,9 @@ async function pass(argv) {
// Drop enclosed alphanumerics and PUA
if (!argv.mono) dropCharacters(main, c => isEnclosedAlphanumerics(c) || isPua(c));

// Bake tnum for UI
if (argv.tnum) bakeFeature("tnum", main, c => true);

if (argv.italize) {
italize(as, +9.4);
italize(ws, +9.4);
Expand All @@ -63,7 +65,7 @@ async function pass(argv) {
{
en_US: {
copyright: globalConfig.copyright,
version: `Version ${packageConfig.version}`,
version: `Version ${argv.version}`,
family: globalConfig.families[argv.family].naming.en_US + " " + argv.subfamily,
style: globalConfig.styles[argv.style].name
},
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sarasa-gothic",
"version": "1.0.1",
"version": "1.0.2",
"main": "./run",
"scripts": {
"build": "verda -f verdafile.mjs",
Expand All @@ -18,7 +18,7 @@
"fs-extra": "^11.2.0",
"ot-builder": "^1.7.3",
"otb-ttc-bundle": "^1.7.3",
"verda": "^1.11.1",
"verda": "^1.11.2",
"which": "^4.0.0"
},
"devDependencies": {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
36 changes: 20 additions & 16 deletions verdafile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PREFIX = `Sarasa`;
const BUILD = `.build`;
const OUT = `out`;
const SOURCES = `sources`;
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
const PROJECT_ROOT = url.fileURLToPath(new URL(".", import.meta.url));

// Command line
const NODEJS = `node`;
Expand All @@ -37,10 +37,7 @@ build.setSelfTracking();
// Entrypoint
const Start = phony("all", async t => {
const version = await t.need(Version);
await t.need(TtfFontFiles`TTF`, TtfFontFiles`TTF-Unhinted`);
// Do in serial -- otherwise, memory usage will be too high.
await t.need(TtcFontFiles`TTC`);
await t.need(TtcFontFiles`TTC-Unhinted`);
await t.need(Ttf, Ttc);
await t.need(
TtcArchive(`TTC`, version),
TtcArchive(`TTC-Unhinted`, version),
Expand All @@ -56,29 +53,29 @@ const SuperTtc = phony(`super-ttc`, async target => {
});

const Ttc = phony(`ttc`, async t => {
await t.need(TtfFontFiles`TTF`, TtfFontFiles`TTF-Unhinted`);
// Do in serial -- otherwise, memory usage will be too high.
await t.need(TtcFontFiles`TTC`);
await t.need(TtcFontFiles`TTC-Unhinted`);
await t.need(Ttf);
await t.need(TtcFontFiles`TTC`, TtcFontFiles`TTC-Unhinted`);
});

const Ttf = phony(`ttf`, async t => {
await t.need(TtfFontFiles`TTF`, TtfFontFiles`TTF-Unhinted`);
});

const Dependencies = oracle("oracles::dependencies", async () => {
const pkg = await fs.readJSON(__dirname + "/package.json");
const pkg = await fs.readJSON(path.resolve(PROJECT_ROOT, "package.json"));
const depJson = {};
for (const pkgName in pkg.dependencies) {
const depPkg = await fs.readJSON(__dirname + "/node_modules/" + pkgName + "/package.json");
const depPkg = await fs.readJSON(
path.resolve(PROJECT_ROOT, "node_modules", pkgName, "package.json")
);
const depVer = depPkg.version;
depJson[pkgName] = depVer;
}
return { requirements: pkg.dependencies, actual: depJson };
});

const Version = oracle("oracles::version", async t => {
return (await fs.readJson(path.resolve(__dirname, "package.json"))).version;
return (await fs.readJson(path.resolve(PROJECT_ROOT, "package.json"))).version;
});

const SuperTtcArchive = file.make(
Expand Down Expand Up @@ -269,6 +266,8 @@ const Pass1 = file.make(
(family, region, style) => `${BUILD}/pass1/${family}-${region}-${style}.ttf`,
async (t, out, family, region, style) => {
const [config] = await t.need(Config, Scripts);
const version = await t.need(Version);

const latinFamily = config.families[family].latinGroup;
const [, $1, $2, $3, $4] = await t.need(
de(out.dir),
Expand All @@ -289,6 +288,8 @@ const Pass1 = file.make(
style: style,
italize: deItalizedNameOf(config, out.name) === out.name ? false : true,

version,

...flagsOfFamily(config, family)
});
}
Expand Down Expand Up @@ -323,7 +324,9 @@ const ProdUnhinted = file.make(
);

async function MakeProd(t, out, family, region, style, fragT) {
const [config] = await t.need(Config, Scripts, Version, de(out.dir));
const [config] = await t.need(Config, Scripts, de(out.dir));
const version = await t.need(Version);

const weight = deItalizedNameOf(config, style);
const [, $1, $2, $3] = await t.need(
de(out.dir),
Expand All @@ -337,7 +340,8 @@ async function MakeProd(t, out, family, region, style, fragT) {
kanji: $2.full,
hangul: $3.full,
o: out.full,
italize: weight === style ? false : true
italize: weight === style ? false : true,
version
});
}

Expand Down Expand Up @@ -601,8 +605,8 @@ const Scripts = task("dep::scripts", async t => {
});

const Config = oracle("dep::config", async () => {
const configPath = __dirname + "/config.json";
const privateConfigPath = __dirname + "/config.private.json";
const configPath = path.resolve(PROJECT_ROOT, "config.json");
const privateConfigPath = path.resolve(PROJECT_ROOT, "config.private.json");
const config = await fs.readJSON(configPath);
if (fs.existsSync(privateConfigPath)) {
const privateConfig = await fs.readJSON(privateConfigPath);
Expand Down

0 comments on commit ded5c64

Please sign in to comment.