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:
Eliot Jones
2020-02-27 16:10:19 +00:00
parent c033a0b3fe
commit f7cabe5d12

View File

@@ -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;