pngjs-draw
Version:
Adds basic drawing functionnalities to pngjs.
1 lines • 5.49 kB
JavaScript
module.exports = {"toUpper":true,"height":8,"spaceBetweenChars":1,"chars":{"0":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[0,1],[4,1],[0,2],[4,2],[0,3],[4,3],[0,4],[4,4],[0,5],[4,5],[0,6],[4,6],[1,7],[2,7],[3,7]]},"1":{"width":3,"pixels":[[0,0],[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[1,6],[0,7],[1,7],[2,7]]},"2":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[4,1],[4,2],[3,3],[2,4],[1,5],[0,6],[0,7],[1,7],[2,7],[3,7],[4,7]]},"3":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[4,1],[4,2],[2,3],[3,3],[4,4],[4,5],[0,6],[4,6],[1,7],[2,7],[3,7]]},"4":{"width":4,"pixels":[[0,0],[3,0],[0,1],[3,1],[0,2],[3,2],[0,3],[3,3],[0,4],[1,4],[2,4],[3,4],[3,5],[3,6],[3,7]]},"5":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[0,1],[0,2],[0,3],[1,3],[2,3],[3,3],[4,4],[4,5],[0,6],[4,6],[1,7],[2,7],[3,7]]},"6":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[0,1],[0,2],[0,3],[1,3],[2,3],[3,3],[0,4],[4,4],[0,5],[4,5],[0,6],[4,6],[1,7],[2,7],[3,7]]},"7":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[4,1],[4,2],[3,3],[2,4],[2,5],[2,6],[2,7]]},"8":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[0,1],[4,1],[0,2],[4,2],[1,3],[2,3],[3,3],[0,4],[4,4],[0,5],[4,5],[0,6],[4,6],[1,7],[2,7],[3,7]]},"9":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[0,1],[4,1],[0,2],[4,2],[1,3],[2,3],[3,3],[4,3],[4,4],[4,5],[0,6],[4,6],[1,7],[2,7],[3,7]]}," ":{"width":5,"pixels":[]},"A":{"width":6,"pixels":[[1,0],[2,0],[3,0],[4,0],[0,1],[5,1],[0,2],[5,2],[0,3],[1,3],[2,3],[3,3],[4,3],[5,3],[0,4],[5,4],[0,5],[5,5],[0,6],[5,6],[0,7],[5,7]]},"B":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[1,3],[2,3],[3,3],[4,3],[5,3],[0,4],[5,4],[0,5],[5,5],[0,6],[5,6],[1,7],[2,7],[3,7],[4,7]]},"C":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[5,6],[1,7],[2,7],[3,7],[4,7]]},"D":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[0,1],[5,1],[0,2],[5,2],[0,3],[5,3],[0,4],[5,4],[0,5],[5,5],[0,6],[4,6],[1,7],[2,7],[3,7]]},"E":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[0,2],[0,3],[1,3],[2,3],[3,3],[4,3],[0,4],[0,5],[0,6],[1,7],[2,7],[3,7],[4,7],[5,7]]},"F":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[0,2],[0,3],[1,3],[2,3],[3,3],[4,3],[0,4],[0,5],[0,6],[0,7]]},"G":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[0,2],[0,3],[3,3],[4,3],[0,4],[5,4],[0,5],[5,5],[0,6],[5,6],[1,7],[2,7],[3,7],[4,7]]},"H":{"width":6,"pixels":[[0,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[1,3],[2,3],[3,3],[4,3],[5,3],[0,4],[5,4],[0,5],[5,5],[0,6],[5,6],[0,7],[5,7]]},"I":{"width":3,"pixels":[[0,0],[1,0],[2,0],[1,1],[1,2],[1,3],[1,4],[1,5],[1,6],[0,7],[1,7],[2,7]]},"J":{"width":6,"pixels":[[1,0],[2,0],[3,0],[4,0],[5,0],[4,1],[4,2],[4,3],[4,4],[0,5],[4,5],[0,6],[4,6],[1,7],[2,7],[3,7]]},"K":{"width":6,"pixels":[[0,0],[5,0],[0,1],[4,1],[0,2],[3,2],[0,3],[1,3],[2,3],[0,4],[3,4],[0,5],[4,5],[0,6],[5,6],[0,7],[5,7]]},"L":{"width":5,"pixels":[[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[1,7],[2,7],[3,7],[4,7]]},"M":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[3,1],[5,1],[0,2],[3,2],[5,2],[0,3],[3,3],[5,3],[0,4],[5,4],[0,5],[5,5],[0,6],[5,6],[0,7],[5,7]]},"N":{"width":6,"pixels":[[0,0],[5,0],[0,1],[1,1],[5,1],[0,2],[2,2],[5,2],[0,3],[2,3],[5,3],[0,4],[2,4],[5,4],[0,5],[3,5],[5,5],[0,6],[3,6],[5,6],[0,7],[4,7]]},"O":{"width":6,"pixels":[[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[5,3],[0,4],[5,4],[0,5],[5,5],[1,6],[5,6],[2,7],[3,7],[4,7]]},"P":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[1,3],[2,3],[3,3],[4,3],[0,4],[0,5],[0,6],[0,7]]},"Q":{"width":6,"pixels":[[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[5,3],[0,4],[5,4],[0,5],[3,5],[5,5],[1,6],[4,6],[5,6],[2,7],[3,7],[4,7],[5,7]]},"R":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[1,3],[2,3],[3,3],[4,3],[0,4],[5,4],[0,5],[5,5],[0,6],[5,6],[0,7],[5,7]]},"S":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[0,2],[1,3],[2,3],[3,3],[4,3],[5,4],[0,5],[5,5],[0,6],[5,6],[1,7],[2,7],[3,7],[4,7]]},"T":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[2,1],[2,2],[2,3],[2,4],[2,5],[2,6],[2,7]]},"U":{"width":6,"pixels":[[0,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[5,3],[0,4],[5,4],[0,5],[5,5],[0,6],[5,6],[1,7],[2,7],[3,7],[4,7]]},"V":{"width":6,"pixels":[[0,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[5,3],[1,4],[4,4],[1,5],[4,5],[1,6],[4,6],[2,7],[3,7]]},"W":{"width":6,"pixels":[[0,0],[5,0],[0,1],[5,1],[0,2],[5,2],[0,3],[3,3],[5,3],[0,4],[3,4],[5,4],[0,5],[3,5],[5,5],[0,6],[3,6],[5,6],[1,7],[2,7],[4,7],[5,7]]},"X":{"width":6,"pixels":[[0,0],[5,0],[0,1],[5,1],[1,2],[4,2],[2,3],[3,3],[1,4],[4,4],[0,5],[5,5],[0,6],[5,6],[0,7],[5,7]]},"Y":{"width":5,"pixels":[[0,0],[4,0],[0,1],[4,1],[0,2],[4,2],[1,3],[3,3],[2,4],[2,5],[2,6],[2,7]]},"Z":{"width":6,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[4,1],[3,2],[2,3],[1,4],[0,5],[0,6],[1,7],[2,7],[3,7],[4,7],[5,7]]},".":{"width":1,"pixels":[[0,7]]},"!":{"width":1,"pixels":[[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,7]]},"?":{"width":5,"pixels":[[0,0],[1,0],[2,0],[3,0],[4,0],[0,1],[4,1],[3,2],[2,3],[2,4],[2,7]]},"_":{"width":6,"pixels":[[0,7],[1,7],[2,7],[3,7],[4,7],[5,7]]},"-":{"width":6,"pixels":[[1,4],[2,4],[3,4],[4,4]]}}}; module.exports.getChar = function(c) { if(module.exports.toUpper) c = c.toUpperCase(); var char = module.exports.chars[c]; if(!char) char = module.exports.chars['?']; return char;}