如何让自定义字体在 Google Colab 上工作,以便我可以将它用于 运行 manim(3b1b 的动画软件)
How to get custom fonts to work on Google Colab so that I can use it to run manim(3b1b's animation software)
我正在尝试使用自定义 True Type 字体在 Google Colab 上使用 Manim 渲染动画。但由于某种原因,动画在没有自定义字体的情况下呈现。我已经测试过代码,它在我的本地机器上运行良好。这似乎是字体未正确安装的问题。我完全按照互联网上其他来源的建议将 .ttf
文件移动到以下目录:/usr/share/fonts/truetype/
有人可以帮我解决这里的问题吗?
只需要遵循这些命令:
!wget "link_to_font_files_download"
!unzip "download?family=font_file_name"
!mv font_file.ttf /usr/share/fonts/truetype/
!fc-cache -f -v
我正在尝试使用自定义 True Type 字体在 Google Colab 上使用 Manim 渲染动画。但由于某种原因,动画在没有自定义字体的情况下呈现。我已经测试过代码,它在我的本地机器上运行良好。这似乎是字体未正确安装的问题。我完全按照互联网上其他来源的建议将 .ttf
文件移动到以下目录:/usr/share/fonts/truetype/
有人可以帮我解决这里的问题吗?
只需要遵循这些命令:
!wget "link_to_font_files_download"
!unzip "download?family=font_file_name"
!mv font_file.ttf /usr/share/fonts/truetype/
!fc-cache -f -v