#13 handle special case cff file and reduce duplication in integration tests

This commit is contained in:
Eliot Jones
2018-11-25 12:36:38 +00:00
parent 8a0c51eaa2
commit 243f3dc099
26 changed files with 105 additions and 77 deletions

View File

@@ -8,6 +8,11 @@ namespace UglyToad.PdfPig.Fonts.CompactFontFormat
{
var index = ReadIndex(data);
if (index.Length == 0)
{
return new CompactFontFormatIndex(null);
}
var count = index.Length - 1;
var results = new byte[count][];
@@ -36,6 +41,11 @@ namespace UglyToad.PdfPig.Fonts.CompactFontFormat
{
var count = data.ReadCard16();
if (count == 0)
{
return Array.Empty<int>();
}
var offsetSize = data.ReadOffsize();
var offsets = new int[count + 1];