Skip to content

A little app to convert text to a downloadable image file

License

Notifications You must be signed in to change notification settings

lacek/text2image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text to Image

This is a little app to convert text to a downloadable image file. Demo is here

Motivation

This is a tool for my friend to help students with reading disability to learn vocabulary.

Usage

Simply download as zip, extract then open index.html and use locally. If you want to host it to the Internet, check out the following simple methods:

Configurations

Configurations can be find in [config.json] (https://github.com/lacek/text2image/blob/master/config.json).

  • charResMap (Object)
    An object containing mapping of characters to images. The key should be a single character. The value is the path to the image. The path can be absolute or relative.
  • charVerticalAlign (String [top|center|bottom])
    Vertical alignment of character in a row.
  • charHorizontalAlign (String [left|center|right])
    Horizontal alignment of characters in a row.
  • charSpacingRatio (Float [0-1])
    Spacing ratio between each character. Average width of all characters is used as the base.
  • lineSpacingRatio (Float [0-1])
    Spacing ratio between each line. Average height of all characters is used as the base.
  • maxFileNameLength (Integer [1-...])
    Maximum length of the file name of downloadable image.

Compatibility

FileSaver is used to enable the "save as" feature. The list of supported browser can be found [here] (https://github.com/eligrey/FileSaver.js/#supported-browsers).

Know Issues

Credit

License

The MIT License