commit
561932c664
4
fonts.js
4
fonts.js
@ -1309,7 +1309,7 @@ var Font = (function Font() {
|
|||||||
return constructor;
|
return constructor;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Type1Parser encapsulate the needed code for parsing a Type1 font
|
* Type1Parser encapsulate the needed code for parsing a Type1 font
|
||||||
* program. Some of its logic depends on the Type2 charstrings
|
* program. Some of its logic depends on the Type2 charstrings
|
||||||
* structure.
|
* structure.
|
||||||
@ -1534,7 +1534,7 @@ var Type1Parser = function() {
|
|||||||
return { charstring: charstring, width: width, lsb: lsb };
|
return { charstring: charstring, width: width, lsb: lsb };
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Returns an object containing a Subrs array and a CharStrings
|
* Returns an object containing a Subrs array and a CharStrings
|
||||||
* array extracted from and eexec encrypted block of data
|
* array extracted from and eexec encrypted block of data
|
||||||
*/
|
*/
|
||||||
|
@ -1087,6 +1087,8 @@ var GlyphsUnicode = {
|
|||||||
amsquare: 0x33C2,
|
amsquare: 0x33C2,
|
||||||
anbopomofo: 0x3122,
|
anbopomofo: 0x3122,
|
||||||
angbopomofo: 0x3124,
|
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,
|
angkhankhuthai: 0x0E5A,
|
||||||
angle: 0x2220,
|
angle: 0x2220,
|
||||||
anglebracketleft: 0x3008,
|
anglebracketleft: 0x3008,
|
||||||
@ -1385,6 +1387,7 @@ var GlyphsUnicode = {
|
|||||||
cieucparenkorean: 0x3208,
|
cieucparenkorean: 0x3208,
|
||||||
cieucuparenkorean: 0x321C,
|
cieucuparenkorean: 0x321C,
|
||||||
circle: 0x25CB,
|
circle: 0x25CB,
|
||||||
|
circlecopyrt: 0x00A9, // This glyph is missing from Adobe's original list.
|
||||||
circlemultiply: 0x2297,
|
circlemultiply: 0x2297,
|
||||||
circleot: 0x2299,
|
circleot: 0x2299,
|
||||||
circleplus: 0x2295,
|
circleplus: 0x2295,
|
||||||
@ -4287,8 +4290,3 @@ var GlyphsUnicode = {
|
|||||||
zukatakana: 0x30BA
|
zukatakana: 0x30BA
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add missing glyphs from the Adobe's original list
|
|
||||||
GlyphsUnicode.angbracketleft = 0x3008;
|
|
||||||
GlyphsUnicode.angbracketright = 0x3009;
|
|
||||||
GlyphsUnicode.circlecopyrt = 0x00A9;
|
|
||||||
|
|
||||||
|
10
pdf.js
10
pdf.js
@ -3545,7 +3545,7 @@ var Catalog = (function() {
|
|||||||
var obj = this.catDict.get('Names');
|
var obj = this.catDict.get('Names');
|
||||||
if (obj)
|
if (obj)
|
||||||
nameTreeRef = xref.fetchIfRef(obj).get('Dests');
|
nameTreeRef = xref.fetchIfRef(obj).get('Dests');
|
||||||
else if(this.catDict.has('Dests'))
|
else if (this.catDict.has('Dests'))
|
||||||
nameDictionaryRef = this.catDict.get('Dests');
|
nameDictionaryRef = this.catDict.get('Dests');
|
||||||
|
|
||||||
if (nameDictionaryRef) {
|
if (nameDictionaryRef) {
|
||||||
@ -3923,7 +3923,7 @@ var Encodings = {
|
|||||||
'arrowdbldown', 'lozenge', 'angleleft', 'registersans', 'copyrightsans',
|
'arrowdbldown', 'lozenge', 'angleleft', 'registersans', 'copyrightsans',
|
||||||
'trademarksans', 'summation', 'parenlefttp', 'parenleftex',
|
'trademarksans', 'summation', 'parenlefttp', 'parenleftex',
|
||||||
'parenleftbt', 'bracketlefttp', 'bracketleftex', 'bracketleftbt',
|
'parenleftbt', 'bracketlefttp', 'bracketleftex', 'bracketleftbt',
|
||||||
'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex', ,'angleright',
|
'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex',, 'angleright',
|
||||||
'integral', 'integraltp', 'integralex', 'integralbt', 'parenrighttp',
|
'integral', 'integraltp', 'integralex', 'integralbt', 'parenrighttp',
|
||||||
'parenrightex', 'parenrightbt', 'bracketrighttp', 'bracketrightex',
|
'parenrightex', 'parenrightbt', 'bracketrighttp', 'bracketrightex',
|
||||||
'bracketrightbt', 'bracerighttp', 'bracerightmid', 'bracerightbt'
|
'bracketrightbt', 'bracerighttp', 'bracerightmid', 'bracerightbt'
|
||||||
@ -4278,8 +4278,8 @@ var PartialEvaluator = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// merge in the differences
|
// merge in the differences
|
||||||
var length = baseEncoding.length > diffEncoding.length ?
|
var length = baseEncoding.length > diffEncoding.length ?
|
||||||
baseEncoding.length : diffEncoding.length;
|
baseEncoding.length : diffEncoding.length;
|
||||||
for (var i = 0, ii = length; i < ii; ++i) {
|
for (var i = 0, ii = length; i < ii; ++i) {
|
||||||
var diffGlyph = diffEncoding[i];
|
var diffGlyph = diffEncoding[i];
|
||||||
var baseGlyph = baseEncoding[i];
|
var baseGlyph = baseEncoding[i];
|
||||||
@ -4306,7 +4306,7 @@ var PartialEvaluator = (function() {
|
|||||||
var cmap = cmapObj.getBytes(cmapObj.length);
|
var cmap = cmapObj.getBytes(cmapObj.length);
|
||||||
for (var i = 0; i < cmap.length; i++) {
|
for (var i = 0; i < cmap.length; i++) {
|
||||||
var byte = cmap[i];
|
var byte = cmap[i];
|
||||||
if (byte == 0x20 || byte == 0x0A || byte == 0x3C ||
|
if (byte == 0x20 || byte == 0x0A || byte == 0x3C ||
|
||||||
byte == 0x3E) {
|
byte == 0x3E) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case 'useCMap':
|
case 'useCMap':
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* The Type2 reader code below is only used for debugging purpose since Type2
|
* 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.
|
* 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.
|
* CharString or to understand the structure of the CFF format.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Build a charset by assigning the glyph name and the human readable form
|
* Build a charset by assigning the glyph name and the human readable form
|
||||||
* of the glyph data.
|
* of the glyph data.
|
||||||
*/
|
*/
|
||||||
@ -38,7 +38,7 @@ function readCharset(aStream, aCharstrings) {
|
|||||||
return charset;
|
return charset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Take a Type2 binary charstring as input and transform it to a human
|
* Take a Type2 binary charstring as input and transform it to a human
|
||||||
* readable representation as specified by the 'The Type 2 Charstring Format',
|
* readable representation as specified by the 'The Type 2 Charstring Format',
|
||||||
* chapter 3.1.
|
* chapter 3.1.
|
||||||
@ -86,7 +86,7 @@ function readCharstringEncoding(aString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Take a binary DICT Data as input and transform it into a human readable
|
* 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.
|
* form as specified by 'The Compact Font Format Specification', chapter 5.
|
||||||
*/
|
*/
|
||||||
@ -159,8 +159,7 @@ function readFontDictData(aString, aMap) {
|
|||||||
return fontDictDataTokens;
|
return fontDictDataTokens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
/**
|
|
||||||
* Take a stream as input and return an array of objects.
|
* Take a stream as input and return an array of objects.
|
||||||
* In CFF an INDEX is a structure with the following format:
|
* 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)
|
* 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
|
* 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.
|
* fontforge or the ots program what's wrong with the file.
|
||||||
|
@ -27,15 +27,15 @@ var PDFView = {
|
|||||||
var cssUnits = 96.0 / 72.0;
|
var cssUnits = 96.0 / 72.0;
|
||||||
for (var i = 0; i < pages.length; i++)
|
for (var i = 0; i < pages.length; i++)
|
||||||
pages[i].update(val / 100 * cssUnits);
|
pages[i].update(val / 100 * cssUnits);
|
||||||
|
|
||||||
if(document.location.hash == '#' + this.page)
|
if (document.location.hash == '#' + this.page)
|
||||||
this.pages[this.page-1].draw();
|
this.pages[this.page - 1].draw();
|
||||||
else
|
else
|
||||||
// Jump the scroll position to the correct page.
|
// Jump the scroll position to the correct page.
|
||||||
document.location.hash = this.page;
|
document.location.hash = this.page;
|
||||||
|
|
||||||
var event = document.createEvent("UIEvents");
|
var event = document.createEvent('UIEvents');
|
||||||
event.initUIEvent("scalechange", false, false, window, val);
|
event.initUIEvent('scalechange', false, false, window, val);
|
||||||
window.dispatchEvent(event);
|
window.dispatchEvent(event);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ var PDFView = {
|
|||||||
var outlineScrollView = document.getElementById('outlineScrollView');
|
var outlineScrollView = document.getElementById('outlineScrollView');
|
||||||
var thumbsSwitchButton = document.getElementById('thumbsSwitch');
|
var thumbsSwitchButton = document.getElementById('thumbsSwitch');
|
||||||
var outlineSwitchButton = document.getElementById('outlineSwitch');
|
var outlineSwitchButton = document.getElementById('outlineSwitch');
|
||||||
switch(view) {
|
switch (view) {
|
||||||
case 'thumbs':
|
case 'thumbs':
|
||||||
thumbsScrollView.style.display = 'block';
|
thumbsScrollView.style.display = 'block';
|
||||||
outlineScrollView.style.display = 'none';
|
outlineScrollView.style.display = 'none';
|
||||||
@ -436,7 +436,7 @@ window.addEventListener('transitionend', function(evt) {
|
|||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
|
||||||
window.addEventListener("scalechange", function(evt) {
|
window.addEventListener('scalechange', function(evt) {
|
||||||
var options = document.getElementById('scaleSelect').options;
|
var options = document.getElementById('scaleSelect').options;
|
||||||
for (var i = 0; i < options.length; i++) {
|
for (var i = 0; i < options.length; i++) {
|
||||||
var option = options[i];
|
var option = options[i];
|
||||||
@ -444,10 +444,10 @@ window.addEventListener("scalechange", function(evt) {
|
|||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
window.addEventListener("pagechange", function(evt) {
|
window.addEventListener('pagechange', function(evt) {
|
||||||
var page = evt.detail;
|
var page = evt.detail;
|
||||||
document.location.hash = page;
|
document.location.hash = page;
|
||||||
document.getElementById("pageNumber").value = page;
|
document.getElementById('pageNumber').value = page;
|
||||||
document.getElementById("previous").disabled = (page == 1);
|
document.getElementById('previous').disabled = (page == 1);
|
||||||
document.getElementById("next").disabled = (page == PDFView.pages.length);
|
document.getElementById('next').disabled = (page == PDFView.pages.length);
|
||||||
}, true);
|
}, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user