Compatibility hacks for IE, Opera, Safari
This commit is contained in:
parent
a77292846c
commit
a82536881d
4 changed files with 144 additions and 2 deletions
|
@ -285,7 +285,7 @@ function WorkerPDFDoc(canvas) {
|
|||
var url = "url(data:" + data.mimetype + ";base64," + base64 + ");";
|
||||
var rule = "@font-face { font-family:'" + data.fontName + "';src:" + url + "}";
|
||||
var styleSheet = document.styleSheets[0];
|
||||
styleSheet.insertRule(rule, styleSheet.length);
|
||||
styleSheet.insertRule(rule, styleSheet.cssRules.length);
|
||||
|
||||
// Just adding the font-face to the DOM doesn't make it load. It
|
||||
// seems it's loaded once Gecko notices it's used. Therefore,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue