Small cleanup

This commit is contained in:
Vivien Nicolas 2011-06-28 17:35:15 +02:00
parent e3dbb685f3
commit 63e1601464

View File

@ -832,7 +832,7 @@ var Font = (function () {
*/ */
var FontsUtils = { var FontsUtils = {
_bytesArray: new Uint8Array(4), _bytesArray: new Uint8Array(4),
integerToBytes: function fu_integerToBytes(value, bytesCount, signed) { integerToBytes: function fu_integerToBytes(value, bytesCount) {
var bytes = this._bytesArray; var bytes = this._bytesArray;
if (bytesCount == 1) { if (bytesCount == 1) {
@ -1003,7 +1003,7 @@ var Type1Parser = function() {
var kEscapeCommand = 12; var kEscapeCommand = 12;
function decodeCharString(array, glyph) { function decodeCharString(array) {
var charstring = []; var charstring = [];
var lsb = 0; var lsb = 0;
var width = 0; var width = 0;
@ -1121,7 +1121,7 @@ var Type1Parser = function() {
length = parseInt(length); length = parseInt(length);
var data = eexecString.slice(i + 3, i + 3 + length); var data = eexecString.slice(i + 3, i + 3 + length);
var encodedCharstring = decrypt(data, kCharStringsEncryptionKey, 4); var encodedCharstring = decrypt(data, kCharStringsEncryptionKey, 4);
var str = decodeCharString(encodedCharstring, glyph); var str = decodeCharString(encodedCharstring);
glyphs.push({ glyphs.push({
glyph: glyph, glyph: glyph,
@ -1289,8 +1289,8 @@ CFF.prototype = {
var charstrings = []; var charstrings = [];
for (var i = 0; i < glyphs.length; i++) { for (var i = 0; i < glyphs.length; i++) {
var glyph = glyphs[i].glyph; var glyph = glyphs[i];
var unicode = GlyphsUnicode[glyph]; var unicode = GlyphsUnicode[glyph.glyph];
if (!unicode) { if (!unicode) {
if (glyph != ".notdef") if (glyph != ".notdef")
warn(glyph + " does not have an entry in the glyphs unicode dictionary"); warn(glyph + " does not have an entry in the glyphs unicode dictionary");
@ -1298,9 +1298,9 @@ CFF.prototype = {
charstrings.push({ charstrings.push({
glyph: glyph, glyph: glyph,
unicode: unicode, unicode: unicode,
charstring: glyphs[i].data, charstring: glyph.data,
width: glyphs[i].width, width: glyph.width,
lsb: glyphs[i].lsb lsb: glyph.lsb
}); });
} }
}; };