mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #582 from sharelatex/as-pdfjs-cmaps-fix
Fix Cmaps path for future versions of PDF.js
This commit is contained in:
commit
184c8adb84
2 changed files with 3 additions and 1 deletions
|
@ -102,6 +102,7 @@ block requirejs
|
|||
//- don't use cdn for workers
|
||||
- var aceWorkerPath = buildJsPath(lib('ace'), {cdn:false,fingerprint:false})
|
||||
- var pdfWorkerPath = buildJsPath('/libs/' + lib('pdfjs') + '/pdf.worker', {cdn:false,fingerprint:false})
|
||||
- var pdfCMapsPath = buildJsPath('/libs/' + lib('pdfjs') + '/bcmaps/', {cdn:false,fingerprint:false})
|
||||
|
||||
//- We need to do .replace(/\//g, '\\/') do that '</script>' -> '<\/script>'
|
||||
//- and doesn't prematurely end the script tag.
|
||||
|
@ -154,6 +155,7 @@ block requirejs
|
|||
};
|
||||
window.aceFingerprint = "#{fingerprint(jsPath + lib('ace') + '/ace.js')}"
|
||||
window.aceWorkerPath = "#{aceWorkerPath}";
|
||||
window.pdfCMapsPath = "#{pdfCMapsPath}"
|
||||
|
||||
script(
|
||||
data-main=buildJsPath("ide.js", {fingerprint:false}),
|
||||
|
|
|
@ -15,7 +15,7 @@ define [
|
|||
|
||||
constructor: (@url, @options) ->
|
||||
# set up external character mappings - needed for Japanese etc
|
||||
window.PDFJS.cMapUrl = './bcmaps/'
|
||||
window.PDFJS.cMapUrl = window.pdfCMapsPath # injected in editor.pug
|
||||
window.PDFJS.cMapPacked = true
|
||||
|
||||
if window.location?.search?.indexOf("disable-font-face=true") >= 0
|
||||
|
|
Loading…
Reference in a new issue