Skip to content

Instantly share code, notes, and snippets.

@uwezi
Last active March 21, 2023 23:13
Show Gist options
  • Save uwezi/fcbcbce4495245108b0b9674a711ba94 to your computer and use it in GitHub Desktop.
Save uwezi/fcbcbce4495245108b0b9674a711ba94 to your computer and use it in GitHub Desktop.
[Hindi language using LaTeX in Manim] How to create text in the Hindi language in Manim #manim #latex #fontspec #xetex #font
# https://discord.com/channels/581738731934056449/1074019689073741935/1074019689073741935
from manim import *
myTexTemplate = TexTemplate(
tex_compiler="xelatex",
output_format='.xdv',
)
myTexTemplate.add_to_preamble(r"\usepackage{fontspec}\setmainfont{Akshar Unicode.ttf}")
MathTex.set_default(tex_template=myTexTemplate)
Tex.set_default(tex_template=myTexTemplate)
class a_scene1(Scene):
def construct(self):
text=Tex(r"आप कैसे हैं?")
self.add(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment