anaconda / nbpresent

next generation slides for Jupyter Notebooks
BSD 3-Clause "New" or "Revised" License
162 stars 23 forks source link

optional font embedding #46

Open bollwyvl opened 8 years ago

bollwyvl commented 8 years ago

Right now, the offline view is "broken" as it doesn't embed fontawesome, even though everything works fine. Nickle fix there would be to leave some CDN fallback in.

Further, all the webfont stuff is handled by webfontloader, which is good for sharing, but bad for archiving.

At the time of import, we probably have enough information in the browser to capture and base64 the font (preferably woff/2) and the font css, and embed it in metadata.

The exporter would then need to be able to embed that as data uris, but this is likely solveable.

As this would entail a fair amount of data, it would be best to make this an opt-in feature, potentially one that one only picks when choosing to export, i.e.

Download as...
  Presentation (.html)
  Archive Presentation (big) (.html)

Of course, the joke is always that the first image someone loads would be bigger than the biggest font, but still.