Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args):
"""IconicFont Constructor.
Parameters
----------
``*args``: tuples
Each positional argument is a tuple of 3 or 4 values:
- The prefix string to be used when accessing a given font set,
- The ttf font filename,
- The json charmap filename,
- Optionally, the directory containing these files. When not
provided, the files will be looked for in ``./fonts/``.
"""
super(IconicFont, self).__init__()
self.painter = CharIconPainter()
self.painters = {}
self.fontname = {}
self.charmap = {}
self.icon_cache = {}
for fargs in args:
self.load_font(*fargs)
def __init__(self, *args):
"""IconicFont Constructor.
Parameters
----------
``*args``: tuples
Each positional argument is a tuple of 3 or 4 values:
- The prefix string to be used when accessing a given font set,
- The ttf font filename,
- The json charmap filename,
- Optionally, the directory containing these files. When not
provided, the files will be looked for in ``./fonts/``.
"""
super(IconicFont, self).__init__()
self.painter = CharIconPainter()
self.painters = {}
self.fontname = {}
self.charmap = {}
self.icon_cache = {}
for fargs in args:
self.load_font(*fargs)