Fix errors reported by the no-extra-boolean-cast
ESLint rule
http://eslint.org/docs/rules/no-extra-boolean-cast
This commit is contained in:
parent
fb5e756683
commit
25bf5db47e
@ -2943,6 +2943,7 @@ var ErrorFont = (function ErrorFontClosure() {
|
|||||||
function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
|
function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
|
||||||
var charCodeToGlyphId = Object.create(null);
|
var charCodeToGlyphId = Object.create(null);
|
||||||
var glyphId, charCode, baseEncoding;
|
var glyphId, charCode, baseEncoding;
|
||||||
|
var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
|
||||||
|
|
||||||
if (properties.baseEncodingName) {
|
if (properties.baseEncodingName) {
|
||||||
// If a valid base encoding name was used, the mapping is initialized with
|
// If a valid base encoding name was used, the mapping is initialized with
|
||||||
@ -2956,9 +2957,8 @@ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
|
|||||||
charCodeToGlyphId[charCode] = 0; // notdef
|
charCodeToGlyphId[charCode] = 0; // notdef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!!(properties.flags & FontFlags.Symbolic)) {
|
} else if (isSymbolicFont) {
|
||||||
// For a symbolic font the encoding should be the fonts built-in
|
// For a symbolic font the encoding should be the fonts built-in encoding.
|
||||||
// encoding.
|
|
||||||
for (charCode in builtInEncoding) {
|
for (charCode in builtInEncoding) {
|
||||||
charCodeToGlyphId[charCode] = builtInEncoding[charCode];
|
charCodeToGlyphId[charCode] = builtInEncoding[charCode];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user