MCPcopy Create free account
hub / github.com/clips/pattern / render_char

Method render_char

pattern/web/pdf/converter.py:95–105  ·  view source on GitHub ↗
(self, matrix, font, fontsize, scaling, rise, cid)

Source from the content-addressed store, hash-verified

93 return
94
95 def render_char(self, matrix, font, fontsize, scaling, rise, cid):
96 try:
97 text = font.to_unichr(cid)
98 assert isinstance(text, unicode), text
99 except PDFUnicodeNotDefined:
100 text = self.handle_undefined_char(font, cid)
101 textwidth = font.char_width(cid)
102 textdisp = font.char_disp(cid)
103 item = LTChar(matrix, font, fontsize, scaling, rise, text, textwidth, textdisp)
104 self.cur_item.add(item)
105 return item.adv
106
107 def handle_undefined_char(self, font, cid):
108 if self.debug:

Callers

nothing calls this directly

Calls 6

handle_undefined_charMethod · 0.95
LTCharClass · 0.90
char_widthMethod · 0.80
to_unichrMethod · 0.45
char_dispMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected