Support specifying ttfautohint's path by using environment variables

This commit is contained in:
be5invis 2023-10-04 18:14:43 -07:00
parent dd7c18fc3c
commit c9bab1b3e4

View file

@ -33,6 +33,7 @@ const ARCHIVE_DIR = "release-archives";
const PATEL_C = ["node", "node_modules/patel/bin/patel-c"]; const PATEL_C = ["node", "node_modules/patel/bin/patel-c"];
const TTCIZE = ["node", "node_modules/otb-ttc-bundle/bin/otb-ttc-bundle"]; const TTCIZE = ["node", "node_modules/otb-ttc-bundle/bin/otb-ttc-bundle"];
const SEVEN_ZIP = process.env.SEVEN_ZIP_PATH || "7z"; const SEVEN_ZIP = process.env.SEVEN_ZIP_PATH || "7z";
const TTFAUTOHINT = process.env.TTFAUTOHINT_PATH || "ttfautohint";
const defaultWebFontFormats = ["ttf", "woff2"]; const defaultWebFontFormats = ["ttf", "woff2"];
const webfontFormatsFast = ["ttf"]; const webfontFormatsFast = ["ttf"];
@ -63,7 +64,7 @@ const Version = computed(`env::version`, async target => {
const CheckTtfAutoHintExists = oracle(`oracle:check-ttfautohint-exists`, async target => { const CheckTtfAutoHintExists = oracle(`oracle:check-ttfautohint-exists`, async target => {
try { try {
return await which("ttfautohint"); return await which(TTFAUTOHINT);
} catch (e) { } catch (e) {
fail("External dependency <ttfautohint>, needed for building hinted font, does not exist."); fail("External dependency <ttfautohint>, needed for building hinted font, does not exist.");
} }