tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.32k stars 1.68k forks source link

The web will be unresponsive if i have many Font files. #212

Closed HWWWWWT closed 6 years ago

HWWWWWT commented 6 years ago

Use case: description, code

@font-face { font-family: 'Gugi'; src: url('http://test2.yunzhan365.com/resourceFiles/editor/fonts/gugi-regular-webfont.woff'); } @font-face { / AmaticSC/ font-family: 'AmaticSC'; src: url('http://test2.yunzhan365.com/resourceFiles/editor/fonts/amaticsc-regular-webfont.woff'); } .... more than 20 species!

Expected behavior

Actual behavior (stack traces, console logs etc)

When i use domtoimage.toPng() ,all the fontFamily files will be downloaded and the web will be unresponsive. I have to spend a lot of time to wait until it's finished.

Library version

"dom-to-image": "^2.6.0", "vue": "^2.5.13",

Browsers

zhaoyu69 commented 4 years ago

Hello. Any information about that issue?

JiaXinYi commented 3 years ago

this fork version can solve it. https://github.com/MMF-FE/dom-to-image yarn add @yzfe/dom-to-image