ManimCommunity / ManimPango

Binding for Pango, to use with Manim.
https://manimpango.manim.community
MIT License
43 stars 13 forks source link

register_font() only allows ascii characters #21

Closed naveen521kk closed 3 years ago

naveen521kk commented 3 years ago

On Windows, the font file names passed through register_font or unregister_font raises an error if non-Ascii characters are present in the file path. This should be fixed.

>>> manimpango.register_font("庞门正道标题体2.0增强版.ttf")
UnicodeEncodeError: 'ascii' codec can't encode characters in position 35-41: ordinal not in range(128)
Exception ignored in: 'manimpango.cmanimpango.register_font'
UnicodeEncodeError: 'ascii' codec can't encode characters in position 35-41: ordinal not in range(128)
False