]> git.parisson.com Git - pdf.js.git/commitdiff
Fixing #650 regression
authornotmasteryet <async.processingjs@yahoo.com>
Wed, 12 Oct 2011 22:52:11 +0000 (17:52 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Wed, 12 Oct 2011 22:52:11 +0000 (17:52 -0500)
fonts.js
pdf.js
test/test_manifest.json

index efc9afe47d8489f87c4ae7544bb285fc27cdc241..b05ad07c2311fa506f59bf435f1b1c6ebca05199 100644 (file)
--- a/fonts.js
+++ b/fonts.js
@@ -441,7 +441,7 @@ var Font = (function Font() {
     if (!file) {
       // The file data is not specified. Trying to fix the font name
       // to be used with the canvas.font.
-      var fontName = name.replace(/,_/g, '-');
+      var fontName = name.replace(/[,_]/g, '-');
       fontName = stdFontMap[fontName] || fontName;
 
       this.bold = (fontName.search(/bold/gi) != -1);
diff --git a/pdf.js b/pdf.js
index 9b78a8b2a5672c707240316f79a0d2d4a17cb1ec..b8bc2b545f7c47be2ae229b504c94ba04be212f6 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4783,7 +4783,7 @@ var PartialEvaluator = (function partialEvaluator() {
             return null;
 
           // Using base font name as a font name.
-          baseFontName = baseFontName.name.replace(/,_/g, '-');
+          baseFontName = baseFontName.name.replace(/[,_]/g, '-');
           var metricsAndMap = this.getBaseFontMetricsAndMap(baseFontName);
 
           var properties = {
index 3ede43cebd925f2c31ebb9e334abe0a71bf4052a..9149a61a1e5d6a20e2d52a311c0555d89c085a14 100644 (file)
        "file": "pdfs/fips197.pdf",
        "link": true,
        "rounds": 1,
-       "type": "load"
+       "type": "eq"
     },
     {  "id": "txt2pdf",
        "file": "pdfs/txt2pdf.pdf",