@@ -582,7 +582,7 @@ def change_alignment_for_a_line(self, alignment, line_no):
582
582
583
583
584
584
class PangoText (SVGMobject ):
585
- """Display (non-LaTeX) text rendered using `Pango <https://pango.gnome.org/>`_.
585
+ r """Display (non-LaTeX) text rendered using `Pango <https://pango.gnome.org/>`_.
586
586
587
587
PangoText objects behave like a :class:`.VGroup`-like iterable of all characters
588
588
in the given text. In particular, slicing is possible.
@@ -598,7 +598,28 @@ class PangoText(SVGMobject):
598
598
The mobject like :class:`.VGroup`.
599
599
600
600
Examples
601
- --------
601
+ ---------
602
+ .. manim:: MultipleFonts
603
+ :save_last_frame:
604
+
605
+ class MultipleFonts(Scene):
606
+ def construct(self):
607
+ morning = PangoText("வணக்கம்", font="sans-serif")
608
+ chin = PangoText(
609
+ "見 角 言 谷 辛 辰 辵 邑 酉 釆 里!", t2c={"見 角 言": BLUE}
610
+ ) # works same as ``Text``.
611
+ mess = PangoText("Multi-Language", style=BOLD)
612
+ russ = PangoText("Здравствуйте मस नम म ", font="sans-serif")
613
+ hin = PangoText("नमस्ते", font="sans-serif")
614
+ arb = PangoText(
615
+ "صباح الخير \n تشرفت بمقابلتك", font="sans-serif"
616
+ ) # don't mix RTL and LTR languages nothing shows up then ;-)
617
+ japanese = PangoText("臂猿「黛比」帶著孩子", font="sans-serif")
618
+ self.add(morning,chin,mess,russ,hin,arb,japanese)
619
+ for i,mobj in enumerate(self.mobjects):
620
+ mobj.shift(DOWN*(i-3))
621
+
622
+
602
623
.. manim:: PangoRender
603
624
:quality: low
604
625
0 commit comments