ionelmc / python-darkslide

Generate HTML5 slideshows from markdown, ReST, or textile
http://ionelmc.github.io/python-darkslide/
Apache License 2.0
97 stars 22 forks source link

embedd woff and woff2 fonts along with images #17

Closed superwhoopy closed 4 years ago

superwhoopy commented 4 years ago

The "embed" feature enables to embed images in base64 format in the final HTML - these images may come either from the user content, or from the CSS.

Some people want to use their own fonts (@font-face rule): this commit detects custom fonts of type woff or woff2, and embeds them in base64 as well.

ionelmc commented 4 years ago

Very good. Can you also add something with webfonts in the examples - just to be able to demonstrate the feature?

codecov-io commented 4 years ago

Codecov Report

Merging #17 into master will increase coverage by 0.83%. The diff coverage is 23.07%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #17      +/-   ##
=========================================
+ Coverage   55.47%   56.3%   +0.83%     
=========================================
  Files           9       9              
  Lines         658     650       -8     
  Branches      119     117       -2     
=========================================
+ Hits          365     366       +1     
+ Misses        249     240       -9     
  Partials       44      44
Impacted Files Coverage Δ
src/darkslide/macro.py 79.1% <100%> (ø) :arrow_up:
src/darkslide/utils.py 61.53% <100%> (+2.27%) :arrow_up:
src/darkslide/generator.py 57.1% <13.04%> (+1.44%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e74ec30...93708c7. Read the comment docs.

superwhoopy commented 4 years ago

I came across a few hiccups and minor bugs when adding the example, so that last commit does a little more than expected - sorry about that. I really think the code is cleaner like this.

superwhoopy commented 4 years ago

Thanks for your careful review!

ionelmc commented 4 years ago

I've added some fixes/changes. Check the master before I release.

superwhoopy commented 4 years ago

All good 👍 Thx.