I remember trying to add a border like this, but it was too difficult. In a browser, it's one line of code, but not in Python.
Viewing post in Font To Bitmap Converter Standalone comments
Sure, you can do it in 1 minute. Go here: https://www.photopea.com/ upload a transparent bitmap, right-click on the layer -> Blending options -> Stroke