Fix lint errors.

This commit is contained in:
Kalervo Kujala 2011-08-25 20:20:19 +03:00
parent 9343df134d
commit 092235a56f
5 changed files with 27 additions and 31 deletions

View File

@ -1309,7 +1309,7 @@ var Font = (function Font() {
return constructor;
})();
/**
/*
* Type1Parser encapsulate the needed code for parsing a Type1 font
* program. Some of its logic depends on the Type2 charstrings
* structure.
@ -1534,7 +1534,7 @@ var Type1Parser = function() {
return { charstring: charstring, width: width, lsb: lsb };
};
/**
/*
* Returns an object containing a Subrs array and a CharStrings
* array extracted from and eexec encrypted block of data
*/

View File

@ -1087,6 +1087,8 @@ var GlyphsUnicode = {
amsquare: 0x33C2,
anbopomofo: 0x3122,
angbopomofo: 0x3124,
angbracketleft: 0x3008, // This glyph is missing from Adobe's original list.
angbracketright: 0x3009, // This glyph is missing from Adobe's original list.
angkhankhuthai: 0x0E5A,
angle: 0x2220,
anglebracketleft: 0x3008,
@ -1385,6 +1387,7 @@ var GlyphsUnicode = {
cieucparenkorean: 0x3208,
cieucuparenkorean: 0x321C,
circle: 0x25CB,
circlecopyrt: 0x00A9, // This glyph is missing from Adobe's original list.
circlemultiply: 0x2297,
circleot: 0x2299,
circleplus: 0x2295,
@ -4287,8 +4290,3 @@ var GlyphsUnicode = {
zukatakana: 0x30BA
};
// Add missing glyphs from the Adobe's original list
GlyphsUnicode.angbracketleft = 0x3008;
GlyphsUnicode.angbracketright = 0x3009;
GlyphsUnicode.circlecopyrt = 0x00A9;

10
pdf.js
View File

@ -3545,7 +3545,7 @@ var Catalog = (function() {
var obj = this.catDict.get('Names');
if (obj)
nameTreeRef = xref.fetchIfRef(obj).get('Dests');
else if(this.catDict.has('Dests'))
else if (this.catDict.has('Dests'))
nameDictionaryRef = this.catDict.get('Dests');
if (nameDictionaryRef) {
@ -3923,7 +3923,7 @@ var Encodings = {
'arrowdbldown', 'lozenge', 'angleleft', 'registersans', 'copyrightsans',
'trademarksans', 'summation', 'parenlefttp', 'parenleftex',
'parenleftbt', 'bracketlefttp', 'bracketleftex', 'bracketleftbt',
'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex', ,'angleright',
'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex',, 'angleright',
'integral', 'integraltp', 'integralex', 'integralbt', 'parenrighttp',
'parenrightex', 'parenrightbt', 'bracketrighttp', 'bracketrightex',
'bracketrightbt', 'bracerighttp', 'bracerightmid', 'bracerightbt'
@ -4278,8 +4278,8 @@ var PartialEvaluator = (function() {
}
// merge in the differences
var length = baseEncoding.length > diffEncoding.length ?
baseEncoding.length : diffEncoding.length;
var length = baseEncoding.length > diffEncoding.length ?
baseEncoding.length : diffEncoding.length;
for (var i = 0, ii = length; i < ii; ++i) {
var diffGlyph = diffEncoding[i];
var baseGlyph = baseEncoding[i];
@ -4306,7 +4306,7 @@ var PartialEvaluator = (function() {
var cmap = cmapObj.getBytes(cmapObj.length);
for (var i = 0; i < cmap.length; i++) {
var byte = cmap[i];
if (byte == 0x20 || byte == 0x0A || byte == 0x3C ||
if (byte == 0x20 || byte == 0x0A || byte == 0x3C ||
byte == 0x3E) {
switch (token) {
case 'useCMap':

View File

@ -3,7 +3,7 @@
'use strict';
/**
/*
* The Type2 reader code below is only used for debugging purpose since Type2
* is only a CharString format and is never used directly as a Font file.
*
@ -12,7 +12,7 @@
* CharString or to understand the structure of the CFF format.
*/
/**
/*
* Build a charset by assigning the glyph name and the human readable form
* of the glyph data.
*/
@ -38,7 +38,7 @@ function readCharset(aStream, aCharstrings) {
return charset;
}
/**
/*
* Take a Type2 binary charstring as input and transform it to a human
* readable representation as specified by the 'The Type 2 Charstring Format',
* chapter 3.1.
@ -86,7 +86,7 @@ function readCharstringEncoding(aString) {
}
/**
/*
* Take a binary DICT Data as input and transform it into a human readable
* form as specified by 'The Compact Font Format Specification', chapter 5.
*/
@ -159,8 +159,7 @@ function readFontDictData(aString, aMap) {
return fontDictDataTokens;
}
/**
/*
* Take a stream as input and return an array of objects.
* In CFF an INDEX is a structure with the following format:
* {
@ -371,8 +370,7 @@ var Type2Parser = function(aFilePath) {
*
*/
/**
/*
* Write to a file to the disk (works only on Firefox in privilege mode)
* but this is useful for dumping a font file to the disk and check with
* fontforge or the ots program what's wrong with the file.

View File

@ -27,15 +27,15 @@ var PDFView = {
var cssUnits = 96.0 / 72.0;
for (var i = 0; i < pages.length; i++)
pages[i].update(val / 100 * cssUnits);
if(document.location.hash == '#' + this.page)
this.pages[this.page-1].draw();
if (document.location.hash == '#' + this.page)
this.pages[this.page - 1].draw();
else
// Jump the scroll position to the correct page.
document.location.hash = this.page;
var event = document.createEvent("UIEvents");
event.initUIEvent("scalechange", false, false, window, val);
var event = document.createEvent('UIEvents');
event.initUIEvent('scalechange', false, false, window, val);
window.dispatchEvent(event);
},
@ -142,7 +142,7 @@ var PDFView = {
var outlineScrollView = document.getElementById('outlineScrollView');
var thumbsSwitchButton = document.getElementById('thumbsSwitch');
var outlineSwitchButton = document.getElementById('outlineSwitch');
switch(view) {
switch (view) {
case 'thumbs':
thumbsScrollView.style.display = 'block';
outlineScrollView.style.display = 'none';
@ -436,7 +436,7 @@ window.addEventListener('transitionend', function(evt) {
}, true);
window.addEventListener("scalechange", function(evt) {
window.addEventListener('scalechange', function(evt) {
var options = document.getElementById('scaleSelect').options;
for (var i = 0; i < options.length; i++) {
var option = options[i];
@ -444,10 +444,10 @@ window.addEventListener("scalechange", function(evt) {
}
}, true);
window.addEventListener("pagechange", function(evt) {
window.addEventListener('pagechange', function(evt) {
var page = evt.detail;
document.location.hash = page;
document.getElementById("pageNumber").value = page;
document.getElementById("previous").disabled = (page == 1);
document.getElementById("next").disabled = (page == PDFView.pages.length);
document.getElementById('pageNumber').value = page;
document.getElementById('previous').disabled = (page == 1);
document.getElementById('next').disabled = (page == PDFView.pages.length);
}, true);