A few weeks ago, my team was working on a mobile app design project, and at some point, we encountered a problem. For some reason, when two different people accessed a Sketch file (at different times, with the help of Dropbox), the fonts would get changed, and we’d have to waste some precious time to get things back on track. After doing some research, it seemed that the problem was that although all designers had the same type family installed, it wasn’t the exact same font. Basically, it was the same typeface, but from different sources.
The available solutions
How to avoid this situation? Make sure that everyone involved in the project has the exact same font installed. But, how?
One (manual) option is to download the fonts from whatever source and leave them in Dropbox (or similar) for everyone to install. But, that is not really comfortable or scalable for multiple projects.
Finally, we can sync all Google Fonts using GitHub.
Sync with Git
If you take a look at the “Sync With Git” section of the README in the Google Fonts repo, you’ll read:
“You can also sync the collection with git so that you can update by only fetching what has changed. To learn how to use git, GitHub provides illustrated guides and a youtube channel, and a learning game that takes just 15 minutes. Free, open source git applications are available for Windows and Mac OS X”.
If you don’t know how to use Git or GitHub, this probably won’t mean a lot to you. You might go through those links and you would probably learn how to use Git, and you’d get acquainted with the life story of the Octocat, but in truth, you don’t need to know all that in order to sync your Google Fonts. Of course, learning is always good for you. However, if you are in a tight schedule and in need of a quick fix, keep reading.
How to sync Google Fonts with GitHub
Here is a quick step-by-step guide:
- Download and install GitHub Desktop.
- Open the Desktop app and log in or create an account.
- Go to the Google Fonts repo and click on the green “Clone or download” button.
4. Click “Open in Desktop”.
5. Give permission to the browser to open the Desktop app.
6. On the “Clone a repository” dialog, click the “Choose” button next to the “Local path” field.
7. Choose the folder: /Users/**your user**/Library/Fonts. The “library” folder is hidden by default, to make it visible use the shortcut cmd+shift+. (dot).
8. The fonts will get synced, it will take a couple of minutes. After that time, all the Google Fonts should appear within the Library/Fonts folder, and you should be able to use them normally in Sketch or any other (design) software.
A note about syncing Google Fonts
From time to time there may be changes on the Google Fonts repo. To keep your version updated, you will have to fetch it manually. If anyone knows a way to make this update automagic, please let me know.
What about non-Google Fonts?
Although most of the times my team uses Google Fonts, we needed to cover the scenario of incorporating fonts from other foundries. An option is to use a Sketch plugin called FontPacker.
What this little fellow does is pack the fonts used in a Sketch file and save them in the same folder. Whenever a designer has to work on the project, he’ll have the fonts at hand to install.
In case you need to handle multiple Sketch files for the same project, here’s a free plugin called “Shared text styles” that will help you export and import all your text styles.
A closing word
I hope that this post comes in handy for other collaborative teams. If you have any tips, questions or resources to share, please don’t hesitate to contact me.