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 (雍正帝).
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.
The worker will know, at compile time, to search fonts from /bot/fonts.
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 (雍正帝).
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 thefont/folder, it suffices todocker compose restart. No need to rebuild image.The worker will know, at compile time, to search fonts from
/bot/fonts.