From e347ad03d97599588aa9be0f134f665f4b7b46de Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 18 Oct 2011 01:34:44 +0200 Subject: [PATCH 1/4] Fix a small broking mistake in fonts.js --- fonts.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fonts.js b/fonts.js index bcec5d2ac..2bcfa5e6e 100644 --- a/fonts.js +++ b/fonts.js @@ -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 From b8a5b76db5cd20dfba5891e9f70de27fe46aa46f Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 18 Oct 2011 03:45:07 +0200 Subject: [PATCH 2/4] Fix a spacing issue --- fonts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fonts.js b/fonts.js index 2bcfa5e6e..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() { From 20efacb3a1e2c137e7f7ef934bd8590331b21ece Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 18 Oct 2011 21:40:59 +0200 Subject: [PATCH 3/4] Use 'hidden' instead of display: none --- web/viewer.css | 4 ++++ web/viewer.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 @@
-