From 3de6b14d999e4ef74998aba7c0170e8228cea051 Mon Sep 17 00:00:00 2001 From: Johannes Thoenes Date: Wed, 21 Jan 2015 17:04:07 +0100 Subject: [PATCH] Add the type to the font name for pdfkit. This is to avoid using the same type (normal, bold, italics, bolditalics) every time a font is requested. Fixes #162. --- src/printer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/printer.js b/src/printer.js index 5d3af87f2..81bc851d3 100644 --- a/src/printer.js +++ b/src/printer.js @@ -410,7 +410,7 @@ FontProvider.prototype.provideFont = function(familyName, bold, italics) { if (cached) return cached; var fontCache = (this.cache[familyName] = this.cache[familyName] || {}); - fontCache[type] = this.pdfDoc.font(this.fonts[familyName][type], familyName)._font; + fontCache[type] = this.pdfDoc.font(this.fonts[familyName][type], familyName + ' (' + type + ')')._font; return fontCache[type]; };