Giter VIP home page Giter VIP logo

font-dump's Introduction

font-dump

This project makes it easy to download tons of fonts and dump them to image files.

There are tons of custom-made fonts in the wild. Gathering them could help with machine vision, captcha systems, etc.

Usage

I suggest you use a Docker container for this. Fetching font images with Docker is easy:

$ mkdir output_images
$ docker build -t fontdump .
$ docker run --rm -v "$PWD/output_images:/out" fontdump

This will create an output_images/ directory and save a bunch of rendered fonts inside it.

The docker build command will likely take a few minutes; the dependencies for ttf_render are somewhat heavy-weight. The docker run command also takes several minutes, but most of that time is spent downloading fonts. Rendering itself is fairly fast.

Output directory

This will produce a directory structure like the following:

font_name/
  - lowercase/
    - a.png
    - b.png
    ...
  - uppercase/
    - A.png
    - B.png
  - digits/
    - 0.png
    - 1.png
    ...
another_name/
  - lowercase_dup/
    - a.png
    - b.png
    ...
  - uppercase/
    - A.png
    - B.png
    ...

The lowercase_dup directory is used when the lowercase characters appear to be very similar to the uppercase characters. This deals with the fact that, for some reason, many custom fonts only truly have uppercase.

The digits directory is only present for fonts that support digits.

font-dump's People

Contributors

unixpickle 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.