Accept 0px as an acceptable letter-spacing value for per-word rendering

This improves performance in Opera.
This commit is contained in:
Vladimir Panteleev 2012-10-20 22:18:46 +03:00
parent 3164e5bae0
commit 1b81f7d517

View File

@ -285,7 +285,7 @@ _html2canvas.Parse = function ( images, options ) {
text_align = text_align.replace(["-webkit-auto"],["auto"]);
if (options.letterRendering === false && /^(left|right|justify|auto)$/.test(text_align) && /^(normal|none)$/.test(letter_spacing)){
if (options.letterRendering === false && /^(left|right|justify|auto)$/.test(text_align) && /^(normal|none|0px)$/.test(letter_spacing)){
// this.setContextVariable(ctx,"textAlign",text_align);
renderList = textNode.nodeValue.split(/(\b| )/);