From 04e467793b79f8403d499748dc33f1f9f58ee09f Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Mon, 10 Oct 2011 21:14:40 -0500 Subject: [PATCH] Fixing standard font name resolution (#649) --- fonts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fonts.js b/fonts.js index 2ab3a90b7..7aef5ec92 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 = 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);