# Font Files

To configure an OCVMax tool you need a font file that already defines the layout of each character in the font, also known as character keys. You can specify any font file for use with an OCVMax tool, which supports all Western-language TrueType ASCII and 16-bit Unicode character fonts (21-bit Unicode fonts are not supported). Other font types might work with the OCVMax tool, but you must experiment with acquired images and OCVMax tool parameters to determine how well they work.

Character strings applied by laser jet (also known as video jet) or thermal printer likely use a common font. VisionPro supplies a library of common fonts suitable for a variety of printing inspections. By default, the VisionPro installation utility places these fonts in the directory C:\Program Files\Cognex\VisionPro\Fonts.The OCVMax Application Guide, available by choosing Start->Cognex->VisionPro->VisionPro Documentation->OCVMax Application Guide, displays a proof sheet showing all the character keys in each font for comparison against your printed strings.

If your strings use character keys in a font not supplied with VisionPro, you must acquire the font file separately. In order to locate the correct font file for your vision application, Cognex makes the following suggestions:

- Contact your print equipment vendor.

  The vendor should be able to provide you with the name of the font the printing equipment uses, and perhaps even the font file itself.

- If you know the name of the font, search the \WINDOWS\Fonts directory on your PC.

  If your print equipment uses a TrueType font, you can preview all TrueType fonts by using the font dialog box of Microsoft Word.

  Note: Microsoft Windows prevents users from directly opening font files in the \WINDOWS\Fonts directory. If you need to use a font from \WINDOWS\Fonts, first copy it to any other local directory.

- Generate your own font file by using the Image Font Extractor, available by choosing Start->Cognex->VisionPro->Cognex Utilities->Image Font Extractor.

  To generate your own font file you need an image containing examples of the characters you want to verify.

- Try the web site http://www.myfonts.com/WhatTheFont, which is online source for finding, trying and buying fonts. The web site boasts 41,680 fonts with search tools that allow you to find and buy the right font to match your printed strings.

An OCVMax tool can use the following font file types:

Font Extension | Font Type
--- | ---
.ttc | TrueType collection font file (a font file that contains multiple TrueType fonts)
.ttf | TrueType font
.cst | Domino stroke font
.gcg | Imaje raster font
.ffn | The OCVMax tool supports the following Markem fonts: 16 high x 10 wide (hi_res16.ffn) 7 high x 5 wide (hi_res7.ffn) 5 high x 5 wide (char_5_5.ffn)
.xcl | VideoJet raster font
.fnt | Zebra raster font (many other font files may also use this extension)
.bdf | Glyph Bitmap Distribution Format font
.ocf | Cognex image font file
.ocm | Cognex extended image font

See the following sections for more information: