Convert Ascii art images to Scalable Icons
#Ascii to Icon
Based on a post
Replacing Photoshop With NSString
seen on HN.
I reccomend you read that post first.
This takes the idea and extends it in javascript to provide the ctx.drawIcon(text,x,y,w)
method.
I have extended the initial ruleset so that at larger sizes simpler ascii arts can be used. The rules are:
- Symbols are 0--9 a--b A--Z
- Single symbol for dot
- Two of symbol for line
- Many of symbol of circle
- Run of symbols for shape:
- Lowercase are stroked closed paths
- Uppercase are stroked and filled closed paths
- Runs starting with a number are stroked open paths
Here is an interactive space you can tryout.