コード例 #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
ファイル: test_utils.py プロジェクト: wind-chh/pdfplumber
 def test_decode_psl_list(self):
     a = [PSLiteral("test"), "test_2"]
     assert utils.decode_psl_list(a) == ["test", "test_2"]