mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-19 02:37:56 +08:00
ignore invalid postscript format type truetype
when reading the format type of a postscript table in a truetype font ignore an invalid format value.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Core;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
@@ -159,11 +160,11 @@
|
||||
}
|
||||
else if (Math.Abs(formatType - 3) < float.Epsilon)
|
||||
{
|
||||
glyphNames = new string[0];
|
||||
glyphNames = EmptyArray<string>.Instance;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException($"Format type {formatType} is not supported for the PostScript table.");
|
||||
glyphNames = EmptyArray<string>.Instance;
|
||||
}
|
||||
|
||||
return glyphNames;
|
||||
|
Reference in New Issue
Block a user