wpilibsuite / sphinxext-opengraph

Sphinx extension to generate unique OpenGraph metadata
https://sphinxext-opengraph.readthedocs.io
Other
74 stars 27 forks source link

feat: allow specifying a custom font for the card text #110

Closed shuuji3 closed 11 months ago

shuuji3 commented 1 year ago

resolve #108

Hello, this PR implements the custom font setting and the default "Roboto" font. I encountered the same issue as #108 when I tried to use this for the Japanese translation of psycopg3 documentation. This should be helpful for any Sphinx project written in non-Latin languages.

I validated this change on the Debian container with Noto CJK font installed by apt install fonts-noto-cjk. Here are examples:

Before image

After image

I think this won't change the default Roboto Flex fallback behavior, but let me know if this needs any adjustment. Thanks.

zhudotexe commented 11 months ago

Awesome! @Daltz333 is there anything blocking merging this PR? We'd love to be able to use the social image card generation.

shuuji3 commented 11 months ago

Thanks! 😃