Skip to content

Commit

Permalink
Fix TrueTypeFontUnicode when metrics contains null
Browse files Browse the repository at this point in the history
TrueTypeFontUnicode WriteFont() method throws when metrics contains
null values. This commit fixes the issue by filtering out null values
  • Loading branch information
raulfpl committed Dec 7, 2023
1 parent 26920e4 commit 229470e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ internal override void WriteFont(PdfWriter writer, PdfIndirectReference piref, o
tmp.Add(o);
}

var metrics = tmp.ToArray();
var metrics = tmp.Where(m => m != null).ToArray();
Array.Sort(metrics, this);
PdfIndirectReference indFont = null;
PdfObject pobj = null;
Expand Down

0 comments on commit 229470e

Please sign in to comment.