manim fonts
v0.4.0
可以從互聯網上獲取可以與Manim一起使用的字體。
from manim import *
from manim_fonts import *
class Example ( Scene ):
def construct ( self ):
with RegisterFont ( "Poppins" ) as fonts :
a = Text ( "Hello World" , font = fonts [ 0 ])
self . play ( Write ( a ))您可以用Google字體上的任何字體替換Poppins ,例如RegisterFont("Berkshire Swash") ,此插件將下載該字體並添加到搜索路徑並返回可以將可以傳遞給Text字體名稱直接使用字體。
下載的字體被緩存並重複使用。
該項目是根據BSD 3範圍許可許可的。