Skip to content
Download Rake Task for the FontSquirrel Font-Kits. Integrated with Rails 3.1+
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE
README.md
Rakefile
fontsquirrel-download.gemspec

README.md

Fontsquirrel::Download

Download and extract font-kits from fontsquirrel easily with a rake tasks.

Installation

Add this line to your application's Gemfile:

gem 'fontsquirrel-download', group: "development"

And then execute:

$ bundle

Add to your application.css/application.css.scss:

//= require fonts

Because the download will append the necessary changes to app/assets/stylesheets/_fonts.css.sass.

Usage

Use Rake task, specify the Font name as written in the URL from font-squirrel, e.g. the well-known LaTeX-Font:

rake font:kit NAME=TeX-Gyre-Bonum

This will download the fonts to app/assets/fonts and append the style rules to app/assets/stylesheets/_fonts.css.sass.

After that, you can use that style definition in your css rules, like:

body {
  font-family: "TeXGyreBonumRegular", serif;
}

The names always vary a little, just look them up in the _fonts.css.sass

Potential ToDo

  • Until know, it will download the normal subset of the font. Some fonts have no special chars (like German Umlauts) at all, some have them in a subset. Maybe specifying the subset comes in handy.
  • Downloading not only font-kits but all the other fonts...
Something went wrong with that request. Please try again.