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

Method __init__

pattern/web/pdf/pdffont.py:447–461  ·  view source on GitHub ↗
(self, descriptor, widths, default_width=None)

Source from the content-addressed store, hash-verified

445class PDFFont(object):
446
447 def __init__(self, descriptor, widths, default_width=None):
448 self.descriptor = descriptor
449 self.widths = widths
450 self.fontname = resolve1(descriptor.get('FontName', 'unknown'))
451 if isinstance(self.fontname, PSLiteral):
452 self.fontname = literal_name(self.fontname)
453 self.flags = int_value(descriptor.get('Flags', 0))
454 self.ascent = num_value(descriptor.get('Ascent', 0))
455 self.descent = num_value(descriptor.get('Descent', 0))
456 self.italic_angle = num_value(descriptor.get('ItalicAngle', 0))
457 self.default_width = default_width or num_value(descriptor.get('MissingWidth', 0))
458 self.leading = num_value(descriptor.get('Leading', 0))
459 self.bbox = list_value(descriptor.get('FontBBox', (0,0,0,0)))
460 self.hscale = self.vscale = .001
461 return
462
463 def __repr__(self):
464 return '<PDFFont>'

Callers

nothing calls this directly

Calls 6

resolve1Function · 0.90
literal_nameFunction · 0.90
int_valueFunction · 0.90
num_valueFunction · 0.90
list_valueFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected