Barcode Technology

Barcode History

Barcode Label Paper

Barcode Printer

Barcode Application

Inventory Management

AI Barcode QRCode

Barcode Scanner

Barcode Software

Barcode Software B

Barcode Software C

Barcode Software D

Barcode Software E

New Technology A

New Technology B

Robot Technology

Barcode Types

Barcode Types B

Barcode Types C

Barcode Types D

Barcode Types E

Barcode Types F

Electronic Technology

Psychology at Work

Barcode Technology and Barcode Software Related   <<< Back to Directory <<<

Code 39 Barcodes: A Technical Deep Dive Into the Iconic (Code 3 of 9) (P11)

Chapter 11: How a Font Creates a Barcode

In brief: A Code 39 barcode font works by mapping each keyboard character to a specific pattern of wide and narrow bars. When you type an asterisk before and after your data and apply the font, the text is transformed into a scannable barcode. This elegant mechanism, built on a simple '3 of 9' encoding logic, is the reason Code 39 remains one of the most accessible and widely adopted barcode symbologies in industries ranging from defense to healthcare to automotive manufacturing.

11.1 The Magic Behind the Font

There is something almost magical about typing a few letters into a document, changing the font, and watching those characters transform into a pattern of black bars and white spaces that a machine can read. This is the everyday reality of barcode fonts, and Code 39 is the granddaddy of them all in the alphanumeric world. But how does this transformation actually happenWhat is the relationship between the letter 'A' on your keyboard and the vertical lines that appear on your screen

At its core, a barcode font is not fundamentally different from any other font you use. When you type the letter 'A' and select Times New Roman, the font tells your computer to display a specific shape: a triangle with a crossbar and a hole in the middle. When you type the same letter 'A' and select a Code 39 barcode font, the font tells the computer to display a completely different shape: a specific pattern of bars and spaces .

The key to this process is a one-to-one mapping between the keyboard character you press and a specific, predefined pattern of wide and narrow elements that represent that character in the barcode symbology. This is not a random association. It is governed by a strict standard. In the case of Code 39, every character in its alphabet is represented by a pattern of nine elements: five bars and four spaces. Of these nine elements, exactly three are wide and six are narrow . This is the origin of the name 'Code 3 of 9' .

When you apply the font, the text itself remains the same at the data level. Your document still contains the letters and numbers you typed. However, the font instructs the rendering engine to draw a barcode pattern instead of a traditional letterform for those characters.

This is why a barcode font is such a powerful and convenient tool. It allows any application that can use fonts, from word processors to spreadsheet programs to complex labeling software, to generate barcodes without needing specialized barcode generation libraries. This accessibility is a key reason for the enduring popularity of Code 39 .

11.2 The Encoding Map: From Keyboard to Bar

To understand how the font does its job, we need to look at the map it uses. The Code 39 standard defines a specific character set of 43 characters: the uppercase letters A through Z, the digits 0 through 9, and a set of seven special characters: the space, minus sign, period, dollar sign, slash, plus sign, and percent sign . This set was chosen because it covers most of the common characters needed for identification and inventory tracking in industrial and government applications.

The font maps each of these 43 characters to a unique combination of wide and narrow bars and spaces. This is a discrete symbology, which means that each character is encoded independently. There is an inter-character gap, a narrow space, between each character that does not encode any data . This makes the decoding process simpler and more robust because the scanner can easily tell where one character ends and the next begins.

For example, in the most common implementations, the pattern for the letter 'A' is a specific sequence of narrow and wide bars. The pattern for the number '1' is another sequence. These patterns are designed to be as distinct as possible to prevent misreads. The font, in essence, is a huge lookup table. It contains the drawn shapes for each character. When you type 'A', the font doesn't think about encoding theory; it just goes to its table, finds the shape for 'A', and draws it .

The start and stop characters are a special case. Code 39 uses the asterisk (*) as its start and stop character. This character is not a part of the standard 43-character data set but is essential for the barcode to be read. The asymmetry of the start and stop pattern allows the scanner to determine the direction the barcode is being read, meaning it can be scanned upside down or right-to-left . A font-based barcode is not valid without the leading and trailing asterisks. When creating a barcode, the user must type an asterisk, then the data, and then another asterisk, and then apply the font to all of it. For instance, to encode the data 'CODE39', you would type '*CODE39*' and apply the font .

Many font packages come with a human-readable version that displays the data text below the barcode. In this case, the asterisks are typically omitted from the human-readable text to avoid confusion, as they are not part of the actual data. This is a small but important detail in the application of the font .

11.3 A Deeper Look at the Encoding Logic

While the font handles the visual rendering, the underlying logic is fascinating. The Code 39 encoding is based on a two-out-of-five system. Each character uses two wide bars and one wide space . The position of these wide elements within the nine-element pattern determines which character is encoded. The specific pattern for each character was defined by the symbology's creators at Intermec in 1974 .

The character set is arranged in a specific order to simplify decoding. For example, the two wide bars can encode a number from 1 to 10, where the pattern of wide bars corresponds to a number based on a weighted value system (1, 2, 4, 7, 0). The position of the wide space then places that number into one of four groups that correspond to different parts of the alphabet .

This is a very efficient and clever system. The unique combination of elements means that Code 39 is self-checking. This means that a single printing error, such as a narrow bar being printed slightly wider than it should be, is unlikely to transform one valid character into another valid character . The scanner will either read the correct character or reject it. This robustness is a major reason for the symbology's longevity, especially in applications where label quality might be compromised.

This self-checking property is one of the most touted features of Code 39. It means that, unlike many other barcode symbologies, Code 39 does not strictly require a check digit to validate the data. The structure of the code itself provides a level of error detection that was highly advanced for its time and is still valued today . However, for increased security, many industries, such as the U.S. Department of Defense through its LOGMARS standard, do mandate the use of a Modulo 43 check digit .

11.4 Technical Characteristics and Real-World Trade-offs

The technical characteristics of Code 39 create a distinct set of advantages and disadvantages that directly influence where and how it is used in the real world.

11.4.1 Variable Length and Its Implications

One of the key features of Code 39 is that it is a variable-length barcode. There is no fixed limit on the number of characters you can encode. In practice, however, the low data density of the symbology imposes a practical limit. Because each character is composed of nine elements, each with a minimum width, a long string of data can result in an extremely wide barcode . This makes it unsuitable for very small items or applications where space is limited .

For example, in the medical device industry, where labels might be placed on small vials or ampoules, a Code 39 barcode might be too long to fit. In such cases, a higher-density symbology like Code 128 is often chosen. Conversely, for a shipping label on a large corrugated box, the physical size of the label is not a constraint, so Code 39's lower density is perfectly acceptable.

11.4.2 Wide-to-Narrow Ratio and Print Quality

The ratio between the width of the wide bars and the narrow bars is a critical parameter for a scannable Code 39 barcode. This ratio is typically between 2:1 and 3:1 . A higher ratio means the barcode is easier to read because the distinction between wide and narrow elements is more pronounced. However, a higher ratio also makes the barcode wider overall.

The font you choose determines this ratio. Font packages often include multiple font variations for different printing environments. For instance, IDAutomation offers fonts for printers as low as 203 DPI . This is a common resolution for thermal transfer printers used in warehousing. For a 203 DPI printer, the point size of the font must be chosen carefully to ensure that the narrow bars are at least one pixel wide and the wide bars are at least two or three pixels wide . If the narrow bars are too small, they might disappear in the printing process. If the wide bars are not wide enough, the scanner may not be able to distinguish them from narrow bars. The font designer's work in specifying these parameters is what makes the font functional on different devices.

11.4.3 The Asterisk and the Quiet Zone

The asterisk as a start/stop delimiter is a unique and simple way to frame the barcode. However, the font alone does not create a scannable barcode. The barcode must also be surrounded by a 'quiet zone' - a blank area of white space that tells the scanner where the barcode begins and ends . For Code 39, the quiet zone must be at least 10 times the width of a narrow bar on each side .

This is a crucial element that can be overlooked by a novice user. If the barcode is placed too close to other text or the edge of a label, the scanner may not be able to find the start and stop characters, resulting in a failed scan. This is one of the differences between generating a barcode with a font in a word processor and using a professional labeling system, which automatically enforces quiet zone requirements.

11.5 Real-World Applications by Industry

The technical characteristics of Code 39---its alphanumeric capability, self-checking nature, ease of font-based implementation, and acceptable robustness for industrial environments---have made it a mainstay in several key sectors. Its adoption is often deeply historical and entrenched in legacy systems.

11.5.1 U.S. Department of Defense (LOGMARS)

Perhaps the most well-known application of Code 39 is in the U.S. Department of Defense's LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) program . The Department of Defense requires that all items it procures be identified with a barcode that meets the LOGMARS standard, which specifies Code 39 .

The reason for choosing Code 39 for this critical application is clear. The symbology's ability to encode alphanumeric data was essential for identifying the wide variety of parts and equipment the military uses. The self-checking property provided a level of reliability that is vital in a logistical chain where an unreadable barcode can halt the movement of supplies. Furthermore, the ease of creating these barcodes with simple fonts was an advantage for the thousands of defense contractors who had to implement the system . To this day, you will see Code 39 barcodes on virtually everything the military buys, from spare parts for aircraft to individual boxes of food rations.

11.5.2 The Automotive Industry

The automotive industry is another major adopter of Code 39. The Automotive Industry Action Group (AIAG) established standards for barcode labels on components, and Code 39 was a fundamental part of those early standards . The labels used in the supply chain for parts and assemblies often contain a mix of letters and numbers, making Code 39 a logical choice.

For example, a label on a crate of engine blocks might have a part number with letters and a serial number with digits. Code 39 can encode all of this in a single, linear barcode. The durability of the symbol is also important in the automotive environment, where labels can be exposed to grease, dirt, and temperature fluctuations. While Code 128 and 2D barcodes are increasingly used in the automotive industry for their higher data density, Code 39 can still be found on many component labels, especially in supplier operations that have had the system in place for decades. The self-checking nature of Code 39 reduces the risk of misreading a part number and causing a costly assembly error .

11.5.3 Healthcare and Medical Devices

In the healthcare sector, Code 39 is used for a wide range of applications, from patient identification to medical device tracking. The Health Industry Bar Code (HIBC) standard was originally based on Code 39 . Laboratories use it for inventory management of samples and supplies . Government health agencies, such as the National Institutes of Health (NIH), have used Code 39 for labeling and tracking.

The reason for its prevalence in healthcare is similar to that in the military: the need for alphanumeric codes and the proven reliability of the symbology. For instance, a blood sample vial might be labeled with a Code 39 barcode that encodes the patient's ID number and the date of collection. The ability to include letters allows for a more human-readable and meaningful identifier. Furthermore, the 'do-it-yourself' nature of font-based barcodes has made it easy for hospitals and labs to create their own labeling systems internally without relying on outside vendors for specialized software .

11.5.4 Manufacturing and Logistics Beyond the Military

Beyond the specific mandates of the DoD, Code 39 has found a home in general manufacturing and logistics. It is used for work-in-progress tracking, asset management, and inventory control . Its simplicity and the ubiquity of Code 39 readers (almost every barcode scanner on the market can read it) make it an easy choice for internal tracking systems .

A factory might use a Code 39 barcode on a job traveler that follows a product through its manufacturing process. The barcode could encode the job number, the product type, and the current step in the process. Workers can scan the barcode to update the system, providing real-time visibility into the production line. The variable-length nature of Code 39 is an advantage here, as a job number might be 5 characters long while a detailed instruction code might be 15. The system can accommodate both lengths without any changes .

11.5.5 The United States Postal Service

While the USPS has largely moved to other symbologies like the Intelligent Mail barcode (IMb) for routing and tracking, Code 39 has been used in various postal and shipping applications . Many shipping labels and bills of lading still use Code 39 for the pro number (the tracking number assigned to a freight shipment) .

The font-based creation of these barcodes is a key advantage in this field. A freight company can easily embed Code 39 barcodes into its shipping documents using standard word processing software, without needing to integrate a complex barcode generation engine into its template system. This ease of use has made it a popular choice for documentation in the shipping and logistics industry, even as the packages themselves might be tracked with more advanced symbologies.

11.6 Code 39 Extended: Full ASCII at a Cost

While the standard Code 39 character set is sufficient for many industrial and government applications, it lacks support for lowercase letters and the full ASCII character set. To address this limitation, a version called Code 39 Extended (also known as Code 39 Full ASCII) was developed .

The clever trick behind Code 39 Extended is that it uses two standard Code 39 characters to encode a single non-standard character. For example, the lowercase letter 'a' is encoded as the two-character combination '+A' . A lookup table defines these two-character pairs for every character in the full ASCII set (128 characters) .

This approach makes it possible to encode lowercase letters, punctuation, and control characters in a Code 39 barcode. However, it comes at a high price: data density. Since each character requires two Code 39 characters, the barcode becomes twice as long . This exacerbates Code 39's already significant low-density problem.

In practice, Code 39 Extended is rarely used compared to the standard version. In most applications that require full ASCII support, a different symbology like Code 128, which supports the full ASCII set natively and more efficiently, is a better choice. The Extended version is a valuable tool for backward compatibility, but it serves as a reminder of the limitations of the original design .

11.7 A Step-by-Step Guide: Creating a Barcode with a Font

Using a Code 39 font is one of the easiest ways to create a barcode. It involves just a few steps, but attention to detail is crucial for a scannable result.

Step 1: Install the Barcode Font.

First, you need to install a Code 39 barcode font on your system. There are many commercial and free packages available. The installation process is the same as for any other font. You typically download a font file (often with a .ttf extension for TrueType fonts) and install it through your operating system's font management tool. Font packages often include multiple variations of the Code 39 font to accommodate different printing conditions and scanner types . There are Narrow, Regular, and Wide fonts that define the wide-to-narrow ratio (e.g., 2:1, 2.5:1, or 3:1) . There are also fonts optimized for different printer resolutions, like those for 203 DPI thermal printers .

Step 2: Frame Your Data with Asterisks.

A Code 39 barcode is not valid without a start and stop character. In a Code 39 font, this character is the asterisk (*). Therefore, you must place an asterisk before and after the data you wish to encode. For example, if your data is 'ABC123', you must type '*ABC123*'. This is perhaps the most common mistake made by beginners. If you forget the asterisks, the barcode will not scan . In some font implementations, a parenthesis '(' and ')' can be used instead of asterisks to omit the asterisks from the human-readable text, but the asterisk is the industry standard .

Step 3: Apply the Font and Format.

Select the entire string, including the asterisks, and apply the Code 39 font. A scannable barcode should now appear.

The text you selected will be replaced by the corresponding barcode pattern. If you are using a font that includes a human-readable version (often indicated by a 'T' or 'HR' in the font name), the data will still appear below the bars . This is a very common and helpful feature for users who need to manually read the code.

Step 4: Ensure Proper Quiet Zone.

Finally, ensure there is adequate blank space around the barcode. This is the quiet zone, and it is essential for the scanner to differentiate the barcode from the surrounding text and graphics. A good rule of thumb is to leave at least 10 times the width of a narrow bar on each side .

11.8 Troubleshooting and Common Pitfalls

Despite its simplicity, users can encounter issues when creating Code 39 barcodes with fonts. Here are some common pitfalls and their solutions.

1. The barcode doesn't scan.

This is usually caused by a few simple mistakes. First, check for the start and stop asterisks. Second, ensure the quiet zone is present. Third, verify that the correct font is applied and that it is a valid Code 39 font. The text should transform into a pattern of bars and spaces. If it looks like the original text in a strange font, the encoding is wrong.

2. The barcode is too small or too large.

The size of the barcode is controlled by the point size of the font. A larger point size creates a larger barcode, suitable for wide-area scanning or long-range readers. A smaller point size creates a smaller, more compact barcode. However, you cannot make it arbitrarily small. Each printer and scanner has a minimum resolution. If the barcode is too small, the narrow bars might not print at all. For a 203 DPI printer, it is often recommended to use a point size that is a multiple of 6 (e.g., 6, 12, 18 point) to ensure the bars align with the pixel grid .

3. The barcode is distorted.

If the barcode looks fuzzy or the bar widths are inconsistent, there might be a printer issue. Scaling a font-based barcode can cause distortion. It is generally recommended to create the barcode at the final size you need, rather than generating it at a small size and then enlarging it. Also, ensure you are using the correct font for your printer type. Different fonts are available for low-resolution printers to minimize distortion .

11.9 Summary: The Legacy of the Font

The humble barcode font is the unsung hero of the Code 39 story. By taking a complex encoding scheme and reducing it to a simple font mapping, Dr. David Allais and Ray Stevens of Intermec created a system that was not only technically robust but also incredibly easy to adopt . A font is a universal tool, understood by every piece of software and hardware in the computing world. This universality meant that anyone with a computer and a printer could create a Code 39 barcode, a factor that was instrumental in its explosive growth.

The technical features of Code 39---its self-checking property, the simple start/stop mechanism, and its alphanumeric capacity---were perfectly aligned with the needs of non-retail industries. The U.S. Department of Defense found in it a reliable way to track millions of parts. The automotive industry used it to streamline its vast supply chains. The healthcare sector leveraged it for patient safety and inventory management. In each case, the font made the technology accessible.

However, the same technical features that made Code 39 so successful also define its limitations. The low data density, a direct result of the '3 of 9' encoding scheme, means that it has largely been superseded by more efficient symbologies like Code 128 in new applications . The lack of native lowercase support has relegated Code 39 Extended to a niche role. Despite these limitations, the font-based creation method and self-checking reliability ensure that Code 39 is not simply a historical artifact. It remains embedded in the infrastructure of some of the world's most critical industries, a testament to the power of a simple idea executed exceptionally well.

The next time you see a Code 39 barcode on a shipping crate or a military part, take a moment to appreciate the invisible font at work behind the scenes, translating a simple string of keyboard characters into a pattern of bars and spaces that tells a story of logistics, identity, and control.

 

EasierSoft Barcode Label Design & Bulk Printing Software

---- Use Excel Data to Batch Print Barcodes on Label Sheets or Roll Labels  

---- How to use this barcode software

Download:  Free Barcode Software + Barcode Label Designer

Download Free Barcode Software at Softonic

     Download at CNET

Once you obtain a GS1/UPC/EAN barcode, or other barcode type and QR code, you can use our free software to batch print barcode labels onto Roll label paper using a professional label printer, or to batch print barcodes onto Avery 5160 label sheets using a regular laser or inkjet printer. Our software has free and paid versions.

The free version fully meets your needs for batch printing GS1/UPC/EAN barcodes. The paid version can import data from Excel and databases to batch print barcode labels with different values.

How to Start

Input Data

Import Excel Data

Print Barcode

Barcode Format

Label Designer

All Screen Shot

Export Barcode Image

Save Template

Output Word Excel

How to Use & FAQ:

Configuring Barcode Size

Auto Calculate the Barcode Size

Export Barcode images

Export Barcode Image Format

File Names for Exported Barcode

Resolution of Exported Barcode Images

Fixed Folder for Exporting Barcode

Default Barcode Image Export Format

Print bulk barcodes quickly

Print barcodes to Avery 5160 label

How to bulk Barcode Printing

Sample - Avery 5162 (2x7) Label Sheet

Example: Print barcodes to 5*3cm roll

Example: Print barcodes to 5161 label

Example: Print barcodes to 5162 label

Example: Print barcodes to 5163 label

Example: Print barcodes to 5164 label

Example: Print portrait orientation 5164

Example: Print barcodes to 5167 label

Example: Print barcodes to 5168 label

Example: Print portrait orientation 5168

Example: Print barcodes to 5169 label

Example: Print barcodes to 5660 label

Example: Print barcodes to 5661 label

Example: Print barcodes to 5662 label

Example: Print barcodes to 5663 label

Example: Print barcodes to 5664 label

Example: Print portrait orientation 5664

Example: Print barcodes to 5873 label

Example: Print barcodes to 5874 label

Two ways to import Excel data

Import Excel Data - Pro Edition

Import Excel Data - Std Edition

Import Data from Excel - Detail

Load Data From Excel File

Data Editing Table

Copy Data From Excel

Four ways to input barcode data

Add ASCII Key E

Input Multiple Lines of Text for Barcodes

Generates Sequential Serial Numbers

Import or copy data from Excel sheets

Special sequence number generation

Std Details: Simple Input Form

Std Details: Multiple Line Text Input

Details: Sequence Barcode Generator

Examples: Sequence Barcode Generator

Import Data From Excel Spreadsheet

Barcode Data Correspondence Diagram

Data Editor

Highlights

Excel integration: Import data directly from Excel to generate and print barcodes in bulk.

Label designer: Create complex labels with multiple barcodes, text, logos, and shapes.

Batch printing: Print thousands of barcodes at once using standard inkjet/laser printers or professional barcode printers.


Flexible editions:

Standard Edition: Simple batch printing with Excel data.

Professional Edition: Adds command-line automation for workflow integration.

Label Designer Edition: Advanced design features for complex labels.


Why Choose Our Barcode Solutions?

Cost-effective: Free online generator and permanent free desktop version available.

Easy to use: No technical expertise required—just input data and print.

Versatile: Supports nearly all 1D and 2D barcode types, including QR codes.

Trusted: Recommended by CNET and widely downloaded by users worldwide.


Suitable Use Cases

Small businesses and startups needing quick barcode labels for products.

Retailers and online sellers managing inventory with batch barcode printing.

Manufacturers requiring sequential or custom barcode labels for packaging.

Educational and testing environments where barcodes are used for tracking.

 

 

CONTACT

cs@easiersoft.com

If you have any question, please feel free to email us.

 

https://free-barcode.com

 

<<< Back to Directory <<<     Barcode Generator     Barcode Freeware     Privacy Policy