What is the mapping of ZaptDingBats and Symbols in jsPDF?

邮差的信 提交于 2021-01-29 13:16:51

问题


I am trying to use the TM in the Symbols font, but not sure how to do it - I searched around here and found this similar question for the checkmark in ZaptDingBats font. The answer to this related question mentions that the checkmark is mapped as 4...this leads me to my question of how do we know what the mapping is?

Using Zapfdingbats with jsPDf


回答1:


You can use the JS octal sequence \u2122 and jsPDF will output the TM symbol. See this list for more sequences. Example picture of output.

doc.text(50, 30, 'Trademark symbol is \u2122')

Here is a jsFiddle that saves the PDF and the TM symbol is still visible. Can you paste your code into a fiddle so we can see what you are getting.

PS: You might want to fix your post heading to "...Symbols in jspdf?" :)



来源:https://stackoverflow.com/questions/58379828/what-is-the-mapping-of-zaptdingbats-and-symbols-in-jspdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!