MCPcopy Index your code
hub / github.com/clips/pattern / render_string

Method render_string

pattern/web/pdf/pdfdevice.py:131–144  ·  view source on GitHub ↗
(self, textstate, seq)

Source from the content-addressed store, hash-verified

129 return
130
131 def render_string(self, textstate, seq):
132 font = textstate.font
133 text = ''
134 for obj in seq:
135 if not isinstance(obj, str): continue
136 chars = font.decode(obj)
137 for cid in chars:
138 try:
139 char = font.to_unichr(cid)
140 text += char
141 except PDFUnicodeNotDefined:
142 pass
143 self.outfp.write(enc(text, self.codec))
144 return
145
146 def begin_page(self, page, ctm):
147 self.outfp.write('<page id="%s" bbox="%s" rotate="%d">' %

Callers

nothing calls this directly

Calls 4

encFunction · 0.90
writeMethod · 0.80
decodeMethod · 0.45
to_unichrMethod · 0.45

Tested by

no test coverage detected