Merge pull request #470 from kkujala/master

Small fixes for comments and lint
This commit is contained in:
notmasteryet 2011-09-12 16:11:25 -07:00
commit 3ea4e25fb3
15 changed files with 22 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';
@ -434,7 +434,7 @@ var Font = (function Font() {
// Use 'name' instead of 'fontName' here because the original // Use 'name' instead of 'fontName' here because the original
// name ArialBlack for example will be replaced by Helvetica. // name ArialBlack for example will be replaced by Helvetica.
this.black = (name.search(/Black/g) != -1) this.black = (name.search(/Black/g) != -1);
this.loadedName = fontName.split('-')[0]; this.loadedName = fontName.split('-')[0];
this.loading = false; this.loading = false;
@ -986,7 +986,7 @@ var Font = (function Font() {
font.pos = (font.start ? font.start : 0) + header.offset; font.pos = (font.start ? font.start : 0) + header.offset;
font.pos += header.length - 2; font.pos += header.length - 2;
var numOfMetrics = int16(font.getBytes(2)); var numOfMetrics = int16(font.getBytes(2));
var numOfSidebearings = numGlyphs - numOfMetrics; var numOfSidebearings = numGlyphs - numOfMetrics;
var numMissing = numOfSidebearings - var numMissing = numOfSidebearings -
((hmtx.length - numOfMetrics * 4) >> 1); ((hmtx.length - numOfMetrics * 4) >> 1);
@ -1807,7 +1807,8 @@ var Type1Parser = function() {
if ('undefined' == typeof(properties.differences[index])) { if ('undefined' == typeof(properties.differences[index])) {
var mapping = properties.encoding[index] || {}; var mapping = properties.encoding[index] || {};
mapping.unicode = GlyphsUnicode[glyph] || index; mapping.unicode = GlyphsUnicode[glyph] || index;
properties.glyphs[glyph] = properties.encoding[index] = mapping; properties.glyphs[glyph] = properties.encoding[index] =
mapping;
} }
getToken(); // read the in 'put' getToken(); // read the in 'put'
} }

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,3 +1,6 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
var Metrics = { var Metrics = {
'Courier': 600, 'Courier': 600,
'Courier-Bold': 600, 'Courier-Bold': 600,

4
pdf.js
View File

@ -876,8 +876,8 @@ var JpegStream = (function() {
function fixYcckImage(bytes) { function fixYcckImage(bytes) {
// Inserting 'EMBED' marker after JPEG signature // Inserting 'EMBED' marker after JPEG signature
var embedMarker = new Uint8Array([0xFF, 0xEC, 0, 8, var embedMarker = new Uint8Array([0xFF, 0xEC, 0, 8, 0x45, 0x4D, 0x42, 0x45,
0x45, 0x4D, 0x42, 0x45, 0x44, 0]); 0x44, 0]);
var newBytes = new Uint8Array(bytes.length + embedMarker.length); var newBytes = new Uint8Array(bytes.length + embedMarker.length);
newBytes.set(bytes, embedMarker.length); newBytes.set(bytes, embedMarker.length);
// copy JPEG header // copy JPEG header

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* /*

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
// Checking if the typed arrays are supported // Checking if the typed arrays are supported

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';