Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting includes empty base64 content for fonts #46

Open
matclab opened this issue Nov 6, 2018 · 6 comments
Open

Exporting includes empty base64 content for fonts #46

matclab opened this issue Nov 6, 2018 · 6 comments
Labels

Comments

@matclab
Copy link

matclab commented Nov 6, 2018

I'm using font awesome. bs serve works like a charm (thank for this nice tool), but when exporting, the font css in the final html lokks like:

@font-face{font-family:'Font Awesome 5 Brands';font-style:normal;font-weight:normal;src:url('data:application/vnd.ms-fontobject;base64,');src:url('data:application/vnd.ms-fontobject;base64,')

The font is empty.

@sinedied sinedied added the bug label Nov 6, 2018
@sinedied
Copy link
Owner

sinedied commented Nov 6, 2018

Something effectively does not seems right 😄

I remember that is used to work though as I did the same thing and using Font Awesome 5 in my slides were not an issue at export.

https://github.com/remy/inliner is used to perform the inlining, either an update have broken it or latest PR merged here have broken it, I'll have a look.

In the meanwhile can you try with the feature/refactor branch to see if the issue is still present? See #43 (comment) for how to install and use it.

@matclab
Copy link
Author

matclab commented Nov 6, 2018

Before trying the feature/refactor branch, I tried with the docker to try reproducing the problem in a controlled environment, but docker run --rm -v $(pwd):/src taobeier/backslide export gives:

mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function

Whereas serving via the docker worked well.

Images ans fonts are not included in the resulting html.

@matclab
Copy link
Author

matclab commented Nov 6, 2018

feature/refactor branch neither produces an html file with the font embeded (the font awesome css doesn't seem to be included whereas it was in the master version).

@matclab
Copy link
Author

matclab commented Nov 8, 2018

For info, having installed inliner 1.13.1 and doing:

bs export -l
inliner -n -m dist/201809-sécurité.html > res.html

worked well.
Not using the -n (no compression) produces an invalid HTML.

@sinedied
Copy link
Owner

Sorry for the delay and thanks for the feedback, I will take a look. If it works with inliner directly it's good news, maybe it's just a matter of updating the version in backslide.

@matclab
Copy link
Author

matclab commented Nov 15, 2018

Yes indeed, but note that it didn't work directly with inliner without the -n switch (no compression).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants