3b1b / 3b1b/manim

Text object bug with size=0.5

Aperta
#1,224 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
93.8k
Fork
7.7k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

I used latest Manim from master branch on Windows 10. [Both fonts](https://fonts.google.com/?query=open+sans).
[Demo.zip](https://github.com/3b1b/manim/files/5210715/Demo.zip)
`size=1`:
![image](https://user-images.githubusercontent.com/35609308/92955446-8e610100-f47e-11ea-8b7f-ec03663e4298.png)

`size=0.5`:
![image](https://user-images.githubusercontent.com/35609308/92955289-50fc7380-f47e-11ea-833e-e9658d2bf271.png)
```
strs = ['OpenSansCondensed-Bold.ttf',
'OpenSansCondensed-Light.ttf',
'OpenSansCondensed-LightItalic.ttf',
'OpenSans-Bold.ttf',
'OpenSans-BoldItalic.ttf',
'OpenSans-ExtraBold.ttf',
'OpenSans-ExtraBoldItalic.ttf',
'OpenSans-Italic.ttf',
'OpenSans-Light.ttf',
'OpenSans-LightItalic.ttf',
'OpenSans-Regular.ttf',
'OpenSans-SemiBold.ttf',
'OpenSans-SemiBoldItalic.ttf']

fonts = {strs[0]: 'Open Sans Condensed Bold',
strs[1]: 'Open Sans Condensed Light',
strs[2]: 'Open Sans Condensed Light Italic',
strs[3]: 'Open Sans Bold',
strs[4]: 'Open Sans Bold Italic',
strs[5]: 'Open Sans ExtraBold',
strs[6]: 'Open Sans ExtraBold Italic',
strs[7]: 'Open Sans Italic',
strs[8]: 'Open Sans Light',
strs[9]: 'Open Sans Light Italic',
strs[10]: 'Open Sans Regular',
strs[11]: 'Open Sans SemiBold',
strs[12]: 'Open Sans SemiBold Italic'}

class Demo(Scene):
def construct(self):
for size in [2, 1, .7, .5]:
for i in range(len(strs)):
text = Text(strs[i], font=fonts[strs[i]], stroke_width=0, size=size)
text.move_to([text.length_over_dim(0) / 2 - 5, .6 * (6 - i), 0])
self.add(text)
self.wait(.1)
self.remove(*self.mobjects)
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.