From f31e3260ee4c90ff8a472ac6a7c9071c4b36fabc Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 13 Oct 2016 11:27:08 +0100 Subject: [PATCH] remove pdfjs special case disableFontFace for MSIE --- .../coffee/ide/pdfng/directives/pdfRenderer.coffee | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee b/services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee index ddae8caf02..1f91b1e8f9 100644 --- a/services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee +++ b/services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee @@ -12,11 +12,12 @@ define [ INDICATOR_DELAY2: 250 # time until the indicator starts animating constructor: (@url, @options) -> - if navigator.userAgent?.indexOf("Edge/") >= 0 or navigator.userAgent?.indexOf("rv:11.0") >= 0 # IE 11 - # Microsoft Edge does not work well with font-face (Sept 2016) - PDFJS.disableFontFace = true + if window.location?.search?.indexOf("disable-font-face=true") >= 0 + window.PDFJS.disableFontFace = true + else + window.PDFJS.disableFontFace = false if @options.disableAutoFetch - PDFJS.disableAutoFetch = true # prevent loading whole file + window.PDFJS.disableAutoFetch = true # prevent loading whole file # PDFJS.disableStream # PDFJS.disableRange @scale = @options.scale || 1