Skip to content

Commit

Permalink
Fix for tsayen#220
Browse files Browse the repository at this point in the history
  • Loading branch information
goodforenergy committed Sep 12, 2018
1 parent 8b17f09 commit 1e26617
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/dom-to-image.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/dom-to-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@
copyStyle(window.getComputedStyle(original), clone.style);

function copyStyle(source, target) {
if (source.cssText) target.cssText = source.cssText;
else copyProperties(source, target);
if (source.cssText) {
target.cssText = source.cssText;
target.font = source.font; // here, we re-assign the font prop.
} else copyProperties(source, target);

function copyProperties(source, target) {
util.asArray(source).forEach(function (name) {
Expand Down

0 comments on commit 1e26617

Please sign in to comment.