added standard fornt loader
This commit is contained in:
1 parent
11e466cd5d
commit
3a7cffb10b
2 files changed
+58
No files matched your search
@@ -0,0 +1,27 @@
|
||||
from unittest import TestCase
|
||||
from pdfmajor.fonts import standard14
|
||||
|
||||
|
||||
class Standard14(TestCase):
|
||||
def test_loading_exists(self):
|
||||
# pdf spec 1.7 section 9.6.2.2
|
||||
standard_list = [
|
||||
"Helvetica",
|
||||
"Courier",
|
||||
"Symbol",
|
||||
"Times-Bold",
|
||||
"Helvetica-Bold",
|
||||
"Courier-Bold",
|
||||
"ZapfDingbats",
|
||||
"Times-Italic",
|
||||
"Helvetica-Oblique",
|
||||
"Courier-Oblique",
|
||||
"Times-BoldItalic",
|
||||
"Helvetica-BoldOblique",
|
||||
"Courier-BoldOblique",
|
||||
]
|
||||
for fontname in standard_list:
|
||||
self.assertIsNotNone(standard14.get_ifexists(fontname))
|
||||
|
||||
def test_invalid_name(self):
|
||||
self.assertIsNone(standard14.get_ifexists("Clowns!"))
|
||||
Reference in new issue
Block a user