How to choose a font with Text object?
See original GitHub issueThis code does not change the font and letter become distorted (click on the image to enlarge and look at letters: B, D, f, g, P, U...
):
script = '''
AaBbCcDdEeFfGg
HhIiJjKkLlMmNn
OoPpQqRrSsTtUu
VvWwXxYyZz
'''
class WriteText(Scene):
def construct(self):
text = Text(script, font='/usr/share/fonts/truetype/open-sans/OpenSans-Regular.ttf')
self.play(Write(text))
self.wait(.1)
!python3 -m manim example_scenes.py WriteText -r 480,854
If I change this line the result is kind of similar to the target, but I can’t choose regular
and letters are distorted (look at the small g
it has a stair on the top):
text = Text(script, font="Open Sans")
Issue Analytics
- State:
- Created 4 years ago
- Comments:48 (25 by maintainers)
Top Results From Across the Web
Fundamental text and font styling - Learn web development
To set a different font for your text, you use the font-family property — this allows you to specify a font (or list...
Read more >How to Change Fonts for 3D Text - Blender Text Tutorial
... Learn Video Editing - Complete Guide to DaVinci Resolve Course ($5 Off) Basics of editing text objects within Blender 2.77 ...
Read more >How to change font for text objects? - Blender Stack Exchange
You can change the font used for a text object under the Object Data properties panel. enter image description here.
Read more >[SOLVED] How to change the font for every text object?
if you are just trying to change all the fonts in a scene you could use search by type and put in "text"....
Read more >Different font and style in qlikview text object - Qlik Community
I want to show a Qlikview text object where some fonts are bold and different font type and other is different font type....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
Text
mobject is based on an other package calledpycario
, which only support for this way and it doesn’t support to use the font file directly, but I do find some way to use the font file directly, and I need to do some research which takes some time.I doesn’t think it is a bug, it is just doesn’t support this feature at all.
So until I can finish this feature to
Text
mobject, you need to use the way I gave above.Or you maybe you can try to write a function by yourself, I found that
freetype-py
dose support the way you want, but it needs some code to be integrated into manim.