Arabic Encoding with html2canvas

后端 未结 7 767
时光取名叫无心
时光取名叫无心 2020-12-11 03:21

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 h

相关标签:
7条回答
  • 2020-12-11 04:19

    Find this line in html2canvas.js and add center to this like this:

    (!options.letterRendering && /^(left|right|justify|auto|center)$/.test(textAlign) && noLetterSpacing(getCSS(el, "letterSpacing"))) ? textNode.nodeValue.split(/(\b| )/) : textNode.nodeValue.split("");
    

    Then set text-align:right/left/canter/justify in each box that have problem. it work for me well.

    0 讨论(0)
提交回复
热议问题