Have TexMobject keep track of font_size

This commit is contained in:
Grant Sanderson 2024-11-25 11:02:54 -07:00
parent 5b88d2347c
commit e19ceaaff0

View file

@ -48,6 +48,7 @@ class Tex(StringMobject):
if not tex_string.strip():
tex_string = R"\\"
self.font_size = font_size
self.tex_string = tex_string
self.alignment = alignment
self.template = template
@ -86,6 +87,10 @@ class Tex(StringMobject):
content, self.template, self.additional_preamble, self.tex_string
)
def _handle_scale_side_effects(self, scale_factor: float) -> Self:
self.font_size *= scale_factor
return self
# Parsing
@staticmethod