From 665ccf4ff9fdc8d19597ef5c2ccbfdd08a587eeb Mon Sep 17 00:00:00 2001
From: James Yu <yujianqiaojames@gmail.com>
Date: Tue, 12 Dec 2023 20:32:37 +0000
Subject: [PATCH] Fix #4089 Correct cmap location

---
 dev/editviewer.py | 2 ++
 viewer/viewer.mjs | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev/editviewer.py b/dev/editviewer.py
index b93e34090..65ef822b0 100644
--- a/dev/editviewer.py
+++ b/dev/editviewer.py
@@ -36,6 +36,8 @@
                     .replace('''console.log(`PDF ${pdfDocument.''', '''// console.log(`PDF ${pdfDocument.''')
                     .replace('''value: "../build/pdf.worker.mjs",''', '''value: "./build/pdf.worker.mjs",''')
                     .replace('''value: "../build/pdf.sandbox.mjs",''', '''value: "./build/pdf.sandbox.mjs",''')
+                    .replace('''value: "../web/cmaps/",''', '''value: "../cmaps/",''')
+                    .replace('''value: "../web/standard_fonts/",''', '''value: "../standard_fonts/",''')
                     .replace('''parent.document.dispatchEvent(event);''', '''parent.document.dispatchEvent(event); \n    document.dispatchEvent(event);''')
                 )
 
diff --git a/viewer/viewer.mjs b/viewer/viewer.mjs
index 038d4c53a..2a378562c 100644
--- a/viewer/viewer.mjs
+++ b/viewer/viewer.mjs
@@ -735,7 +735,7 @@ const defaultOptions = {
     kind: OptionKind.API
   },
   cMapUrl: {
-    value: "../web/cmaps/",
+    value: "../cmaps/",
     kind: OptionKind.API
   },
   disableAutoFetch: {
@@ -783,7 +783,7 @@ const defaultOptions = {
     kind: OptionKind.API
   },
   standardFontDataUrl: {
-    value: "../web/standard_fonts/",
+    value: "../standard_fonts/",
     kind: OptionKind.API
   },
   verbosity: {