ManimCommunity / ManimCommunity/manim
Set Properties for Individual Letters - Some Properties Work, Others Don't
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 sample code changes properties for the first letter in Hello.
Only the color and stroke_width properties have the expected effect, the others have no effect
## Expected behavior
1. In the sample code, Hello is displayed twice.
2. For the first letter, H, in the second instance, the expectation was that the properties shown would all be applied to the H.
3. Color and stroke_width had the expected effect, as can be seen when the code is run.
4. The other properties shown, weight, slant, etc., had no effect
## How to reproduce the issue
Run the sample below.
Also, click Images/GIFs to see a screen shot of the problem.
Code for reproducing the problem
```py
class setPropertiesForIndivdualLetters(Scene):
def construct(Self):
t1 = Text("Hello", color = BLUE, stroke_width = 4, weight=NORMAL, slant=NORMAL, fill_opacity= 0, font_size = 50, font="Georgia").scale(2)
t2 = Text("Hello", color = BLUE, stroke_width = 4, weight=NORMAL, slant=NORMAL, fill_opacity= 0, font_size = 50, font="Georgia").scale(2)
t1.shift(UP * 2)
# These work
t2.chars[0].set_color(RED)
t2.chars[0].set_stroke_width(1)
# These fail
t2.chars[0].set_weight(BOLD)
t2.chars[0].set_slant(ITALIC)
t2.chars[0].set_fill_opacity(1)
t2.chars[0].set_font_size(70)
t2.chars[0].set_font("Arial")
Self.add(t1, t2)
Self.wait(5)
```
## Additional media files

## Logs
Terminal output
```
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
```
## System specifications
System Details
- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM: 16GB
- Python version (`python/py/python3 --version`):
- Installed modules (provide output from `pip list`):
```
Windows 10, version 22H2
16 GB RAM
Python v0.16.0.post0
setuptools 47.1.0
skia-pathops 0.7.4
srt 3.5.3
tqdm 4.66.1
typing_extensions 4.7.1
urllib3 2.0.4
watchdog 2.3.1
zipp 2.3.1
zipp 3.15.0
```
LaTeX details
+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
FFMPEG
Output of `ffmpeg -version`:
```
PASTE HERE
```
## Additional comments
Hope to heaven it's not a syntax issue on my part but...
I've spent days on this, so the issue isn't obvious, at least not to me and I'm sure not to others
I much appreciate any help you can give, thanks
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 Text sample and compare the effects of color and stroke_width with weight, slant, fill_opacity, font_size, and font on t2.chars[0]. Read the Text and character-handling entry points involved in those setters. Done means the listed properties consistently affect only the first letter in the second “Hello” instance, with a regression test covering the behavior.
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