mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-07 08:31:01 +01:00
feat: PDF text editor internationalization
This commit is contained in:
+17
-2
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user