Add test case for Type3 fonts with no Unicode mapping

This commit is contained in:
James R. Barlow
2018-11-15 21:54:26 -08:00
parent d3b334c10f
commit 9e6b54c7ed
3 changed files with 10 additions and 2 deletions
+5
View File
@@ -149,6 +149,11 @@ licensed under the specified license.
- @jbarlow83
- @jbarlow83
- CC-BY-SA 4.0
* - type3_font_nomapping.pdf
- example of a PDF with an embedded subsetted TrueType font with no Unicode mapping
- @jbarlow83
- @jbarlow83
- CC-BY-SA 4.0
* - vector.pdf
- a PDF with vector art and text rendered as curves with no fonts
- @Catscratch
Binary file not shown.
+5 -2
View File
@@ -185,8 +185,11 @@ def test_ocr_detection(resources):
assert pdf[0].has_text
def test_corrupt_font_detection(resources):
filename = resources / 'truetype_font_nomapping.pdf'
@pytest.mark.parametrize(
'testfile', ('truetype_font_nomapping.pdf', 'type3_font_nomapping.pdf')
)
def test_corrupt_font_detection(resources, testfile):
filename = resources / testfile
with pytest.raises(NotImplementedError):
pdf = pdfinfo.PdfInfo(filename)
pdf[0].has_corrupt_text