jsPDF中的ZaptDingBats和Symbols的映射是什么? [英] What is the mapping of ZaptDingBats and Symbols in jsPDF?

查看:85
本文介绍了jsPDF中的ZaptDingBats和Symbols的映射是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试在Symbols字体中使用TM,但不确定如何使用-我在这里搜索,并在ZaptDingBats字体中找到了类似的问号.这个相关问题的答案提到复选标记被映射为4 ...这使我想到了一个问题,即我们如何知道映射是什么?

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?

将Zapfdingbats与jsPDf一起使用

推荐答案

您可以使用JS八进制序列\ u2122,而jsPDF将输出TM符号.有关更多序列,请参见此列表. 示例图片.

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')

这是一个 jsFiddle ,它可以保存PDF,并且TM符号仍然可见.您可以将代码粘贴到小提琴中,以便我们看到您得到什么.

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:您可能希望将您的帖子标题固定为"... jspdf中的符号?" :)

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

这篇关于jsPDF中的ZaptDingBats和Symbols的映射是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆