javascript - How do I wait for first canvas-repaint until @font-face-font is loaded? -


I have an HTML5-canvas and context.fillText (...); Using the @ font-face-font.
I have a problem displaying the page with Firefox (3.6), the font on the front of the canvas has not been downloaded yet, so the text will be displayed with a standard-font.
I got a 'solution' but it does not work, because the font is used only in the canvas and the canvas loads and jQuery is used with AJAX.
Is there a better solution than trying to use it? Timeout setTimeout (repaintCanvas, 500); ?

Well, you can try it,

  $ Get ('font / url.ttf', function () {// do canvas code .... due to the font loading ...});  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -