MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / encode_string

Method encode_string

lib/matplotlib/backends/backend_pdf.py:2290–2292  ·  view source on GitHub ↗
(self, s, fonttype)

Source from the content-addressed store, hash-verified

2288 return b''.join(glyph.to_bytes(2, 'big') for glyph in subset)
2289
2290 def encode_string(self, s, fonttype):
2291 encoding = {1: 'cp1252', 3: 'latin-1', 42: 'utf-16be'}[fonttype]
2292 return s.encode(encoding, 'replace')
2293
2294 def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
2295 # docstring inherited

Callers 1

draw_textMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected