code 128 font
The code 128 font now lives in its own repository. It is now installable as a webfont with bower, should you wish to use it on your website.
bower install code-128-font
P.S.: you can still use traditional means of installing fonts on your system
see my post about the code 128 encoder on how to get encoded strings to use with this font.
there will soon be a new project dedicated to the barcode font generator…
MySQL Code 128 encoder
I’ve writte (or rather debugged) a function for MySQL to turn text into code 128 encoded strings directly in SQL. the source can be found here.
in combination with the code 128 font, it is now quite easy to output (or input) code 128 barcodes.
fist load and install the encoder function in mysql:
SOURCE TextTo128.sql;
Then suppose there is a table products in that db with a product_code field, and you added a new field called barcode. You can now encode all product_code at once:
UPDATE products SET barcode = TextTo128(product_code);
If you now have installed the font with bower in your webproject, you can then display the barcode simply by printing this encoded string with the code 128 font.
<link rel="stylesheet" href="bower_components/code-128-font/code128_all.css"/>
<div class="code_128_XL">EncodedTextFromDB</div>