Skip to content

HighSierra0820/mingkuai-ascii

Repository files navigation

mingkuai-ascii

A simple typewriter-effect image generator. Named after Mingkuai Chinese Typewriter.

Requirements

  • Python 3.?
  • PIL

Usage

  • genFont.py: reads a specified font and stores images of characters in assets\pic\
  • render.py inputTextName outputImageName: renders an image, storing into outputImageName.png

Features

  • despites the random effects cast on the glyphs, same characters are rendered the same
  • alter the variables (e.g. dim, ful, defaultRandSeed) to get different results

Samples

Code Result
dim=0.01
ful=0.99
sample_fanta_0.01_0.99.png
dim=0.01
ful=0.99
sqrt
sample_fanta_0.01_0.99_sqrt.png
dim=0.50
ful=0.90
sqrt
sample_fanta_0.50_0.90_sqrt.png
  • here sqrt stands for newPixel=tuple(int(i*math.sqrt(coeffW*coeffH)) for i in imagePixel); you'll have to read line 31-50 of render.py to understand its meaning

References

About

a simple typewriter-effect image generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages