added the linux font directories
by copying the pattern of mac/windowss font directories
@scanny I lost the labels from the other PR. My apologies for the hassle, git and I are not simpatico sometimes. https://github.com/scanny/python-pptx/pull/159 . They were shortlist and text.
@hoopes can you say a little about what Linux distros this is likely to work for? The documentation should probably mention.
From: https://wiki.ubuntu.com/Fonts https://wiki.archlinux.org/index.php/fonts https://wiki.debian.org/Fonts https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-x-fonts https://docs.fedoraproject.org/en-US/quick-docs/adding-new-fonts-fedora/
I added the /usr/local/share/fonts and ~/.local/share/fonts based on those wiki pages.
Could we please get this merged into master?
I too would like to see this merged to master!
Follow up question: how does python-pptx currently load fonts on Linux systems? Does it just bundle some default fonts, or is it more nuanced than that?
I need this as well for the MInt distro!
Hey guys, do you plan to merge it anytime soon? Would be super useful.
I would also appreciate if this was merged. Needed for Ubuntu.
Did fork according @hoopes solution, thanks!
I just copied all fonts from C:\Windows\Fonts to ~/.fonts/.
Now I'm able to use tf.fit_text() on linux :)
One simple way to make this work currently is to pass the desired font file instead. Not the best way, but it works without having to depend on forks for now.
A nice improvement for this solution would be to be able to configure/pass possible paths containing font files. Look for the default locations is possible and raise exception if no folder/file is found.