Skip to content

DavidBarts/getfonts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README File for Getfonts

Introduction

Apple’s MacOS comes with a very nice collection of commercial-grade, standard fonts. Alas, for those who use open source text-processing software, most of the fonts come shipped as .ttc (TrueType Collection) files, and most open source software is not capable of reading such files. So you end up with a collection of beautiful, standard system fonts that your software cannot use.

This program extracts Macintosh *.ttc font collections into individual *.ttf fonts, then attempts to rename the result based on the embedded PostScript name found in the extracted files. If no name can be found, files are left in their unrenamed form (based on the font family and a two-digit sequence number). It is based on two user-contributed utilities distributed with FontForge.

Building

If you’re in the situation where you need this program, you probably have already installed Xcode on your system, anyhow, because you’ve been using it to build open-source programs already. If for some reason you haven’t installed the command-line Xcode tools on your Mac yet, you must do that first. Be sure to install the command-line tools (they tend not to be installed by default).

Xcode may be downloaded for free here .

Once you have Xcode, building the code from source is as simple as typing “make” to the command prompt.

Installing

Once you’ve built the binaries, edit the getfonts script and change the definition of gfhome to point to where those binaries live, then copy that script to a directory that’s on your PATH.

Using

Just pass getfonts the name of a .ttc file, and its contents will be extracted to files in your home directory:

$ getfonts /Library/Fonts/Hoefler\ Text.ttc
/Library/Fonts/Hoefler Text.ttc ...
/Library/Fonts/Hoefler Text.ttc => Hoefler Text_00.ttf Hoefler Text_01.ttf Hoefler Text_02.ttf Hoefler Text_03.ttf
Hoefler Text_00.ttf -> HoeflerText-Regular.ttf
Hoefler Text_01.ttf -> HoeflerText-Black.ttf
Hoefler Text_02.ttf -> HoeflerText-Italic.ttf
Hoefler Text_03.ttf -> HoeflerText-BlackItalic.ttf

Sometimes you may run across fonts without embedded names, which you will have to rename yourself (hint: open them in FontBook to inspect them):

$ getfonts /Library/Fonts/Baskerville.ttc
/Library/Fonts/Baskerville.ttc ...
/Library/Fonts/Baskerville.ttc => Baskerville_00.ttf Baskerville_01.ttf Baskerville_02.ttf Baskerville_03.ttf Baskerville_04.ttf Baskerville_05.ttf
No name found in Baskerville_00.ttf.
No name found in Baskerville_01.ttf.
No name found in Baskerville_02.ttf.
No name found in Baskerville_03.ttf.
No name found in Baskerville_04.ttf.
No name found in Baskerville_05.ttf.

Legality

Please note that:

  1. I am not an attorney, and
  2. What is being said below applies only if you do not distribute the files you create off your own computer. If you are using this to make fonts for installing on other computers, to get out of paying for them, that is clearly contrary to the terms for which the fonts were licensed for your system software.

I’ve had people argue that doing the above is illegal, because it violates the license terms of the fonts, given that most commercial fonts prohibit altering or reinterpreting the fonts.

I disagree. Very few displays or printers understand any font file format, when you get down to it. They all depend on software that reads the font data in a standard form, and processes it into a form that the raw hardware that renders the pixels can understand. If font files cannot legally be interpreted in any form, they are useless.

So long as you do not redistribute the files you make, it is my belief that the use of this program ought to be legal. You are merely processing fonts into an internal form suitable for the software you use, and caching the result on your local file storage. There is essentially no difference between doing this, and doing it all on-the-fly, in memory. In fact, it would not surprise me in the least to learn that any number of shrink-wrapped commercial programs cache font data somewhere on disk.

License

This program is based on code in Fontforge, which is licensed under the GNU General Public License, so is itself licensed under those terms.

About

Extract and meaningfully name fonts from Apple TTC (TrueType Collection) files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages