Skip to content

CJK rendering error #41

Description

@VincentTam

Background

I've authored #33 by introducing typst-dev-assets.

Problem

Recently, I've found that this bot can't render some Chinese character, such as "禛" in the name of Emperor Yongzheng (雍正帝).

Image

Discussion

Using my web font tester, I found out that each of typst-dev-assets' font files for Noto CJK fonts has only about 3MB—this is much smaller than usual, so no wonder many characters are missing.

Workaround for Docker users

Thanks to Claude, who generated the code for the font() function, I can now move stuff to somewhere /bot/fonts, then blindly mount it in the docker compose file. Each time there's a change in the font/ folder, it suffices to docker compose restart. No need to rebuild image.

Image

The worker will know, at compile time, to search fonts from /bot/fonts.

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