manim: Changing fonts in "Text" does not work

Hi, maybe it is only on my system (Ubuntu 20.04), but using this example:

class Example5Text(Scene):
        def construct(self):
            text = Text('Hello world', font='Source Han Sans').scale(3)
            self.add(text)

should give this result: image (image is taken from https://github.com/3b1b/manim/pull/680) However, when I run it on my machine, it only renders the text with the default font. To distinguish the default font from Source Han Sans, note that the “ll” has no small arc at the bottom in the default font.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 23 (23 by maintainers)

Most upvoted comments

I cannot reproduce this either, looks like you might simply be missing the font.

have you tried building the docs using PangoText instead of CairoText? That will already cover quite a few more use cases I think. Just one idea for more testing 😃

That’s already being built. I did it while I was documenting it. It is here.

We should treat this as a bug report: “if the font is not installed, no error message is shown”