mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-14 02:44:58 +08:00
support indirect name tokens for cidtogidmap in cid fonts #191
This commit is contained in:
@@ -291,12 +291,15 @@
|
|||||||
return new CharacterIdentifierToGlyphIndexMap();
|
return new CharacterIdentifierToGlyphIndexMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry is NameToken)
|
if (DirectObjectFinder.TryGet(entry, pdfScanner, out NameToken _))
|
||||||
{
|
{
|
||||||
return new CharacterIdentifierToGlyphIndexMap();
|
return new CharacterIdentifierToGlyphIndexMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
var stream = DirectObjectFinder.Get<StreamToken>(entry, pdfScanner);
|
if (!DirectObjectFinder.TryGet(entry, pdfScanner, out StreamToken stream))
|
||||||
|
{
|
||||||
|
throw new PdfDocumentFormatException($"No stream or name token found for /CIDToGIDMap in dictionary: {dictionary}.");
|
||||||
|
}
|
||||||
|
|
||||||
var bytes = stream.Decode(filterProvider);
|
var bytes = stream.Decode(filterProvider);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user