feat: PDF text editor internationalization

This commit is contained in:
alam00000
2026-08-22 14:00:07 +05:30
parent 0f65fdb2f4
commit 7f6bebf21f
27 changed files with 2936 additions and 127 deletions
+17 -2
View File
@@ -9092,7 +9092,15 @@ async function saveFile() {
a.click();
URL.revokeObjectURL(a.href);
state.dirty = false;
toast('Saved ' + ((bytes.length / 1024) | 0) + ' KB');
const savedKb = (bytes.length / 1024) | 0;
if (onSaved) onSaved(savedKb, state.fileName);
else toast('Saved ' + savedKb + ' KB');
}
let onSaved = null;
function setOnSaved(fn) {
onSaved = typeof fn === 'function' ? fn : null;
}
function wireUI() {
@@ -9975,4 +9983,11 @@ async function addImageFromFile(file) {
} else if (state.undo.length) state.undo.pop();
}
export { openFile, engineReady, setZoom, getZoom, getDocDescription };
export {
openFile,
engineReady,
setZoom,
getZoom,
getDocDescription,
setOnSaved,
};
+7
View File
@@ -299,6 +299,13 @@ export function scriptFallbackFamilies(cps) {
],
[[[0x10a0, 0x10ff]], ['Noto Sans Georgian', 'Sylfaen', 'Arial Unicode MS']],
[[[0x1200, 0x137f]], ['Kefa', 'Nyala', 'Noto Sans Ethiopic']],
[
[[0x0f00, 0x0fff]],
['Kailasa', 'Microsoft Himalaya', 'Noto Sans Tibetan'],
],
[[[0x13a0, 0x13ff]], ['Plantagenet Cherokee', 'Noto Sans Cherokee']],
[[[0x0700, 0x074f]], ['Noto Sans Syriac', 'Estrangelo Edessa']],
[[[0x0780, 0x07bf]], ['Noto Sans Thaana', 'MV Boli']],
];
const out = [];
for (const cp of cps) {