mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 19:54:52 +08:00
handle error case where the descendant font for a type 0 composite font is not a dictionary
This commit is contained in:
@@ -41,6 +41,10 @@
|
|||||||
{
|
{
|
||||||
ParseDescendant(descendantFontDictionary, reader, isLenientParsing);
|
ParseDescendant(descendantFontDictionary, reader, isLenientParsing);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new InvalidFontFormatException("Expected to find a Descendant Font dictionary, instead it was: " + parsed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -68,7 +72,7 @@
|
|||||||
|
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool TryGetFirstDescendant(PdfDictionary dictionary, out CosObject descendant)
|
private static bool TryGetFirstDescendant(PdfDictionary dictionary, out CosObject descendant)
|
||||||
{
|
{
|
||||||
descendant = null;
|
descendant = null;
|
||||||
|
Reference in New Issue
Block a user