I was asked in an email the other day if I could add a function to gather all the fonts in a given folder into a Pog. While this is a cool idea for a future release, it's possible right now from the command-line. Lemme show you how.
Open a console/terminal (like konsole or gnome-terminal). I will use square brackets [ ] to surround the command you can type but don't type the brackets. I will use ~/somefonts as the example folder you want to use.
The idea is to build a pog, which is a plain text file containing full paths to each font file. Okay, let's start:
- Use [cd ~/.fontypython] to go where the pogs live.
- [echo "not installed" > newpog.pog] You can use any name you want. Just make *sure* you don't overwrite some other pog!
- [find ~/somefonts -iname "*.ttf" >> newpog.pog] That will go and find the ttfs (you can change that to say "*.otf" but Type1 fonts might be more tricky) and then it will append them to the 'newpog.pog' file you just started.
- If you want to add other fonts from other folders, just use the same find command, but change the path. Make sure you use 2 ">" symbols (>>) because that means append-to.
[fontypython newpog]
You can also install those fonts with:
[fontypython -i newpogs]
Have a look at [fontypython --help]
Simple, I hope ;)
\d
No comments:
Post a Comment