Giter Club home page Giter Club logo

googlefontdirectory's Introduction

googlefontdirectory

This is an UNOFFICIAL MIRROR of Google Fonts that contains only the relevant *.ttf files that end users need to use the fonts.

About

Created for easier access to all of Google Fonts, with a smaller download size compared with using Google's official repository (100MB vs 2 GB).

Installation

Install these fonts the same way as you would with any other font. Copy the desired fonts to your system's font directory. Grab all the fonts in a compressed format by downloading one of these:

Background

Presently, there is no quick method for users to install all the fonts from Google's official mercurial repository.

In order to install from the official method, users are required to clone and pull updates from Google's hg repo (~2GB).

This repository mirrors that repo, but only contains the web font files (*.ttf) along with the relevant license (*.txt) and metadata (*.json) files, by periodically updating the hg repo and executing:

# Pull latest updates from hg repo.
cd ./googlefonts-hg && hg pull --update && cd ..

# Save webfont, license and metadata file changes to github repo
for fontdir in ./googlefonts-hg/{apache,ofl,ufl}/*
do
    rsync -av \
        --exclude='/*/*/*' \
        --include='*/' \
        --include='*.ttf' \
        --include='*.txt' \
        --include='*.json' \
        --exclude='*' \
        --delete \
        --prune-empty-dirs \
        "$fontdir" ./googlefonts-git/fonts/
done

# Remove obsolete fonts (that have been removed/renamed in hg repo)
for fontdir in ./googlefonts-git/fonts/*
do
    fontname="${fontdir##*/}"
    if [[ ! -d "./googlefonts-hg/apache/$fontname"  && 
        ! -d "./googlefonts-hg/ofl/$fontname" &&
        ! -d "./googlefonts-hg/ufl/$fontname" ]]
    then
        rm -r "$fontdir"
    fi
done

googlefontdirectory's People

Contributors

ajacksified avatar w0ng avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.