Questions?   +1.206.341.9500

How To

Size Barcodes

Code 128 FAQ | Code 39 FAQ | Interleaved 2 of 5 FAQ | ISBN-13 FAQ | UPC FAQ

Several factors act in unison to determine a given bar code's physical characteristics. Symbol height and width, density (characters per inch, cpi), the nominal width, and aspect ratio are all interrelated variables. They take on new significance when dealing with scalable fonts like Azalea Software's bar code product line.

When some people look at a bar code they see an image, a picture. Azalea Software looks at a bar code and sees a chunk of text. Text formatted in a symbol font but text nevertheless, not a graphic image. On one level using fonts to make bar codes is no different than "painting" a JPG, TIF, or EPS file. One can use either text or graphics to display and print a bar code.

Historically bar code geometry has been described in language that assumes bar codes of a fixed size that aren't easily changed. Yes, images are usually hard to modify or change once created. Text is inherently editable and malleable. Text can be formatted at a wide range of point sizes. Bar code fonts impose a unique perspective on bar code geometry.

The Point Size Determines The Height Of The Bars

When you format a string of text in an Azalea font, the bars will be as tall as the point size you specify. There are 72 points per inch so if you format a string at 36 points the bar code will be 1/2 inch tall. Format it at 18 points and it will be 1/4" tall. This is true across the Azalea product line with the exception of the Half fonts in UPCTools.

In some cases you have a space you're trying to fit a bar code into. If you know how tall the space is you know at what point size to format the text. In the case of C39Tools and C128Tools, the specific font you use determines the symbol's width. More on that later.

Before we move on, let's all agree that formatting a piece of text at a larger point size increases the width as well as the height. When you go from 24 points to 36 points the symbol will be 50% wider as well as 50% taller.

The Font You Use Determines The Symbol's Width

The Code 128 and Code 39 bar codes you make with C128Tools and C39Tools can vary in width even when the same chunk of text is formatted at the same point size. Two symbols may both be 1/2" tall because the text was formatted at 36 points. But bar code A may be 25% wider than bar code B because it was made using a different font. Why? Because the aspect ratio (width:height ratio) of the two fonts are different.

For example, each character is X units wide but in font B each character is 2X wide. Format the same string in both fonts at 36 points and the bar codes will both be 1/2" tall but the second bar code will be twice as long. This is the case with the Code 128 fonts in C128Tools. The five different fonts differ in their overall height:width ratio. It's a series of non-proportional stretches in the x axis.

The fonts in C39Tools are a bit more complex. You may have noticed that there are three groups of nine fonts: Narrow, Regular, and Wide. The wide:narrow ratio differs by family. The wide:narow ratio is 2:1, 2.5:1, and 3:1 respectively. The Code 39 specification allows for a wide:narrow ratio within the range of 2:1 to 3:1. Within the three families of nine fonts, the overall height:width ratio varies as well, similar to the C128Tools fonts.

Nominal Width

Bar code specifications refer to a symbol's nominal width. This is the width of one narrow element, bar or space. This value makes sense when dealing with a bar code with a fixed size. If the bar code is made with a font, that font can be scaled to any arbitrary size. So any discussion of the nominal width or the absolute width of a narrow bar or a narrow space can't happen in a vacuum. The obvious question is "Yes, the narrow bar is X units wide but at what point size?". The answer for a bar code formatted at 24 points in a given font is different when that font is used at 25 or 35 or 55 points.

Any discussion of nominal widths is font size dependent. The same goes for discussions about characters/inch (cpi). Both questions must be answered in the context of "Which font is being used at what point size?"


The number of characters per inch (cpi) in a given bar code can be measured and calculated after the bar code is created. Determining the bar code's dimensions beforehand is a bit more complicated. While font A at 60 points may yield a bar code with 8 cpi, font B at 48 points or font F at 12 points will have different dimensions, different geometry, and hence a different cpi.

When someone requests a bar code with a nominal width of X and Y cpi or they specify a Z pitch, this isn't enough information to make a symbol using Azalea's fonts. Fonts, TrueType and Type 1, are scalable. This means a chunk of text, whether it's a bar code or a letterform font, can be any given size. The point size determines how big it will be. More accurately, the font size determines the symbol height, the font selection determines the symbol width, and in the case of Code 39, the font selection also determines the wide:narrow ratio.

Using fonts to make bar codes is fast, efficient, and works on any platform within any application. Scalable fonts do require an understanding of what bar code specifications are describing and how that relates to the use of scalable font technology.