-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle ZapfDingbats font for Type1FontSimple and Type1Standa…
…rd14Font and add tests
- Loading branch information
Showing
10 changed files
with
93 additions
and
20 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file added
BIN
+8.14 KB
src/UglyToad.PdfPig.Tests/Integration/Documents/MOZILLA-LINK-5251-1.pdf
Binary file not shown.
Binary file added
BIN
+279 KB
src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-492-4.jar-8.pdf
Binary file not shown.
Binary file not shown.
55 changes: 55 additions & 0 deletions
55
src/UglyToad.PdfPig.Tests/Integration/ZapfDingbatsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
namespace UglyToad.PdfPig.Tests.Integration | ||
{ | ||
using System.Linq; | ||
|
||
public class ZapfDingbatsTests | ||
{ | ||
[Fact] | ||
public void Type1Standard14Font1() | ||
{ | ||
using (var document = PdfDocument.Open(IntegrationHelpers.GetDocumentPath("TIKA-469-0"))) | ||
{ | ||
var page = document.GetPage(2); | ||
Assert.Contains("●", page.Letters.Select(l => l.Value)); | ||
} | ||
} | ||
|
||
[Fact] | ||
public void Type1Standard14Font2() | ||
{ | ||
// This document does not actually contain circular references | ||
using (var document = PdfDocument.Open(IntegrationHelpers.GetDocumentPath("MOZILLA-LINK-5251-1"))) | ||
{ | ||
var page = document.GetPage(1); | ||
Assert.Contains("✁", page.Letters.Select(l => l.Value)); | ||
Assert.Contains("✂", page.Letters.Select(l => l.Value)); | ||
Assert.Contains("✄", page.Letters.Select(l => l.Value)); | ||
Assert.Contains("☎", page.Letters.Select(l => l.Value)); | ||
Assert.Contains("✆", page.Letters.Select(l => l.Value)); | ||
Assert.Contains("✇", page.Letters.Select(l => l.Value)); | ||
} | ||
} | ||
|
||
[Fact] | ||
public void Type1FontSimple1() | ||
{ | ||
// This document does not actually contain circular references | ||
using (var document = PdfDocument.Open(IntegrationHelpers.GetDocumentPath("MOZILLA-2775-1"))) | ||
{ | ||
var page = document.GetPage(11); | ||
Assert.Contains("●", page.Letters.Select(l => l.Value)); | ||
} | ||
} | ||
|
||
[Fact] | ||
public void Type1FontSimple2() | ||
{ | ||
// This document does not actually contain circular references | ||
using (var document = PdfDocument.Open(IntegrationHelpers.GetDocumentPath("PDFBOX-492-4.jar-8"))) | ||
{ | ||
var page = document.GetPage(1); | ||
Assert.Contains("\u25a0", page.Letters.Select(l => l.Value)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters