bug fixes for body background & firefox font

This commit is contained in:
MoyuScript
2012-03-02 14:43:25 +02:00
parent 4727938448
commit a8e81bcc37
3 changed files with 12 additions and 4 deletions

View File

@ -286,9 +286,13 @@ html2canvas.Parse = function (element, images, opts) {
}
ctx.setVariable("fillStyle", color);
ctx.setVariable("font", font_variant + " " + bold + " " + font_style + " " + size + " " + family);
/*
need to be defined in the order as defined in http://www.w3.org/TR/CSS21/fonts.html#font-shorthand
to properly work in Firefox
*/
ctx.setVariable("font", font_style+ " " + font_variant + " " + bold + " " + size + " " + family);
if (align){
ctx.setVariable("textAlign", "right");
}else{
@ -1260,6 +1264,9 @@ html2canvas.Parse = function (element, images, opts) {
parseElement(children[i], stack);
}
stack.backgroundColor = getCSS( body, "backgroundColor" );
return stack;
};