return constructor;
})();
-/**
+/*
* Type1Parser encapsulate the needed code for parsing a Type1 font
* program. Some of its logic depends on the Type2 charstrings
* structure.
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
*/
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,
cieucparenkorean: 0x3208,
cieucuparenkorean: 0x321C,
circle: 0x25CB,
+ circlecopyrt: 0x00A9, // This glyph is missing from Adobe's original list.
circlemultiply: 0x2297,
circleot: 0x2299,
circleplus: 0x2295,
zukatakana: 0x30BA
};
-// Add missing glyphs from the Adobe's original list
-GlyphsUnicode.angbracketleft = 0x3008;
-GlyphsUnicode.angbracketright = 0x3009;
-GlyphsUnicode.circlecopyrt = 0x00A9;
-
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) {
'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'
}
// 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];
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':
'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.
*
* 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.
*/
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.
}
-/**
+/*
* 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.
*/
return fontDictDataTokens;
}
-
-/**
+/*
* Take a stream as input and return an array of objects.
* In CFF an INDEX is a structure with the following format:
* {
*
*/
-
-/**
+/*
* 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.
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);
},
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';
}, 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];
}
}, 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);