Coder Social home page Coder Social logo

font_extractor's Introduction

Font_Extractor

Really simple python script to extract every character of a monospace font from an image

How to make the script work ?

What is the use of the script

From an image of the characters of a font, which has to be monospace, it will automatically create a folder with an image for each character. Input image exemple :

image Char Screen

Output images exemple :

char A

char B

char C

char _

How to use it

Google Slide or whatever to create an image

First we need to know exactly what are height dimension in pixel we want for each character's image. For exemple let's say we want images with 128 pixels height and make it very long.

Go to google slide or equivalent.

Then change the dimension of the page as I made for exemple on this slide.

Google Slide Screen

Be sure the font you choose is a monospace one

Then write all the characters you can as above

image Char Screen

Be sure the starting block of the first character is bordered the slide and the last character is taking all the horizontal block (for exemple the _ char on the the image)

Then export it to .png image with the {Font Name}_{ALL_THE_CHARS}.png as instance: {Courier Prime}_{ABCDEFG_}.png by copy pasting the char written in the slide.

And finally move the image into the font_images/ folder and run the python script.

python3 font_extractor.py

You can change the parameter on the top of the script for example for the SIZE = (64, 128) by default.

font_extractor's People

Contributors

axelthevenot avatar

Watchers

James Cloos 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.