mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-14 19:05:01 +08:00
add tests for another type 1 font file
This commit is contained in:
BIN
src/UglyToad.PdfPig.Tests/Fonts/Type1/CMR10.pfa
Normal file
BIN
src/UglyToad.PdfPig.Tests/Fonts/Type1/CMR10.pfa
Normal file
Binary file not shown.
@@ -15,8 +15,8 @@
|
||||
public void CanReadHexEncryptedPortion()
|
||||
{
|
||||
var bytes = GetFileBytes("AdobeUtopia.pfa");
|
||||
|
||||
parser.Parse(new ByteArrayInputBytes(bytes),0, 0);
|
||||
|
||||
parser.Parse(new ByteArrayInputBytes(bytes), 0, 0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -24,7 +24,7 @@
|
||||
{
|
||||
// TODO: support reading in these pfb files
|
||||
var bytes = GetFileBytes("Raleway-Black.pfb");
|
||||
|
||||
|
||||
parser.Parse(new ByteArrayInputBytes(bytes), 0, 0);
|
||||
}
|
||||
|
||||
@@ -52,6 +52,14 @@
|
||||
parser.Parse(new ByteArrayInputBytes(bytes), 0, 0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CanReadFontWithCommentsInOtherSubrs()
|
||||
{
|
||||
var bytes = GetFileBytes("CMR10");
|
||||
|
||||
parser.Parse(new ByteArrayInputBytes(bytes), 0, 0);
|
||||
}
|
||||
|
||||
private static byte[] GetFileBytes(string name)
|
||||
{
|
||||
var documentFolder = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "Fonts", "Type1"));
|
||||
|
@@ -46,7 +46,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.5.0-preview2-26406-04" />
|
||||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="xunit.extensibility.execution" Version="2.3.1" />
|
||||
|
@@ -540,6 +540,13 @@
|
||||
break;
|
||||
}
|
||||
|
||||
if (token.Type == Type1Token.TokenType.StartArray)
|
||||
{
|
||||
var array = ReadArrayValues<T>(tokenizer, converter, true, false);
|
||||
|
||||
results.AddRange(array);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var result = converter(token);
|
||||
|
@@ -363,7 +363,7 @@
|
||||
var c = (char)bytes.CurrentByte;
|
||||
if (ReadHelper.IsEndOfLine(c))
|
||||
{
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
commentBuffer.Append(c);
|
||||
|
Reference in New Issue
Block a user