MCPcopy Create free account
hub / github.com/PageBot/PageBot / __repr__

Method __repr__

Lib/pagebot/fonttoolbox/objects/font.py:600–608  ·  view source on GitHub ↗

>>> from pagebot.fonttoolbox.fontpaths import getTestFontsPath >>> path = getTestFontsPath() + '/google/roboto/Roboto-Black.ttf' >>> font = getFont(path) >>> str(font) ' '

(self)

Source from the content-addressed store, hash-verified

598 self._variables = None # Lazy creations of delta's dictionary per glyph per axis
599
600 def __repr__(self):
601 """
602 >>> from pagebot.fonttoolbox.fontpaths import getTestFontsPath
603 >>> path = getTestFontsPath() + '/google/roboto/Roboto-Black.ttf'
604 >>> font = getFont(path)
605 >>> str(font)
606 '<Font Roboto-Black>'
607 """
608 return '<Font %s>' % (path2FontName(self.path) or self.name or 'Untitled').strip()
609
610 def __getitem__(self, glyphName):
611 """Answers the glyph with glyphName.

Callers

nothing calls this directly

Calls 1

path2FontNameFunction · 0.90

Tested by

no test coverage detected