问题
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