Skip to content

Commit

Permalink
Prevent setting |isStandardFont| to |undefined| for non-embedded fonts
Browse files Browse the repository at this point in the history
This is a very small follow-up to PR 5536, which sets `isStandardFont` to `false` instead of `undefined` (as currently happens for some font names).

Since the patch is so small, I hope it's OK to also fix an unrelated copy-and-paste error in a comment that was added in PR 5260.
  • Loading branch information
Snuffleupagus authored and speedplane committed Feb 24, 2015
1 parent 575ed46 commit 39586a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ var SpecialPUASymbols = {
'63731': 0x23A9, // braceleftbt (0xF8F3)
'63740': 0x23AB, // bracerighttp (0xF8FC)
'63741': 0x23AC, // bracerightmid (0xF8FD)
'63742': 0x23AD, // bracerightmid (0xF8FE)
'63742': 0x23AD, // bracerightbt (0xF8FE)
'63726': 0x23A1, // bracketlefttp (0xF8EE)
'63727': 0x23A2, // bracketleftex (0xF8EF)
'63728': 0x23A3, // bracketleftbt (0xF8F0)
Expand Down Expand Up @@ -2463,7 +2463,7 @@ var Font = (function FontClosure() {
// to be used with the canvas.font.
var fontName = name.replace(/[,_]/g, '-');
var isStandardFont = !!stdFontMap[fontName] ||
(nonStdFontMap[fontName] && !!stdFontMap[nonStdFontMap[fontName]]);
!!(nonStdFontMap[fontName] && stdFontMap[nonStdFontMap[fontName]]);
fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName;

this.bold = (fontName.search(/bold/gi) !== -1);
Expand Down

0 comments on commit 39586a8

Please sign in to comment.