jquery HTML2Canvas波斯语问题

fhity93d  于 11个月前  发布在  jQuery
关注(0)|答案(1)|浏览(96)

我需要使用html2canvas将HTML转换为图像。问题是它不能正确显示波斯语(波斯语)文本。我想知道是否有人可以帮助我解决这个问题!

#target {
  width: 160px;
  height: 50px;
  background: blue;
  color: #fff;
  padding: 10px;
}

button {
  display: block;
  height: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}

个字符

zfycwa2u

zfycwa2u1#

#target上使用text-align: left

#target {
  width: 160px;
  height: 50px;
  background: blue;
  color: #fff;
  padding: 10px;
  text-align: left
}

button {
  display: block;
  height: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}

个字符

编辑:找到相关主题:

Html2canvas image capturing issue with UTF-8 characters
Arabic Encoding with html2canvas

相关问题