Fix import fonts

This commit is contained in:
ckcz123 2020-07-02 12:30:46 +08:00
parent 7e38486c80
commit fe0e9a05d4

View File

@ -386,7 +386,7 @@ main.prototype.importFonts = function (fonts) {
style.type = 'text/css'; style.type = 'text/css';
var html = ''; var html = '';
fonts.forEach(function (font) { fonts.forEach(function (font) {
html += '@font-face { font-family: "'+font+'"; src: url("project/fonts/'+font+'.ttf") format("truetype")'; html += '@font-face { font-family: "'+font+'"; src: url("project/fonts/'+font+'.ttf") format("truetype"); }';
}); });
style.innerHTML = html; style.innerHTML = html;
document.body.appendChild(style); document.body.appendChild(style);