Пример #1
0
 def test_encoding_identityH_as_PSLiteral_stream(self):
     stream = PDFStream({'CMapName': PSLiteral('Identity-H')}, '')
     spec = {'Encoding': stream}
     font = PDFCIDFont(None, spec)
     assert isinstance(font.cmap, IdentityCMap)
Пример #2
0
 def test_encoding_identityV(self):
     spec = {'Encoding': PSLiteral('Identity-V')}
     font = PDFCIDFont(None, spec)
     assert isinstance(font.cmap, IdentityCMap)
Пример #3
0
 def test_cmapname_onebyteidentityH(self):
     stream = PDFStream({'CMapName': PSLiteral('OneByteIdentityH')}, '')
     spec = {'Encoding': stream}
     font = PDFCIDFont(None, spec)
     assert isinstance(font.cmap, IdentityCMapByte)
Пример #4
0
 def test_cmapname_H(self):
     stream = PDFStream({'CMapName': PSLiteral('H')}, '')
     spec = {'Encoding': stream}
     font = PDFCIDFont(None, spec)
     assert isinstance(font.cmap, CMap)
Пример #5
0
 def test_decode_psl_list(self):
     a = [PSLiteral("test"), "test_2"]
     assert utils.decode_psl_list(a) == ["test", "test_2"]