mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-24 05:03:39 +08:00
#13 handle special case cff file and reduce duplication in integration tests
This commit is contained in:
@@ -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];
|
||||
|
Reference in New Issue
Block a user