Add mem free printing (I need it to verify a suspicion relating to a bug)

This commit is contained in:
2024-04-22 13:28:24 -05:00
parent 20cd951cde
commit c60251359c
120 changed files with 31903 additions and 2 deletions

51
node_modules/lv_font_conv/lib/ranger.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
// Merge ranges into single object
'use strict';
class Ranger {
constructor() {
this.data = {};
}
// input:
// -r 0x1F450 - single value, dec or hex format
// -r 0x1F450-0x1F470 - range
// -r 0x1F450=>0xF005 - single glyph with mapping
// -r 0x1F450-0x1F470=>0xF005 - range with mapping
add_range(font, start, end, mapped_start) {
let offset = mapped_start - start;
let output = [];
for (let i = start; i <= end; i++) {
this._set_char(font, i, i + offset);
output.push(i);
}
return output;
}
// input: characters to copy, e.g. '1234567890abcdef'
add_symbols(font, str) {
let output = [];
for (let chr of str) {
let code = chr.codePointAt(0);
this._set_char(font, code, code);
output.push(code);
}
return output;
}
_set_char(font, code, mapped_to) {
this.data[mapped_to] = { font, code };
}
get() {
return this.data;
}
}
module.exports = Ranger;