]> git.parisson.com Git - pdf.js.git/commitdiff
Fixing standard font name resolution (#649)
authornotmasteryet <async.processingjs@yahoo.com>
Tue, 11 Oct 2011 02:14:40 +0000 (21:14 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Tue, 11 Oct 2011 02:14:40 +0000 (21:14 -0500)
fonts.js

index 2ab3a90b76eee461e938d5b55ffb41994d6fa752..7aef5ec92be47174f3b1d1e8626aca3a4d5703ea 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 = stdFontMap[name] || name.replace('_', '-');
+      var fontName = stdFontMap[name.replace('-', '_')] || name.replace('_', '-');
       this.bold = (fontName.search(/bold/gi) != -1);
       this.italic = (fontName.search(/oblique/gi) != -1) ||
                     (fontName.search(/italic/gi) != -1);