Probably one of the simplest and most common barcode type is called Code39. It is a one-dimensional barcode, and it has a very limited character set, but every barcode reader out there can read Code39. There are fonts available for Code39, but on the project I was working on, I needed to embed some simple barcodes in HTML pages.
Every character is composed of 2 wide dark bars, 1 wide light bar, 3 thin dark bars, and 3 thin light bars. In addition, the spacing between each character is typically the width of 1 thin light bar. This makes Code39 a monospaced font, since every character is exactly the same width.
The character set is very small. Zero through nine, A through Z (uppercase), and a small handful of special characters.
Each Code39 barcode starts with a quiet zone, followed by asterix. Then the barcode, terminated with another asterix and another quiet zone.
For example, to encode the word TESTING, you'd use the following characters:
Put together as a barcode, the word TESTING encoded as *TESTING* looks like this:
The complete Code39 character set is available from here. From the full set, I extracted some of the more common characters I needed, which are available from here. Here are the common 135x135 characters:
The images are 135 pixels wide and high, which makes it easy to resize to 9, 15, 27, or 45 pixels.The full-sized 135 pixel images look like this: