mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 17:18:07 +02:00
Start of a TTF Format6 to Format4 converter (sigh)
This commit is contained in:
parent
fdfd03b671
commit
00df9b82ee
2 changed files with 25 additions and 12 deletions
7
pdf.js
7
pdf.js
|
@ -2143,7 +2143,7 @@ var CanvasGraphics = (function() {
|
|||
// Fonts with an embedded cmap but without any assignment in
|
||||
// it are not yet supported, so ask the fonts loader to ignore
|
||||
// them to not pay a stupid one sec latence.
|
||||
var ignoreFont = true;
|
||||
var ignoreFont = false;
|
||||
|
||||
var encodingMap = {};
|
||||
var charset = [];
|
||||
|
@ -2187,6 +2187,7 @@ var CanvasGraphics = (function() {
|
|||
}
|
||||
}
|
||||
} else if (fontDict.has("ToUnicode")) {
|
||||
encodingMap = {empty: true};
|
||||
var cmapObj = xref.fetchIfRef(fontDict.get("ToUnicode"));
|
||||
if (IsName(cmapObj)) {
|
||||
error("ToUnicode file cmap translation not implemented");
|
||||
|
@ -2230,7 +2231,9 @@ var CanvasGraphics = (function() {
|
|||
var code = parseInt("0x" + tokens[j+2]);
|
||||
|
||||
for (var k = startRange; k <= endRange; k++) {
|
||||
encodingMap[k] = GlyphsUnicode[encoding[code]];
|
||||
// The encoding mapping table will be filled
|
||||
// later during the building phase
|
||||
//encodingMap[k] = GlyphsUnicode[encoding[code]];
|
||||
charset.push(encoding[code++]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue