This commit is contained in:
Silent YANG 2024-06-10 11:07:54 +08:00
parent 300d51f79b
commit 92fcd4f7b3
2 changed files with 26 additions and 1 deletions

BIN
public/new_font_k_f.bin Normal file

Binary file not shown.

View file

@ -10,10 +10,16 @@
<a-space>
<t-card bordered>
<template #header>
{{ $t('tool.fontwrite') }}
{{ $t('tool.fontwrite') }}
</template>
<a-button @click="restore(1)">{{ $t('tool.writefontwrite') }}</a-button>
</t-card>
<t-card bordered v-show="state.showHide >= 5">
<template #header>
{{ $t('tool.fontwrite') }}繁體
</template>
<a-button @click="restore(6)">{{ $t('tool.writefontwrite') }}</a-button>
</t-card>
<t-card bordered>
<template #header>
{{ $t('tool.pinyinwrite') }}
@ -145,6 +151,25 @@ const restore = async(type: any = 1) => {
return;
}
}
if(type == 6){
if(appStore.configuration?.charset == "gb2312"){
fontPacket = await fetch('/new_font_k_f.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)
return;
}else{
alert('不支持的版本')
}
}
}
</script>