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)
def test_encoding_identityV(self): spec = {'Encoding': PSLiteral('Identity-V')} font = PDFCIDFont(None, spec) assert isinstance(font.cmap, IdentityCMap)
def test_cmapname_onebyteidentityH(self): stream = PDFStream({'CMapName': PSLiteral('OneByteIdentityH')}, '') spec = {'Encoding': stream} font = PDFCIDFont(None, spec) assert isinstance(font.cmap, IdentityCMapByte)
def test_cmapname_H(self): stream = PDFStream({'CMapName': PSLiteral('H')}, '') spec = {'Encoding': stream} font = PDFCIDFont(None, spec) assert isinstance(font.cmap, CMap)
def test_decode_psl_list(self): a = [PSLiteral("test"), "test_2"] assert utils.decode_psl_list(a) == ["test", "test_2"]