Like pasting in the Python editor. Now I just need to tie this into
the UI in a way that's not horrible.
}
});
}
+ function from_c(c) {
+ re = /[0-7]+/g;
+ for (row of document.querySelector('#pixels').rows) {
+ match = re.exec(c);
+ if (match == null) {
+ break;
+ }
+ rowbits = Number.parseInt(match[0], 8);
+ for (var pixel
+ of Array.from(row.querySelectorAll('input')).reverse()) {
+ pixel.checked = (rowbits & 1 != 0);
+ rowbits >>= 1;
+ }
+ }
+ update_glyph();
+ }
function init() {
for (var e of document.querySelectorAll('#pixels input')) {
e.onchange = update_glyph;