mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Add support for ligatures, asterisks, etc.
This commit is contained in:
parent
f802ad05b2
commit
4cae2df1e5
4 changed files with 61 additions and 33 deletions
16
test.js
16
test.js
|
@ -93,7 +93,21 @@ function displayPage(num) {
|
|||
var fontFile = page.xref.fetchIfRef(descriptor.get("FontFile"));
|
||||
if (!fontFile)
|
||||
fontFile = page.xref.fetchIfRef(descriptor.get("FontFile2"));
|
||||
new Font(fontName, fontFile, subtype);
|
||||
|
||||
// Generate the custom cmap of the font
|
||||
var encoding = xref.fetch(res.get("Encoding"));
|
||||
var differences = encoding.get("Differences");
|
||||
var encodingMap = {};
|
||||
var index = 0;
|
||||
for (var j = 0; j < differences.length; j++) {
|
||||
var data = differences[j];
|
||||
if (IsNum(data))
|
||||
index = data;
|
||||
else
|
||||
encodingMap[index++] = data;
|
||||
}
|
||||
|
||||
new Font(fontName, fontFile, encodingMap, subtype);
|
||||
fontsReady = false;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue