Skip to content

Commit 96379be

Browse files
committed
Removed webfontloader. The SVG now rendered after the body.load event
1 parent e03dc21 commit 96379be

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

bower.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"underscore": "~1.4.x",
2424
"raphael": "~2.1.x",
2525
"snap.svg": "~0.4.1",
26-
"bower-webfontloader": "~1.5.16"
2726
},
2827
"devDependencies": {
2928
"qunit": "1.11.x",

src/theme-snap.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,10 @@ if (typeof Snap !== "undefined") (function () {
309309
registerTheme("simple", SnapTheme);
310310
registerTheme("hand", SnapHandTheme);
311311

312-
$("body").prepend("<div style='font-family: Daniel; position: absolute;top:-1000px;'>js-sequence. make sure font is loaded. This should be invisible</div>");
313-
314-
if (typeof WebFont !== "undefined") {
315-
WebFont.load({
316-
custom: {
317-
families: ['Daniel']
318-
}
319-
});
312+
if(typeof document !== "undefined") {
313+
var element = document.createElement("div");
314+
element.style.cssText = "font-family: Daniel; position: absolute;top:-1000px;";
315+
element.innerHTML = 'js-sequence: This is inserted to make sure the font is loaded. This should be invisible in the page';
316+
document.body.insertBefore(element, document.body.firstChild);
320317
}
321318
})();

test/test.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
<script src="../bower_components/underscore/underscore-min.js"></script>
6161
<script src="../bower_components/lodash/lodash.min.js"></script>
6262
<script src="../bower_components/snap.svg/dist/snap.svg.js"></script>
63-
<script src="../bower_components/bower-webfontloader/webfont.js"></script>
6463
<script src="../bower_components/raphael/raphael-min.js"></script>
6564

6665

0 commit comments

Comments
 (0)