gpt4 book ai didi

jspdf - Html2Canvas 未在 iOS 中渲染 Font Awesome 图标

转载 作者:行者123 更新时间:2023-12-02 13:40:42 25 4
gpt4 key购买 nike

我正在使用 html2canvas 和 jspdf 生成 pdf。在桌面和 Android 中一切正常,但 Font Awsome Icon 在 iOS 中无法呈现。我创建了一个 fiddle ,它可以在桌面和 Android 中工作,但同样的 fiddle 在 iOS 中无法正常工作。请帮忙。

fiddle 链接:https://jsfiddle.net/j09qd4xm/36/

HTML :

<div id="target">

<div style="position:relative;" class="noteclasscontainer" >
<span style="font-size: 60px;" class="glyphicon">&#xe022;

<span style="color:white;font-size: 21px; position: absolute; top: 16px;left:10px;">dd</span>
</span>
</div>

</div>
<button onclick="takeScreenShot()">to image</button>

JS:

window.takeScreenShot = function() {
html2canvas(document.getElementById("target"), {

width:320,
height:220
}).then(function (canvas) {
document.body.appendChild(canvas);
});
}

CSS :

button{
display:block;
height:20px;
margin-top:10px;
margin-bottom:10px;
}
.icon-diamond:before {
content: "\e943";
}

版本:

Html2Canvas:1.0.0-alpha.12

jspdf:1.4.1

最佳答案

这个拉取请求为我修复了它:niklasvh/html2canvas#1649 。我手动将更改修补到了缩小的 JS 文件。

关于jspdf - Html2Canvas 未在 iOS 中渲染 Font Awesome 图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51184914/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com