GithubHelp home page GithubHelp logo

mukti107 / googlewebfonts-fontfamilypreviewimages Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getstencil/googlewebfonts-fontfamilypreviewimages

0.0 1.0 0.0 68.4 MB

A collection of 2,854 images that represent unique font family (variations) from Google Web Fonts

License: MIT License

googlewebfonts-fontfamilypreviewimages's Introduction

Google Web Fonts - Font Family Preview Images

This repo contains images that are representations of all the different Google Fonts. We needed this for our app Stencil, since we allow our users to search through Google Fonts (via their API). But we (obviously) wanted/needed to provide them with a preview of what the font looked like.

We could have loaded the fonts into memory and then shown those, but that didn't seem ideal.

Screenshot of how our app uses the images in this repo:

Why are there so many files?

While Google Fonts currently provides 2,268 different font variations, there are many-more actual images. This is because Google Fonts routinely updates fonts from one version to another (eg. v5 to v6). We then re-render the images to ensure the preview we show our users is accurate.

I've decided to leave those files in the repo for posterity's sake: you never know what people will need :)

Sizes

At the moment, I'm only providing preview images that have a font-size value of 48px. The width respects the native width of the font. To ensure a sharp display, I'd suggest you hardcode the preview thumb at a maximum height of 24px.

Naming convention of files:

Two examples: ABeeZee-400.v10.png and Cabin-400italic.v10.png
The format is pretty straight-forward:

  • The font name (non-hyphens, non-alphabetic and non-numeric characters are removed)
  • A dash (-)
  • The font-weight
  • If the font is an italicized version, after the font, the word italic is added
  • The version number, preceded by the letter v

The regular expression I use to strip out the name-characters is: /[^A-Za-z0-9\-]/

googlewebfonts-fontfamilypreviewimages's People

Contributors

onassar avatar

Watchers

 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.