diff --git a/fonts.js b/fonts.js index bcec5d2ac..2ba6e2f7a 100644 --- a/fonts.js +++ b/fonts.js @@ -1329,7 +1329,7 @@ var Font = (function Font() { // Character to glyphs mapping 'cmap': createCMapTable(charstrings.slice(), - ('glyphIds' in font) ? font.glyphIds: null), + ('glyphIds' in font) ? font.glyphIds : null), // Font header 'head': (function fontFieldsHead() { @@ -2613,14 +2613,13 @@ var Type2CFF = (function type2CFF() { var glyph = charsets[i]; var code = glyphMap[glyph] || 0; - var mapping = glyphs[code] || glyphs[glyph] || {}; + var mapping = glyphs[code] || glyphs[glyph] || { width: defaultWidth }; var unicode = mapping.unicode; if (unicode <= 0x1f || (unicode >= 127 && unicode <= 255)) unicode += kCmapGlyphOffset; - var width = ('width' in mapping) && isNum(mapping.width) ? mapping.width - : defaultWidth; + var width = isNum(mapping.width) ? mapping.width : defaultWidth; properties.encoding[code] = { unicode: unicode, width: width diff --git a/web/viewer.css b/web/viewer.css index 6c7b551e8..040b87bdf 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -8,6 +8,10 @@ body { padding: 0px; } +[hidden] { + display: none; +} + /* === Toolbar === */ #controls { background-color: #eee; diff --git a/web/viewer.html b/web/viewer.html index f761c94fe..4175d29fc 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -82,7 +82,7 @@
-