Arabic Encoding with html2canvas
encoding, html2canvas, jquery
Solution
i thought of trying some code manipulation & It unblivably worked. The answer is to replace :
textList = (!options.letterRendering && /^(left|right|justify|auto)$/.test(textAlign) && noLetterSpacing(getCSS(el, "letterSpacing")))
with:
textList = (!options.letterRendering || /^(left|right|justify|auto)$/.test(textAlign) || noLetterSpacing(getCSS(el, "letterSpacing")))
notice at (&&) sign which is replaced by (||).
Problem
I am using `html2canvas` to take an image of a div, the content is from the same page, same domain, but it shows the Arabic letters disconnected, it seems that html2canvas doesn't support Arabic. While I am reading the available details about it on its webpage, I didn't find any useful information. Here is the simple code I used: ``` $("#import").click(function(){ // send the contents of the email :) html2canvas(document.body, { onrendered: function(canvas) { document.body.appendChild(canvas); }, letterRendering:true }); }); ``` any clue?