The project is in a healthy, maintained state
A libarary find or download fonts
 Project Readme


windows macos ubuntu

A simple library to find and download fonts for Windows, Linux and Mac.


Add this line to your application's Gemfile:

gem "fontist"

And then execute:

bundle install

Or install it yourself as:

gem install fontist

Fetch formulas

After installation please fetch formulas to your system:

fontist update



The Fontist::Font is your go to place to deal with any font using fontist. This interface will allow you to find a font or install a font. Lets start with how can we find a font in your system.

Finding a font

The Fontist::Fontist.find interface can be used a find a font in your system. It will look into the operating system specific font directories, and also the fontist specific ~/.fontist directory.


If fontist find a font then it will return the paths, but if not found then it will could raise an unsupported font error or maybe an installation instruction for that specific font.

Install a font

The Fontist::Font.install interface can be used to install any supported font. This interface first checks if you already have that font installed or not and if you do then it will return the paths.

If you don't but supported by fontist, then it will download the font and copy it to ~/.fontist directory and also return the paths.

Fontist::Font.install(name, confirmation: "no")

If there are some issue with the provided font, like not supported or some other issue then it will raise those errors.

List all fonts

The Fontist::Font interface exposes an interface to list all supported fonts, this might be useful if want to know the name of the font or the available styles. You can do that by using:


The return values are OpenStruct object, so you can easily do any other operation you would do in any ruby object.


The fontist gem internally usages the Fontist::Formula interface to find a registered formula or fonts supported by any formula. Unless, you need to do anything with that you shouldn't need to work with this interface directly. But if you do then these are the public interface it offers.

Find a formula

The Fontist::Formula.find interface allows you to find any of the registered formula. This interface takes a font name as an argument and it looks through each of the registered formula that offers this font installation. Usages:


The above method will find which formula offers this font and then it will return a installable formula that can be used to check licences or install that fonts in your system.

Find formula fonts

Normally, each font name can be associated with multiple styles or collection, for example the Calibri font might contains a regular, bola or italic styles fonts and if you want a interface that can return the complete list then this is your friend. You can use it as following:


List all formulas

The Fontist::Formula interface exposes an interface to list all registered font formula. This might be useful if want to know the name of the formula or what type fonts can be installed using that formula. Usages:


The return values are OpenStruct object, so you can easily do any other operation you would do in any ruby object.



Fontist lets find font locations from a YAML manifest of the following format:

Segoe UI:
- Regular
- Bold
Roboto Mono:
- Regular

Calling the following code returns a nested hash with font paths.
{"Segoe UI"=>
 "Roboto Mono"=>


Fontist lets not only to get font locations but also to install fonts from the manifest:, confirmation: "yes")

It will install fonts and return their locations:

{"Segoe UI"=>
 "Roboto Mono"=>


These commands makes possible to operate with fonts via command line. The CLI properly supports exit status, so in a case of error it returns a status code higher or equal than 1.

All searches are case-insensitive for ease of use.


The install command is similar to the Font.install call. It first checks whether this font is already installed, and if not, then installs the font and returns its paths. Font or formula could be specified as a name.

$ fontist install "segoe ui"
These fonts are found or installed:


Uninstalls any font supported by Fontist. Returns paths of an uninstalled font, or prints an error telling that the font isn't installed or could not be found in Fontist formulas. Aliased as remove.

$ fontist uninstall "segoe ui"
These fonts are removed:


Prints installed font paths grouped by formula and font.

$ fontist status "segoe ui"
 Segoe UI
  Regular (/Users/user/.fontist/fonts/SEGOEUI.TTF)
  Bold (/Users/user/.fontist/fonts/SEGOEUIB.TTF)
  Italic (/Users/user/.fontist/fonts/SEGOEUII.TTF)
  Bold Italic (/Users/user/.fontist/fonts/SEGOEUIZ.TTF)


Lists installation status of fonts supported by Fontist.

$ fontist list "segoe ui"
 Segoe UI
  Regular (installed)
  Bold (installed)
  Italic (installed)
  Bold Italic (installed)
$ fontist list "roboto mono"
 Roboto Mono
  Regular (uninstalled)
  Italic (uninstalled)

Locations from manifest

Returns locations of fonts specified in a YAML file as an input.

For example, if there is a file manifest.yml:

Segoe UI:
- Regular
- Bold
Roboto Mono:
- Regular

Then the command will return the following YAML output:

$ fontist manifest-locations manifest.yml
Segoe UI:
  - "/Users/user/.fontist/fonts/SEGOEUI.TTF"
  - "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
Roboto Mono:
  Regular: []

Since Segoe UI is installed, but Roboto Mono is not.

Install from manifest

Install fonts from a YAML manifest:

$ fontist manifest-install --confirm-license manifest.yml
Segoe UI:
  - "/Users/user/.fontist/fonts/SEGOEUI.TTF"
  - "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
Roboto Mono:
  - "/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"


List of all commands could be seen by:

fontist help


We are following Sandi Metz's Rules for this gem, you can read the description of the rules here All new code should follow these rules. If you make changes in a pre-existing file that violates these rules you should fix the violations as part of your contribution.


Clone the repository.

git clone

Setup your environment.


Run the test suite


Formulas storage

All formulas are kept in the formulas repository. If you'd like to add a new one or change any existing, please refer to its documentation.

Auto-generate a formula

A formula could be generated from a fonts archive. Just specify a URL to the archive:

fontist create-formula
cp lato.yml ~/.fontist/formulas/Formulas/
cd ~/.fontist/formulas
git add Formulas/lato.yml
git commit -m "Add Lato formula"

Google Import

The library contains formulas for Google Foonts. A GHA workflow checks for fonts update every day. In case an update is found, it could be fetched to the library by:


The script would update formulas which should be committed to a separate repository formulas:

cd ~/.fontist/formulas
git add Formulas/google
git commit -m "Google Fonts update"
git push


First, thank you for contributing! We love pull requests from everyone. By participating in this project, you hereby grant Ribose Inc. the right to grant or transfer an unlimited number of non exclusive licenses or sub-licenses to third parties, under the copyright covering the contribution to use the contribution by all means.

Here are a few technical guidelines to follow:

  1. Open an issue to discuss a new feature.
  2. Write tests to support your new feature.
  3. Make sure the entire test suite passes locally and on CI.
  4. Open a Pull Request.
  5. Squash your commits after receiving feedback.
  6. Party!


This gem is developed, maintained and funded by Ribose Inc.