From 736f83e22796b610f7e50ad8183651fa6a7971b2 Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Sat, 25 Jan 2020 16:35:08 +0000 Subject: [PATCH] handle null charstring names it appears charstring definitions in adobe type 1 fonts can omit the charstring name. in this case we set the name to the string value of the charstring index. --- .../Type1/CharStrings/Type1CharstringDecryptedBytes.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UglyToad.PdfPig.Fonts/Type1/CharStrings/Type1CharstringDecryptedBytes.cs b/src/UglyToad.PdfPig.Fonts/Type1/CharStrings/Type1CharstringDecryptedBytes.cs index 5c9d5128..b1ec7b57 100644 --- a/src/UglyToad.PdfPig.Fonts/Type1/CharStrings/Type1CharstringDecryptedBytes.cs +++ b/src/UglyToad.PdfPig.Fonts/Type1/CharStrings/Type1CharstringDecryptedBytes.cs @@ -25,7 +25,7 @@ { Bytes = bytes ?? throw new ArgumentNullException(nameof(bytes)); Index = index; - Name = name; + Name = name ?? index.ToString(); Source = SourceType.Charstring; }