Skip to content

Emojis and CJK characters not rendered properly in Opengraph image #11763

@CratesRadar

Description

@CratesRadar

Current Behavior

The crates.io opengraph images render emojis and CJK characters as square boxes

Example:

Image

Source: https://t.me/CratesRadar/1503

Opengraph image url: https://static.crates.io/og-images/lynn_sundial.png

Expected Behavior

Special characters in crate description should be rendered normally

Steps To Reproduce

  1. Find a crate where the description contains CJK characters or emojis, like lynn_sundial or sea-query
  2. Visit the opengraph image url, like https://static.crates.io/og-images/lynn_sundial.png or https://static.crates.io/og-images/sea-query.png
  3. Verify that ascii characters are properly rendered:

Image

Image

Environment

  • Browser: Chrome 139
  • OS: macOS 15.6

Anything else?

I made https://t.me/s/CratesRadar to monitor crates.io package updates and discovered the issue by skimming through the og images in the telegram channel

Since the images are generated from the server, it is clearly not a client-side issue. Most likely the image generation service doesn't have Chinese fonts installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    For next meeting

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions