Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

make Paragraph use CairoText (#798)

Benjamin Hackla5a107c9cedf
diff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.py
index f7d2f8254..1755e16a9 100644
--- a/manim/mobject/svg/text_mobject.py
+++ b/manim/mobject/svg/text_mobject.py
@@ -399,6 +399,11 @@ class Paragraph(VGroup):
`weird <https://github.com/3b1b/manim/issues/1067>`_. Consider using
:meth:`remove_invisible_chars` to resolve this issue.
+ .. note::
+
+ Due to issues with the Pango-powered :class:`.Text`, this class uses
+ :class:`.CairoText`.
+
Parameters
----------
line_spacing : :class:`int`, optional
@@ -431,7 +436,7 @@ class Paragraph(VGroup):
VGroup.__init__(self, **config)
lines_str = "\n".join(list(text))
- self.lines_text = Text(lines_str, **config)
+ self.lines_text = CairoText(lines_str, **config)
lines_str_list = lines_str.split("\n")
self.chars = self.gen_chars(lines_str_list)