TruFont is a font-editing application written with Python3, ufoLib, defcon and PyQt5.
Note this requires the Black Foundry tfont library to run without crashing.
Install Python 3.5 (or later):
- OS X: Install using Homebrew:
brew install python3 - Windows: Download installer from python.org/downloads
- Linux: It's usually packaged with the OS.
- OS X: Install using Homebrew:
Set up a new Python virtual environment. Although this is not required, it's highly recommended, since TruFont has lots of dependencies, which may (or may not) conflict with other modules you installed globally.
To create a new virtual environment in
ENV_DIR:python3 -m venv ENV_DIRThis creates a new
ENV_DIRfolder (you can choose the name you want). Thebinsubfolder (orScriptsif you are on Windows) contains a newpythonexecutable, and thepipinstaller linked to that.Activate the newly created environment:
- OS X or Linux:
source ENV_DIR/bin/activate - Windows:
ENV_DIR\Scripts\activate.bat
This temporarily adds the virtual environment's scripts folder to your console's PATH, so you can access python, pip and the trufont script from anywhere.
- OS X or Linux:
Run
deactivatewhen you wish to exit the virtual environment. This restores the default system PATH.
Install/update TruFont to the latest stable release:
pip install --upgrade trufontRun the app as
trufont.
Here's a quick tutorial if you'd like to contribute to TruFont.
Click the "Fork" button above, and clone the forked git repository to a new directory called
trufont:git clone https://github.com/<YOUR_USERNAME>/trufontMove into the new folder and run this command to add the upstream repository url to the local list of remotes:
git remote add upstream https://github.com/trufont/trufontThis enables you to keep up-to-date with the upstream development.
Synchronize your fork's master branch with the
upstream/master, especially before creating new branches:git checkout master git fetch upstream git rebase upstream/master git push
Now, you can create and checkout your new feature branch:
git checkout -b my-cool-new-featureUse pip to install TruFont in "editable" mode:
pip install --editable .Instead of copying trufont to your Python site-packages directory, this command only creates a link to the source directory inside the git repository. You can then modify the code in place, or synchronize the latest upstream changes (as in step 4) without having to re-install.
It is also recommended to regularly update the dependencies to the curently tested versions as listed in requirements.txt:
pip install --upgrade -r requirements.txtOnce you have commited your patch, push the new branch to your fork:
git push -u origin my-cool-new-featureFinally, click "New pull request" on TruFont's Github page to submit your patch.
We will be happy to review and integrate it into the main app.
Happy hacking with TruFont! 💪