1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 17:18:07 +02:00

Add support for ligatures, asterisks, etc.

This commit is contained in:
Vivien Nicolas 2011-06-14 11:08:08 +02:00
parent 2692222152
commit 0ebd3cdf93
4 changed files with 61 additions and 33 deletions

8
pdf.js
View file

@ -798,6 +798,8 @@ var Lexer = (function() {
x = (x << 3) + (ch - '0');
}
}
x = Fonts.getUnicodeFor(x);
str += String.fromCharCode(x);
break;
case '\r':
@ -1849,15 +1851,11 @@ var CanvasGraphics = (function() {
return;
var fontName = "";
var subtype = font.get("Subtype").name;
var fontDescriptor = font.get("FontDescriptor");
if (fontDescriptor.num) {
var fontDescriptor = this.xref.fetchIfRef(fontDescriptor);
var fontFile = this.xref.fetchIfRef(fontDescriptor.get("FontFile"));
if (!fontFile)
fontFile = this.xref.fetchIfRef(fontDescriptor.get("FontFile2"));
fontName = fontDescriptor.get("FontName").name.replace("+", "_");
new Font(fontName, fontFile, subtype);
Fonts.active = fontName;
}
this.current.fontSize = size;