Created
August 6, 2014 13:20
-
-
Save DatanoiseTV/9c38c46be3e66ee2a38b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ImageFont, ImageDraw, Image | |
fontSize = 32 | |
fontWidth = 20 | |
numFonts = 3 | |
image = Image.new( 'RGB', (fontWidth*127,fontSize*numFonts), "black") | |
draw = ImageDraw.Draw(image) | |
font = ImageFont.truetype("whitrabt.ttf", fontSize) | |
font2 = ImageFont.truetype("saxmono.ttf", fontSize) | |
font3 = ImageFont.truetype("MODENINE.TTF", fontSize) | |
# ASCII Characters from 32 DEC to 127 are visible | |
for x in range(32,127): | |
draw.text(((x)*20, 0),chr( x), font=font) | |
draw.text(((x)*20, 32),chr( x), font=font2) | |
draw.text(((x)*20, 64),chr( x), font=font3) | |
image = image.convert('L') | |
image.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment