1 decade ago by deefour
The following is a simplified version of my
In the game&
In IE9 the font intermittently displays. On every hard refresh, the network panel in the devtools shows the font file being requested via HTTP and the request completing successfully. It is seemingly random whether the font will display within the
The same problem is present in the jumpnrun demo, suggesting this is not an issue specific to my game, but rather with Impact.js itself.
This is a real issue for me; I bought the license after explicitly informing the client that the game would be supported back to IE9.
main.js
ig.module( 'game.main' ) .requires( 'plugins.box2d.game', 'impact.font', ) .defines(function(){ Game = ig.Box2DGame({ font: new ig.Font('assets/game/some_font.font.png'), // ... }); ig.main('#canvas', Game, 60, 1500, 844, 1); });
In the game&
039;s #draw
method I have something like thisthis.font.alpha = 1; this.font.draw(this.score, ig.system.width - 16, 16, ig.Font.ALIGN.RIGHT );
In IE9 the font intermittently displays. On every hard refresh, the network panel in the devtools shows the font file being requested via HTTP and the request completing successfully. It is seemingly random whether the font will display within the
<canvas>
or not for any given refresh of the game page, as though there is some sort of race condition involved between the font loading and the game starting.The same problem is present in the jumpnrun demo, suggesting this is not an issue specific to my game, but rather with Impact.js itself.
This is a real issue for me; I bought the license after explicitly informing the client that the game would be supported back to IE9.