From a36436ac7860cb81f22a19583d8e779a1b6bb4e5 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Mon, 5 Sep 2011 17:34:52 +0200 Subject: [PATCH] Remove the isDisplayable function and use inline code instead --- pdf.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pdf.js b/pdf.js index 82cfb4c81..51d297257 100644 --- a/pdf.js +++ b/pdf.js @@ -4297,10 +4297,6 @@ var PartialEvaluator = (function() { lastChar = diffEncoding.length || baseEncoding.length; // merge in the differences - function isDisplayable(code) { - return code > 0x1f && (code < 128 || code > 255); - } - var glyphsMap = {}; for (var i = firstChar; i <= lastChar; i++) { var glyph = diffEncoding[i] || baseEncoding[i]; @@ -4308,7 +4304,7 @@ var PartialEvaluator = (function() { var index = GlyphsUnicode[glyph] || i; glyphsMap[glyph] = encodingMap[i] = index; - if (!isDisplayable(index)) + if (index <= 0x1f || (index >= 128 && code <= 255)) glyphsMap[glyph] = encodingMap[i] += kCmapGlyphOffset; } }