0

I have an MkDocs site with the pymdownx.keys plugin. The plugin includes formatting for a number of keys along with unicode characters:

enter image description here

When I try to convert the page to PDF using Weasyprint, the unicode characters don't render (among other formatting):

enter image description here

I'm using the python:3.13-alpine image so I've installed Microsoft fonts and fontconfig:

apk add msttcorefonts-installer fontconfig
update-ms-fonts
fc-cache -f

I've also tried installing unicode-character-database, but I still can't get those characters to render. This is what the CSS looks like for (for example) the "Enter" kbd class:

.key-enter::after {
  padding-left: 0.4em !important;
  content: "\23CE" !important;
}

\23CD is "Return Symbol" unicode character: ⏎.

I'm running this command:

weasyprint --full-fonts myDoc.html myDoc.pdf

How can I get these characters to be rendered by Weasyprint?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.