First pass CIDFont - stop CID fonts breaking PDF rendering
This commit is contained in:
parent
2a1fd975ff
commit
b17a666343
15
pdf.js
15
pdf.js
@ -3626,9 +3626,17 @@ var PartialEvaluator = (function() {
|
|||||||
translateFont: function(fontDict, xref, resources) {
|
translateFont: function(fontDict, xref, resources) {
|
||||||
var fd = fontDict.get('FontDescriptor');
|
var fd = fontDict.get('FontDescriptor');
|
||||||
if (!fd)
|
if (!fd)
|
||||||
// XXX deprecated "special treatment" for standard
|
{
|
||||||
// fonts? What do we need to do here?
|
//If font is a composite get the FontDescriptor from the descendant
|
||||||
return null;
|
var df = fontDict.get("DescendantFonts");
|
||||||
|
if (!df)
|
||||||
|
return null;
|
||||||
|
var descendant = xref.fetch(df[0]);
|
||||||
|
fd = descendant.get("FontDescriptor");
|
||||||
|
if (!fd)
|
||||||
|
return null;
|
||||||
|
fontDict.set("FontDescriptor", fd);
|
||||||
|
}
|
||||||
var descriptor = xref.fetch(fd);
|
var descriptor = xref.fetch(fd);
|
||||||
|
|
||||||
var fontName = descriptor.get('FontName');
|
var fontName = descriptor.get('FontName');
|
||||||
@ -3674,6 +3682,7 @@ var PartialEvaluator = (function() {
|
|||||||
}
|
}
|
||||||
} else if (IsName(encoding)) {
|
} else if (IsName(encoding)) {
|
||||||
var encoding = Encodings[encoding.name];
|
var encoding = Encodings[encoding.name];
|
||||||
|
//XXX CIDFont support - get the CID Encoding especially support japan1 and identity
|
||||||
if (!encoding)
|
if (!encoding)
|
||||||
error('Unknown font encoding');
|
error('Unknown font encoding');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user