ManimCommunity / ManimCommunity/manim
Text object: Size not scaling correctly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
Description of bug / unexpected behavior
The size parameter for a Text object does not work as intended.
Expected behavior
I would expect the output to match for:
- initializing a text size X
- scaling to X.
Additional: I would be okay with using scale instead of size as a workaround, but as seen below it performs an automated word-wrap because the width of the text pre-scaling seems to be too large. If possible, it would be great if this could be activated/deactivated with a parameter.
How to reproduce the issue
long_string = "Problems: First, 'size' changes the spacing between two strings, which it should not. " \
"Second, when exceeding a specific width (pre-scale), the line is wrapped, which is ok but " \
"should be configurable."
self.add(
VGroup(
Text(long_string, size=0.25),
Text(long_string).scale(0.25)
).arrange(DOWN, aligned_edge=LEFT)
)
Additional media files
System specifications
This issue should be present on all systems.
Manim Version: 0.5.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided reproduction with Manim 0.5.0 and compare Text(long_string, size=0.25) with Text(long_string).scale(0.25). Trace the Text object's size and scaling behavior, including the automatic wrapping described in the report. Done means the two approaches produce matching output and the wrapping behavior is configurable or its intended limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100