diff --git a/apps/readest-app/src/app/reader/components/settings/CustomFonts.tsx b/apps/readest-app/src/app/reader/components/settings/CustomFonts.tsx index cad669f9..7a1e30cf 100644 --- a/apps/readest-app/src/app/reader/components/settings/CustomFonts.tsx +++ b/apps/readest-app/src/app/reader/components/settings/CustomFonts.tsx @@ -56,7 +56,8 @@ const CustomFonts: React.FC = ({ bookKey, onBack }) => { let fontFile: File; if (selectedFile.path) { const filePath = selectedFile.path; - fontPath = getFilename(filePath); + const fileobj = await appService!.fs.openFile(filePath, 'None'); + fontPath = fileobj.name || getFilename(filePath); await appService!.fs.copyFile(filePath, fontPath, 'Fonts'); fontFile = await appService!.fs.openFile(fontPath, 'Fonts'); } else if (selectedFile.file) {