Like the title says, I have a Code128 font that I would like to print barcodes with. However, the string needs to be encoded in Code128 to make the barcode font work. My app uses the Python3 language.
There used to be an example on the web somewhere how to encode the string for a Code128 font, but I can't find it anymore.
I do NOT want a string to .svg converter. I specifically want to convert a string to a Code128 encoded string.
Any references, code snippets in Python3 or documentation would be appreciated.
EDIT: I use the font from here.
This is an accepted answer, so I'm leaving the original code underneath. But I prefer this refinement.