I am trying to use Font.js to detect if a remote icon font is loaded or not. The font family is "Ionicons" and I am loading it through a stylesheet. I know that the font is getting loaded, because the glyph icon is showing up. But Font.js never detects that it is loaded.
Any ideas?
Here is the test case.
<!doctype html>
<html lang="us">
<head>
<meta charset="utf-8">
<link href="http://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" rel="stylesheet" type="text/css">
</head>
<script src="Font.js"></script>
<script>
var font = new Font();
font.onload = function(){
console.log("loaded");
};
font.fontFamily = "Ionicons"
font.src = font.fontFamily;
</script>
<!-- this does display the correct character -->
<i class="ion-arrow-right-a"></i>=
</body>
</html>
Hello,
Does font.js work with icon fonts?
I am trying to use Font.js to detect if a remote icon font is loaded or not. The font family is "Ionicons" and I am loading it through a stylesheet. I know that the font is getting loaded, because the glyph icon is showing up. But Font.js never detects that it is loaded.
Any ideas?
Here is the test case.