Cufon.refresh () does not work in IE8

I need to update Cufon fonts after receiving AJAX data. Unfortunately, the simple Cufon.refresh () does not work in IE8. Debugger says line 1191

sStyle.width = roundedShapeWidth;

has an invalid argument.

How to fix it?

+3
source share
2 answers

I had the same problem. Not only at Cufon.Refresh, but also at Cufon.Now. And not only in IE8, but also in IE7, IE6, and even in IE9PP. I noticed that I am using this code for reuse:

Cufon.replace('h1',{hover: true})('h2',{hover: true})('h3',{hover: true})('cite',{hover: true})('.cufon',{hover: true});

('.cufon', {hover: true}); the part was the one that generated the error. I spent two days to find out how this might cause an error ...

CSS, .cufon sytling. CSS .cufon. cufon IE, .

, CSS:

.cufon { }

.

( Cufon 1.09)

+4

, Cufon.replace :

Cufon.replace('h1',{fontFamily: 'StackOverflow'});

, , :

Cufon.replace('h1, h2',{fontFamily: 'StackOverflow'});
Cufon.replace('h3', { fontFamily: 'StackOverflow Light'});
+1

Source: https://habr.com/ru/post/1733150/


All Articles