thegetty / cva10

"Corpus Vasorum Antiquorum, Fascicule 10", by Despoina Tsiafakis
1 stars 0 forks source link

Bad paths for WOFF and TTF font files during PDF output #49

Closed geealbers closed 5 years ago

geealbers commented 5 years ago

@naeluh and @mandrijauskas, can one of you look at this? When running quire pdf I'm getting warnings that WOFF and TTF font files aren't being found because of some bad paths that include /css/undefined. Maybe a webpack issue?

GT29043:cva10 galbers$ quire pdf
⠇ Building PDFprince: http://localhost:1313/css/undefinedfonts/cardo-regular.woff: warning: http://localhost:1313/css/undefinedfonts/cardo-regular.woff: The requested URL returned error: 404 Not Found
prince: http://localhost:1313/css/undefinedfonts/cardo-regular.ttf: warning: http://localhost:1313/css/undefinedfonts/cardo-regular.ttf: The requested URL returned error: 404 Not Found
prince: http://localhost:1313/css/undefinedfonts/cardo-italic.woff: warning: http://localhost:1313/css/undefinedfonts/cardo-italic.woff: The requested URL returned error: 404 Not Found
prince: http://localhost:1313/css/undefinedfonts/cardo-italic.ttf: warning: http://localhost:1313/css/undefinedfonts/cardo-italic.ttf: The requested URL returned error: 404 Not Found
prince: http://localhost:1313/css/undefinedfonts/cardo-bold.woff: warning: http://localhost:1313/css/undefinedfonts/cardo-bold.woff: The requested URL returned error: 404 Not Found
prince: http://localhost:1313/css/undefinedfonts/cardo-bold.ttf: warning: http://localhost:1313/css/undefinedfonts/cardo-bold.ttf: The requested URL returned error: 404 Not Found
✔
ℹ

I'm using a special font for this project (and I'm including it in the SCSS via the variables.scss file instead of the fonts.scss file to limit the number of theme files I changed) but the issue also happens with our standard fonts in a fresh project.

The EOT and WOFF2 files seem to be unaffected, but I'd guess that's because PrinceXML doesn't support those files types and so isn't looking for them. I haven't find Prince documentation to confirm that though.

naeluh commented 5 years ago

Hi @geealbers ill take a look. Are the other file formats showing up ?

geealbers commented 5 years ago

Thanks @naeluh. My guess is that Prince isn't looking for the other formats because it doesn't support them. And I think it's not that the formats aren't available in the project, it's that the URL they are actually at doesn't match the ones where Prince is looking. For example, Prince is looking at http://localhost:1313/css/undefinedfonts/cardo-regular.ttf, but the font is at http://localhost:1313/fonts/cardo-regular.ttf.

naeluh commented 5 years ago

Hi @geealbers its the CLI I have the fix - I am going to open up a pull request and then if you just want to use that branch you can keep working and we can merge it in after if that works or however you want to do it. Let me know if you have any questions.

naeluh commented 5 years ago

If other users are experiencing this issue uninstall quire-cli and reinstall or update your code to master as of this pull request https://github.com/gettypubs/quire-cli/pull/26 or you can @naeluh for help.