1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00
This commit is contained in:
Adil Allawi 2011-10-05 08:42:54 +01:00
commit 3b3f134e35
10 changed files with 347 additions and 127 deletions

View file

@ -415,6 +415,8 @@ var Font = (function Font() {
var constructor = function font_constructor(name, file, properties) {
this.name = name;
this.encoding = properties.encoding;
this.coded = properties.coded;
this.resources = properties.resources;
this.sizes = [];
var names = name.split('+');
@ -429,6 +431,9 @@ var Font = (function Font() {
this.loading = false;
return;
}
this.fontMatrix = properties.fontMatrix;
if (properties.type == 'Type3')
return;
// Trying to fix encoding using glyph widths and CIDSystemInfo.
this.fixWidths(properties);
@ -483,7 +488,7 @@ var Font = (function Font() {
this.data = data;
this.type = type;
this.textMatrix = properties.textMatrix;
this.fontMatrix = properties.fontMatrix;
this.defaultWidth = properties.defaultWidth;
this.loadedName = getUniqueName();
this.composite = properties.composite;
@ -2009,7 +2014,7 @@ var Type1Parser = function type1Parser() {
// Make the angle into the right direction
matrix[2] *= -1;
properties.textMatrix = matrix;
properties.fontMatrix = matrix;
break;
case '/Encoding':
var size = parseInt(getToken(), 10);