Click here to Skip to main content
13,050,764 members (75,394 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


12 bookmarked
Posted 28 Mar 2014

Barcode 39 without images

, 21 Apr 2014
Rate this:
Please Sign up or sign in to vote.
A short description of the Code 39 Barcode font by Matthew Welch (and how to use it)


Sometimes the forums give me great ideas for write-ups which may be interesting to a lot of people. One forum thread, started by our very own OriginalGriff brought something to my attention: Often people think that it is only possible to use generated images to create or display barcodes. Some members replied to OG's post, stating that there are in fact fonts to display the barcode equivalent of a string (which is pretty awesome, you don't need to store any images to display a barcode).
I did a quick googling on that topic and found the Code 39 Barcode Font, introduced back in 1997 by Matthew Welch. Matthew was kind enough to leave his font in the public domain, allowing an unrestricted use of it to all of us!


The Code 39 font is a True Type font, meaning that it is available for all major browsers, programs and operating systems. "True Type" is a font standard to display fonts on screens and printers. The standard is integrated with Microsoft Windows and MacOS and available in Linux/Unix Environments under the name "FreeType". In difference to Bitmap-Based fonts, True Type fonts are based on vector graphics. The original True Type formate was introduced by the Apple Lead Engineer Sampo Kaasila, even though it was called "Bass" at first. True Type fonts were available within Windows since Windows 3.1, Apple introduced them a bit earlier in System 7.

Using the font within HTML

Modern browsers support True Type fonts embedded in the HTML, e.g. you can even use the Code 39 font within your HTML page (and with HTML I'm also referring to PHP, ASP.Net and all the other Web technologies). lists the browsers which support True Type fonts, currently all modern browsers support them (IE was a bit late to the party, versions before IE 9 do not support TTFs).
Whatsoever, to use a true type font within your HTML page you can simply use CSS3:



If you now set a Textbox' CSS class to "barcode", the text you set to it will be displayed as 3 of 9 Barcode.

Using the font with Desktop applications

Most of the common Desktop developmente frameworks (Qt, Java and .Net) use the fonts installed on then system. To install a True Type font to your system, just double-click the the font file (the one with the *.ttf extension) and then click on "Install" in the newly opened Window. After you have installed the font you can set it as font for your control in the Desing mode of your IDE. Please remember that you have to deploy and install the font with your program if you are using it within.


A big "Thank you!" goes out to Matthew Welch who developed the Code39 font and made it available to the public domain. If you decided to use his font, drop him an email at to thank him.


This article, along with any associated source code and files, is licensed under A Public Domain dedication


About the Author

Marco Bertschi (SFC)
Software Developer (Junior)
Switzerland Switzerland
Software Developer (Swiss Federal VET Diploma), experienced with Qt C++, Arduino Boards, multiple communication technologies (the usual Webservices, TCP/IP bunch as well as serial port communication), and C# including WPF, Entity Framework and COM libraries built using the .Net Framework.
Music enthusiast, runner, part-time psychologist for friends, awesome guy and Air Force Sergeant First Class.

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170713.1 | Last Updated 22 Apr 2014
Article Copyright 2014 by Marco Bertschi (SFC)
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid