Search code examples
phpfontscharacter-encodingspecial-charactersfpdf

fpdf: Embedding special characters


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.)?


Solution

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