diff --git a/public/new_font_h.bin b/public/new_font_h.bin new file mode 100644 index 0000000..c205dcf Binary files /dev/null and b/public/new_font_h.bin differ diff --git a/public/new_font_k.bin b/public/new_font_k.bin new file mode 100644 index 0000000..bdd2ee5 Binary files /dev/null and b/public/new_font_k.bin differ diff --git a/src/views/list/chi/index.vue b/src/views/list/chi/index.vue index 1844c03..240fef3 100644 --- a/src/views/list/chi/index.vue +++ b/src/views/list/chi/index.vue @@ -66,22 +66,50 @@ const restore = async(type: any = 1) => { switch(type){ case 1: fontPacket = await fetch('/old_font.bin') + const reader = fontPacket.body.getReader(); + const chunks = []; + while(true) { + const {done, value} = await reader.read(); + if (done) { + break; + } + chunks.push(...value) + } + const binary = new Uint8Array(chunks) + await restoreRange(0x02000, binary) + break + case 2: + fontPacket = await fetch('/new_font_k.bin') + const reader = fontPacket.body.getReader(); + const chunks = []; + while(true) { + const {done, value} = await reader.read(); + if (done) { + break; + } + chunks.push(...value) + } + const binary = new Uint8Array(chunks) + await restoreRange(0x02480, binary) + break + case 3: + fontPacket = await fetch('/new_font_h.bin') + const reader = fontPacket.body.getReader(); + const chunks = []; + while(true) { + const {done, value} = await reader.read(); + if (done) { + break; + } + chunks.push(...value) + } + const binary = new Uint8Array(chunks) + await restoreRange(0x02480, binary) break default: alert('TODO') return } - const reader = fontPacket.body.getReader(); - const chunks = []; - while(true) { - const {done, value} = await reader.read(); - if (done) { - break; - } - chunks.push(...value) - } - const binary = new Uint8Array(chunks) - await restoreRange(0x02000, binary) } </script>