Skip to content

Bundled Roboto font does not support Japanese (social images) #108

@zhudotexe

Description

@zhudotexe

Hello! We're using sphinxext-opengraph to generate meta tags for a new project we're working on that happens to have two katakana characters in its name. When we try to generate social images, these appear as unknown characters:

summary_index_5a47e8a8

and we see this warning from matplotlib in the terminal:

sphinxext/opengraph/socialcards.py:168: UserWarning: Glyph 12459 (\N{KATAKANA LETTER KA}) missing from current font.             
  fig.savefig(path, facecolor=None)

I see that there's a comment in the code suggesting that allowing users to customize the font is planned:

# socialcards.py#L185
# TODO: Currently the `font` parameter above does nothing
#   Should instead make it possible to load remote fonts or local fonts
#   if a user specifies.

but as of v0.8.2 it is not possible to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions