From 53cfe2792b1047019cdf4618d26daa44c2b9526e Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Wed, 12 Oct 2011 17:52:11 -0500 Subject: [PATCH] Fixing #650 regression --- fonts.js | 2 +- pdf.js | 2 +- test/test_manifest.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fonts.js b/fonts.js index efc9afe47..b05ad07c2 100644 --- 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 9b78a8b2a..b8bc2b545 100644 --- 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 = { diff --git a/test/test_manifest.json b/test/test_manifest.json index 3ede43ceb..9149a61a1 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -148,7 +148,7 @@ "file": "pdfs/fips197.pdf", "link": true, "rounds": 1, - "type": "load" + "type": "eq" }, { "id": "txt2pdf", "file": "pdfs/txt2pdf.pdf",