Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ public static double[] GetWidths(IPdfTokenScanner pdfScanner, DictionaryToken di

if (!(arrayToken is NumericToken number))
{
throw new InvalidFontFormatException($"Token which was not a number found in the widths array: {arrayToken}.");
if (DirectObjectFinder.TryGet<NumericToken>(arrayToken, pdfScanner, out var resolved))
{
number = resolved;
}
else
{
throw new InvalidFontFormatException($"Token which was not a number found in the widths array: {arrayToken}.");
}
}

result[i] = number.Double;
Expand Down
Loading