0

for some reason, I can't use custom fonts when creating a MoviePy TextClip. It says in their documentation that it should be to use all the fonts installed on my system, but when I run this little code snippet in Python (to get all the possible TextClip fonts):

from moviepy.editor import TextClip

print(TextClip.list("font")) 

It prints a list of all the basic fonts that you get when you install Windows, but none of the custom fonts that I installed myself. (And that I can see in the Windows/Fonts directory)

I did some research and it seems that it might be related with ImageMagick, but apparently, on Windows, the fonts should be handled without the user having to do anything. I tried reinstalling ImageMagick, but it didn't solve the issue. I also found a post talking about editing the type-windows.xml file in the ImageMagick config, but when I open it, I see a list of fonts looking like this:

...

 <type name="Arial-Special-G2-Italic" fullname="Arial Special G2 Italic" family="Arial Special G2" weight="400" style="italic" stretch="normal" glyphs="/usr/share/fonts/msttcore/msgeoai2.ttf"/>
  <type name="Bookman-Old-Style" fullname="Bookman Old Style" family="Bookman Old Style" weight="400" style="normal" stretch="normal" glyphs="/usr/share/fonts/msttcore/bkmnos.ttf"/>
  <type name="Bookman-Old-Style-Bold" fullname="Bookman Old Style Bold" family="Bookman Old Style" weight="700" style="normal" stretch="normal" glyphs="/usr/share/fonts/msttcore/bookosb.ttf"/> 

...

But the fonts do not correspond with the one I see when I print the list from TextClip.list + I didn't find anything on how to manually add a font there so I gave up on this lead.

If anyone has some ideas on what I'm doing wrong, it would be greatly appreciated !

1 Answers1

0

Didn't find the cause of the issue, but what works for me is to simply Right Click + "Install for all users" on my .otf/.ttf files so they end up in the C:\Windows\Fonts location and not in the C:\Users\33628\AppData\Local\Microsoft\Windows\Fonts location.

Bihag Kashikar
  • 1,009
  • 1
  • 2
  • 13