manimcommunity / data /tests /opengl /test_text_mobject_opengl.py
introvoyz041's picture
Migrated from GitHub
ef9c1a3 verified
from __future__ import annotations
from manim.mobject.text.text_mobject import MarkupText, Text
def test_font_size(using_opengl_renderer):
"""Test that Text and MarkupText return the
correct font_size value after being scaled.
"""
text_string = Text("0").scale(0.3)
markuptext_string = MarkupText("0").scale(0.3)
assert round(text_string.font_size, 5) == 14.4
assert round(markuptext_string.font_size, 5) == 14.4