A community-maintained Python framework for creating mathematical animations.
black
Syrus Darkc91a9b92f456
diff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.pyindex a93021351..2b4ae75af 100644--- a/manim/mobject/svg/text_mobject.py+++ b/manim/mobject/svg/text_mobject.py@@ -917,7 +917,7 @@ class Text(SVGMobject):context.move_to(START_X + offset_x, START_Y + line_spacing * setting.line_num)- pangocairocffi.update_layout(context,layout)+ pangocairocffi.update_layout(context, layout)layout.set_text(text)logger.debug(f"Setting Text {text}")pangocairocffi.show_layout(context, layout)diff --git a/tests/test_pango.py b/tests/test_pango.pyindex 17567846d..bb08099ec 100644--- a/tests/test_pango.py+++ b/tests/test_pango.py@@ -138,9 +138,10 @@ def test_tabs_replace() -> None:surface.finish()assert compare_SVGObject_with_PangoText(temp_pango_text, filename)+def check_t2s() -> None:size = 1- temp_pango_text=Text('Helloworld', t2s={'world':ITALIC})+ temp_pango_text = Text("Helloworld", t2s={"world": ITALIC})surface = cairocffi.SVGSurface(filename, WIDTH, HEIGTH)context = cairocffi.Context(surface)context.move_to(START_X, START_Y)@@ -149,7 +150,7 @@ def check_t2s() -> None:fontdesc = pangocffi.FontDescription()fontdesc.set_size(pangocffi.units_from_double(size * 10))layout.set_font_description(fontdesc)- layout.set_markup('Hello<span style="italic">world</span>') # yay, pango markup+ layout.set_markup('Hello<span style="italic">world</span>') # yay, pango markuppangocairocffi.show_layout(context, layout)surface.finish()assert compare_SVGObject_with_PangoText(temp_pango_text, filename)