-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from schollz/grid
Grid
- Loading branch information
Showing
5 changed files
with
915 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"glyph":" ","positions":[]},{"glyph":"!","positions":[{"x":1,"y":0},{"x":1,"y":1},{"x":1,"y":3}]},{"glyph":"\"","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1}]},{"glyph":"#","positions":[{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":2},{"x":0,"y":3}]},{"glyph":"$","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"%","positions":[{"x":0,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":3}]},{"glyph":"\u0026","positions":[{"x":1,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":1,"y":3}]},{"glyph":"'","positions":[{"x":1,"y":0},{"x":1,"y":1}]},{"glyph":"(","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":0,"y":2},{"x":1,"y":3}]},{"glyph":")","positions":[{"x":1,"y":0},{"x":2,"y":1},{"x":2,"y":2},{"x":1,"y":3}]},{"glyph":"*","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":1,"y":1},{"x":0,"y":2},{"x":2,"y":2}]},{"glyph":"+","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":1,"y":2}]},{"glyph":",","positions":[{"x":2,"y":2},{"x":1,"y":3}]},{"glyph":"-","positions":[{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1}]},{"glyph":".","positions":[{"x":1,"y":3}]},{"glyph":"/","positions":[{"x":2,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":0,"y":3}]},{"glyph":"0","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"1","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":1,"y":2},{"x":1,"y":3}]},{"glyph":"2","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"3","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"4","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":2,"y":3}]},{"glyph":"5","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"6","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"7","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":2,"y":1},{"x":1,"y":2},{"x":1,"y":3}]},{"glyph":"8","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"9","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":":","positions":[{"x":1,"y":1},{"x":1,"y":3}]},{"glyph":";","positions":[{"x":1,"y":0},{"x":2,"y":2},{"x":1,"y":3}]},{"glyph":"\u003c","positions":[{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":2}]},{"glyph":"=","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2}]},{"glyph":"\u003e","positions":[{"x":0,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2}]},{"glyph":"?","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":1,"y":3}]},{"glyph":"@","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"A","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"B","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"C","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"D","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"E","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"F","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3}]},{"glyph":"G","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"H","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"I","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":1,"y":1},{"x":1,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"J","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3}]},{"glyph":"K","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"L","positions":[{"x":0,"y":0},{"x":0,"y":1},{"x":0,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"M","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"N","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"O","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"P","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3}]},{"glyph":"Q","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"R","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"S","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"T","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":1,"y":1},{"x":1,"y":2},{"x":1,"y":3}]},{"glyph":"U","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"V","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"W","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"X","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":1,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"Y","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":1,"y":3}]},{"glyph":"Z","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"[","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"\\","positions":[{"x":0,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":2,"y":3}]},{"glyph":"]","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":2,"y":1},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"^","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1}]},{"glyph":"_","positions":[{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"`","positions":[{"x":0,"y":0},{"x":1,"y":1}]},{"glyph":"a","positions":[{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"b","positions":[{"x":0,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"c","positions":[{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"d","positions":[{"x":2,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"e","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"f","positions":[{"x":2,"y":0},{"x":1,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":1,"y":3}]},{"glyph":"g","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"h","positions":[{"x":0,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"i","positions":[{"x":0,"y":0},{"x":1,"y":2},{"x":1,"y":3}]},{"glyph":"j","positions":[{"x":1,"y":0},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3}]},{"glyph":"k","positions":[{"x":0,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"l","positions":[{"x":1,"y":0},{"x":1,"y":1},{"x":1,"y":2},{"x":2,"y":3}]},{"glyph":"m","positions":[{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"n","positions":[{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"o","positions":[{"x":1,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"p","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":0,"y":3}]},{"glyph":"q","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":2,"y":3}]},{"glyph":"r","positions":[{"x":1,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":0,"y":3}]},{"glyph":"s","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"t","positions":[{"x":1,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":2,"y":3}]},{"glyph":"u","positions":[{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"v","positions":[{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"w","positions":[{"x":0,"y":1},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"x","positions":[{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":0,"y":3},{"x":2,"y":3}]},{"glyph":"y","positions":[{"x":0,"y":0},{"x":2,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":2,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"z","positions":[{"x":0,"y":1},{"x":1,"y":1},{"x":1,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"{","positions":[{"x":1,"y":0},{"x":2,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":1,"y":2},{"x":1,"y":3},{"x":2,"y":3}]},{"glyph":"|","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":1,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"}","positions":[{"x":0,"y":0},{"x":1,"y":0},{"x":1,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":0,"y":3},{"x":1,"y":3}]},{"glyph":"~","positions":[{"x":0,"y":1},{"x":1,"y":1},{"x":1,"y":2},{"x":2,"y":2}]}] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
local Glyphs={} | ||
local json=include("oooooo/lib/json") | ||
local f=io.open(_path.code.."oooooo/lib/glyphs.json","rb") | ||
local content=f:read("*all") | ||
f:close() | ||
|
||
local glyphs=json.decode(content) | ||
|
||
|
||
function Glyphs.pixels(name) | ||
pixels={} | ||
for i=1,#name do | ||
if i==5 then | ||
break | ||
end | ||
letter=name:sub(i,i) | ||
for _,glyph in ipairs(glyphs) do | ||
if glyph.glyph==letter then | ||
for _,position in ipairs(glyph.positions) do | ||
table.insert(pixels,{position.y+1,position.x+(i-1)*4+1,15}) | ||
end | ||
break | ||
end | ||
end | ||
end | ||
|
||
|
||
return pixels | ||
end | ||
|
||
return Glyphs |
Oops, something went wrong.