asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.14k stars 500 forks source link

[?] characters in a converted PDF file with the btn:[] macro #2447

Closed Sulquendi closed 11 months ago

Sulquendi commented 11 months ago

Hello !

When i add a btn:[] macro it is rendered with strange characters in the final PDF doc :

Example of rendering:

AsciiDoc Source (UTF-8 file) : Le bouton btn:[Copy] exporte

Rendered as: image

Regards

mojavelinux commented 11 months ago

The problem you are facing is that the font you are using in your theme does not support all the necessary characters. When a glyph for a character is missing, the font will insert some sort of placeholder character, in this case a ?. To fix it, you need to follow this guide: https://docs.asciidoctor.org/pdf-converter/latest/theme/prepare-custom-font/#modify

In the future, please direct questions about usage to the project chat at https://chat.asciidoctor.org. Thanks.