You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now I guesstimate the width of the texts to be simply 5 * len(text). However this is not quite the same as the shields.io specification, and badger will in the sample case generate an image that is one pixel wider than the shields.io one.
The way shields.io does it is by using pdfkit and literally measuring the width. I think most efficient way would probably be to read the font files from the OS (or bundle them with the package) and calculate the correct width that way.
The text was updated successfully, but these errors were encountered:
Right now I guesstimate the width of the texts to be simply
5 * len(text)
. However this is not quite the same as the shields.io specification, and badger will in the sample case generate an image that is one pixel wider than the shields.io one.The way shields.io does it is by using pdfkit and literally measuring the width. I think most efficient way would probably be to read the font files from the OS (or bundle them with the package) and calculate the correct width that way.
The text was updated successfully, but these errors were encountered: