Just a nitpick: that's true for some kinds of barcodes, but not others.
Code 128 and 3of9 are just fonts, but UPC and EAN are more complex (there are still fonts available to construct them, but it's not a simple matter of formatting the string.
That said, if this is a non-commercial project...