Closed wangjia184 closed 1 year ago
The example you use does use Text()
and not Tex()
therefore "ctex" has no relevance here.
Text()
uses your system's fonts for rendering - and it seems that the font used by default is lacking CJK-characters. Not all system fonts contain a full set of unicode characters. I don't know which fonts are available inside your Docker environment.
In this parallel discussion you can see that neither Text()
nor Tex()
have a principle problem with CJK-fonts:
BraceLabel text can not use chinese #3254
Come over to Discord - there are both Japanese and Chinese communities which will probably be able to help you: Where can I find more resources for learning Manim?
On my system without fine tuning the fonts, at least Japanese, Cyrillic, Arabic and Chinese work with the fonts I have installed
Thanks @uwezi , I solved this problem by installing Chinese font into docker image
FROM manimcommunity/manim:v0.17.3
USER root
RUN apt-get install -y fontconfig fonts-wqy-zenhei
RUN fc-cache -fv
USER manimuser
First installs fontconfig (https://packages.debian.org/sid/fontconfig) and the Chinese Fonts (https://packages.debian.org/sid/fonts/). And then rebuilds the font cache
Three font families can be used now
Description of bug / unexpected behavior
Run the example code of multiple-font and it ended with following screenshot
Expected behavior
It should be like this one:
How to reproduce the issue
Manim Community v0.17.3, starting it using docker
Then run the multiple-font example code from https://docs.manim.community/en/stable/reference/manim.mobject.text.text_mobject.Text.html#multiplefonts
Others
There is no
TEX_USE_CTEX = True
in constants.py any more.This issue from 3b1b says the following config could fix it. But seems that is not available to community edition?