我正在使用tFPDF生成一些音乐,需要使用平坦的♭符号。 我见过的几个例子都使用了UTF-8和自定义字体,我已经实现了。 但是,它们似乎并没有嵌入整个字体,因为那个和其他字符不会显示和显示? 代替。
有谁知道如何实现这个(即插入特定字符,嵌入整个字体等)?
I am using tFPDF to generate some music and need to use the flat ♭ symbol. Several examples I have seen use UTF-8 and custom fonts, which I have implemented. However, they do not seem to embed the entire font, as that and other characters will not display and show a ? instead.
Does anyone know how to implement this (i.e. insert specific character, embed entire font, etc.)?
最满意答案
2669 - Quarter Note 266A - Eighth Note 266B - Beamed Eighth Note 266C - Beamed Sixteenth Note 266D - Flat Symbol 266E - Natural Symbol 266F - Sharp Symbol&#____;
只需将_____替换为html(php的一部分)中的代码,即可创建unicode字符。
例如hello this is ĊD;
创造: hello this is ♭
编辑:编码必须是UTF-8。 如果需要,您可以创建一个函数,用可以在html中显示的集替换每个音符。 您不需要任何特殊的插件或库。
I found the answer myself. First, I implement tFPDF. Then I use the DejaVu UTF-8 font that is included in the package, then use urldecode to display the character.
urldecode('%E2%99%AD');更多推荐
发布评论