Fonts

Custom fonts

The report designer supports using TrueType/OpenType font installed on the machine on which the designer is being executed. By default, when exporting a report to e.g. PDF format, the fonts used in the report will be embedded in the document. This way it will be shown correctly, also on machines where the fonts may not be installed.

The report designer does not support OpenType Font Variations, which allows a font designer to incorporate multiple font faces within a font family into a single font resource. Please use/install custom fonts as individual TrueType/OpenType files.

Barcode fonts - overview

There are many different types of Barcodes that have been evolved over the years (e.g. EAN13, UPCA, EAN8, EAN128, Code128, Code39 and many more), and Perfion supports most of these out of the box in the built-in designer.

All these fonts are very easy to use inside the Perfion designer and are very flexible in their configuration of size and what font to use for the numbers and even size of the font. This flexibility is obtained by dynamically creating the graphical representation of the barcode.

Perfion Barcodes: when using other Design tools

The easy-to-use built-in barcode generation is, however, not possible to use together with external applications such as InDesign that relies on normal fonts for display. It is also not possible to use with the Perfion table designer since it separates the structural design of tables from the actual rendering via styles that also rely on normal fonts for display.

Barcode fonts

In the above situations it is possible to use special Barcode fonts to generate the correct display of a barcode. However, these fonts cannot map the actual digits in the code to a graphic representation, since the graphical formatting of a digit in the barcode depends on its position in the code, and the value of other digits in the code.

In order to use these special barcode fonts, it is therefore necessary to translate the actual barcode into a series of characters that will display the barcode correctly in the desired barcode font.

Using Barcode fonts

Using Barcode fonts in Export or Built-in Designer

Converting the barcode to match a specific font is done via an expression. Below is an example of how to apply an expression in the output configuration xml-file for this purpose. The example below shows how to convert an EAN13 and UPCA barcode to be rendered by a specific font.

<Query>          <Select languages='EN' view='Normal,Virtual'>                  <Feature id='**' view='Config' />                  <Feature id='EAN13' expression='@Convert(ToFontEAN13)' />                  <Feature id='UPCA' expression='@Convert(ToFontUPCA)' />          </Select>          <From id ='Product'/> </Query>

To display the barcodes correctly, the characters contained in these fields must be displayed by using the associated barcode font (refer to table of supported barcode conversions).

Using Barcode fonts in Perfion Table Designer

In the Perfion table designer, the conversion of the barcode is done via an expression in the exact same way. You only need to define the expression property on the appropriate features, as illustrated on the following figure.

To display the barcodes correctly in the table, the characters contained in these fields must be displayed by using the associated barcode font (refer to table of supported barcode conversions).

The font used is defined in the style sheet associated with the table, so you will have to add a new style that uses the correct barcode font, and apply this style to either the feature element or the table cell.

Supported Barcode fonts

The 2 most widely used Barcode symbologies are EAN13 (predominantly used outside North America) and UPCA (primarily used in North America). These 2 barcode symbologies are today also referred to as GTIN-12 and GTIN-13: GTIN DEFINITION : INFORMATION - GTIN INFO Global Trade Item Number .

The UPCA and EAN13 are very similar, and use the same symbols to build up the graphical barcode. The main difference is that EAN13 has an extra digit at the beginning for specifying the region. Setting the region of EAN13 to 0 (zero) means North America, and in this case the rest of the barcode would be identical to the UPCA barcode which only supports 12 digits, as it was conceived to be used only in North America. Thus removing the first digit from the EAN13 makes it a UPCA code (for North American codes only), or adding the digit 0 (zero) in front of the UPCA code makes it an EAN13 code. This also means that EAN13 barcode graphics and fonts can be used to generate UPCA codes, which we have used for the chosen fonts below.

In the following sections a number of different barcodes will be described in further detail. Since the EAN13 Barcode fonts can also be used to generate the UPCA barcode graphic, the expression  to be used may contain -FromUPCA or –FromEAN13 as part of their name. From the above description of EAN13 and UPCA barcodes it is important to be aware, that it is only possible to convert an EAN13 code to UPCA for North American EAN13 codes (where the first digit is 0 – zero), whereas a UPCA codes can always be converted to an EAN13 barcode.

Barcode Font 1 (EAN13 + UPCA)

Below is the most flexible Open Source Barcode font for EAN13 (and also UPCA) that supports 4 different font types. These are all based on the same encoding algorithm.

 

EAN13

UPCA

Font Name

Expressions:

ToFontEAN13

ToFontEAN13-FromUPCA

Expressions:

ToFontUPCA

ToFontUPCA-FromEAN13

EAN-13B Half Height

 

 

EAN-13B

 

 

EAN-13 Half Height

 

 

EAN-13

 

 

These 4 fonts are widely used and created by Chaos Microsystems, who does not appear to exist anymore. The fonts are designated as Shareware with a small usage fee, however, since the company no longer exists it is up to you to gain approval to use the fonts if necessary. The fonts can be downloaded from the following page: http://grandzebu.net/informatique/codbar-en/ean13.htm

Barcode Font 2 (EAN13 + UPCA)

Below is an alternative Barcode font for EAN13 (and thus also UPCA) that is available in only 1 font type, but it should be completely free to use.

 

EAN13

UPCA

Font Name

Expressions:

ToFont2EAN13

ToFont2EAN13-FromUPCA

Expressions:

ToFont2UPCA

ToFont2UPCA-FromEAN13

Code EAN13

 

 

This font is created by Grandzebu. The font should be completely free to use, but you should consult the information on the download link below for further details. The font can be downloaded from the following page: http://grandzebu.net/informatique/codbar-en/ean13.htm

Barcode Font 3 (UPCA only)

The below Barcode font is only capable of generating UPCA. It is also from Chaos Microsystems.

 

 

UPCA

Font Name

 

Expressions:

ToFont3UPCA

ToFont3UPCA-FromEAN13

UPCA

 

 

We have included this font since it was implemented earlier and used by a few customers. Since the above EAN13 Barcode fonts can also be used to generate UPCA, and therefore are more flexible and also available in more font types, we do not recommend using this font unless you want to use a font that is designated to only generate UPCA symbology.

The font is designated as Shareware with a small usage fee. However, since the company no longer exists it is up to you to gain approval to use the font if necessary. The font can be downloaded from the following page: http://grandzebu.net/informatique/codbar-en/ean13.htm