Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions decktape.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ async function exportSlides(page, plugin, pdf, options) {
let hasNext = await hasNextSlide(plugin, context);
while (hasNext && context.currentSlide < maxSlide) {
await nextSlide(plugin, context);
await fontsLoaded(page);
await pause(options.pause);
if (options.slides && !options.slides[context.currentSlide]) {
process.stdout.write('\r' + await progressBar(plugin, context, { skip: true }));
Expand Down Expand Up @@ -566,6 +567,12 @@ async function nextSlide(plugin, context) {
return plugin.nextSlide();
}

async function fontsLoaded(page) {
await page.evaluate(async () => {
await document.fonts?.ready
});
}

async function writePdf(filename, pdf) {
const pdfDir = path.dirname(filename);
try {
Expand Down
Binary file modified test/snapshot/revealjs-demo.pdf
Binary file not shown.