mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-19 10:47: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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Core;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -159,11 +160,11 @@
|
|||||||
}
|
}
|
||||||
else if (Math.Abs(formatType - 3) < float.Epsilon)
|
else if (Math.Abs(formatType - 3) < float.Epsilon)
|
||||||
{
|
{
|
||||||
glyphNames = new string[0];
|
glyphNames = EmptyArray<string>.Instance;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"Format type {formatType} is not supported for the PostScript table.");
|
glyphNames = EmptyArray<string>.Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
return glyphNames;
|
return glyphNames;
|
||||||
|
Reference in New Issue
Block a user