Skip to content

Commit

Permalink
fix spurious error in typst brand yaml fonts / google
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Sep 20, 2024
1 parent 90f6bfd commit fb72c89
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/command/render/pandoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,7 @@ async function resolveExtras(
const sourcelist = line.match(/^ *src: (.*); *$/);
if (sourcelist) {
const sources = sourcelist[1].split(",").map((s) => s.trim());
let found = false;
const failed_formats = [];
for (const source of sources) {
const match = source.match(
Expand All @@ -1392,6 +1393,7 @@ async function resolveExtras(
const [_, url, format] = match;
if (["truetype", "opentype"].includes(format)) {
ttf_urls.push(url);
found = true;
break;
}
// else if (["woff", "woff2"].includes(format)) {
Expand All @@ -1401,12 +1403,14 @@ async function resolveExtras(
failed_formats.push(format);
}
}
console.log(
"skipping",
family,
"\nnot currently able to use formats",
failed_formats.join(", "),
);
if (!found) {
console.log(
"skipping",
family,
"\nnot currently able to use formats",
failed_formats.join(", "),
);
}
}
}
}
Expand Down

0 comments on commit fb72c89

Please sign in to comment.