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.
Font information to be used by the OCVMax tool is contained in paragraphs that are part of an arrangement you supply to the tool.
You use the ccOCVMaxParagraph::font() function to specify the font for a paragraph or obtain the font information for a paragraph.
Character strings applied by laser jet (also known as video jet) or thermal printer likely use a common font. 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.
- If you know the name of the font, search the \WINDOWS\Fonts directory on your PC.
- Generate your own font file by using the Image Font Extractor, available by choosing Start->All Programs->Cognex->CVL->Utilities->Image Font Extractor.
- Try the http://www.myfonts.com/WhatTheFont web site, which is an 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.
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 your print equipment uses a TrueType font, you can preview all TrueType fonts by using the font dialog box of Microsoft Word.
To generate your own font file you need an image containing examples of the characters you want to verify.
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:
|
.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 file |