This commit updates the number of padding characters to zero. Many issues have been
raised around producing more compact badges, so it feels like the most common usage would be
with this option defaulted to zero.
Switch to using get_text_width(' ') to get padding width.
This results in a more compact badge as the font_width that was used before
was the guesstimated font width that was too large.
Within a single Python session anybadge will use different SVG mask IDs.
This is an attempt to fix the issue where SVG files displayed in the same
HTML will re-use the same mask, and therefore appear with the same dimensions.
Uses a singleton on the class to maintain a sequence of mask ids.
Includes unittests to ensure new ID is used for each badge.
* Add __repr__ function that prints the object representation.
* Add __str__ function that prints the Badge SVG text.
Also:
* Add constructor args to the Badge class docstring.
* Change the way defaults are used in the Badge constuctor. Instead of
setting values, use None and set arguments to the default values inside
the constructor.
* Fix unittests that don't use overwrite=True.
* Use a better estimation technique to guess text widths.
* Add unittests for validating badge widths for various size badges.
* Add return types to function docstrings.
* Update relevant doctests.