1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

#502 Adding basic Type3 font support.

This commit is contained in:
= 2011-10-03 16:36:01 -07:00
parent 65cad1caf8
commit 5f81017726
4 changed files with 269 additions and 58 deletions

View file

@ -414,6 +414,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('+');
@ -428,6 +430,9 @@ var Font = (function Font() {
this.loading = false;
return;
}
this.fontMatrix = properties.fontMatrix;
if (properties.type == 'Type3')
return;
if (!file) {
// The file data is not specified. Trying to fix the font name
@ -478,7 +483,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;
@ -1929,7 +1934,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);