In the early days of computer
optical character recognitionOptical character recognition, usually abbreviated to OCR, is the mechanical or electronic translation of scanned images of handwritten, typewritten or printed text into machine-encoded text. It is widely used to convert books and documents into electronic files, to computerize a record-keeping...
, there was a need for a font that
could be recognized by the computers of that day, and by
humans. The resulting compromise
was the
OCR-A font, which used simple, thick strokes to form recognizable
characters.
The
fontIn typography, a font is traditionally defined as a quantity of sorts composing a complete character set of a single size and style of a particular typeface...
is
monospaced (fixed-width), with the printer required to place glyphs cm ( inch) apart, and the reader
required to accept any spacing between cm ( inch) and cm ( inch).
Standardization
The OCR-A font was standardized by the
American National Standards InstituteThe American National Standards Institute is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organization also coordinates U.S. standards with international...
(ANSI)
as X3.4-1977. X3.4 has since become the INCITS
and the OCR-A standard is now called
ISO 1073-1:1976. There is also a German standard for OCR-A called DIN 66008.
Implementations
In 1968,
American Type FoundersAmerican Type Founders was a business trust created in 1892 by the merger of 23 type foundries, representing about 85% of all type manufactured in the United States...
produced OCR-A, one of the first optical character recognition typefaces to meet the criteria set by the U.S. Bureau of Standards. The design is simple so that it can be easily read by a machine, but it is more difficult for the human eye to read.
As metal type gave way to computer-based typesetting, Tor Lillqvist used
MetaFontMetafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...
to describe the OCR-A font.
That definition was subsequently improved by Richard B. Wales. Their work is available from
CTANCTAN is an acronym for the Comprehensive TeX Archive Network.It is the authoritative place where TeX related material and software can be found for download...
.
To make the free version of the font more accessible to users of Microsoft Windows, John Sauter converted
the
MetaFontMetafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...
definitions to
TrueTypeTrueType is an outline font standard originally developed by Apple Computer in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript...
using
potracePotrace is an open-source, cross-platform computer program which converts bitmapped images into vector graphics. It is written and maintained by Peter Selinger....
and
FontForgeFontForge is a typeface editor program developed by George Williams. FontForge is free software and is distributed under the BSD license. FontForge is available for several operating systems and is localized in several languages.- Features :Fontforge supports many font formats, including...
in 2004. In 2007,
Gürkan Sengün
created a
DebianDebian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. Debian GNU/Linux, which includes the GNU OS tools and Linux kernel, is a popular and influential...
package from this implementation.
In 2008. Luc Devroye corrected the vertical positioning in John Sauter's implementation, and fixed the name of lower case z.
Independently, Matthew Skala used mftrace
to convert the
MetafontMetafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...
definitions
to TrueType format in 2006. In 2011 he released a new version created by rewriting the Metafont definitions to work with
METATYPE1METATYPE1 is a tool for creating Type 1 fonts using METAPOST, developed by the Polish JNS team ....
, generating outlines directly without an intermediate tracing step.
In addition to these free implementations of OCR-A, there are also implementations sold by several vendors.
Use
Although
optical character recognitionOptical character recognition, usually abbreviated to OCR, is the mechanical or electronic translation of scanned images of handwritten, typewritten or printed text into machine-encoded text. It is widely used to convert books and documents into electronic files, to computerize a record-keeping...
technology has advanced to the point where such simple fonts are no longer necessary, the OCR-A font has remained in use. Some lockbox companies still insist that the account number and amount owed on a bill return form be printed in OCR-A. In addition, some people prefer its unique style.
Code points
A
fontIn typography, a font is traditionally defined as a quantity of sorts composing a complete character set of a single size and style of a particular typeface...
is a set of character shapes, or glyphs. For a computer to use a font then each glyph must be
assigned a
code pointIn character encoding terminology, a code point or code position is any of the numerical values that make up the code space . For example, ASCII comprises 128 code points in the range 0hex to 7Fhex, Extended ASCII comprises 256 code points in the range 0hex to FFhex, and Unicode comprises 1,114,112...
in a character set. When OCR-A was being standardized the usual character coding
was the American Standard Code for Information Interchange or ASCII. Not all of the glyphs of OCR-A fit into
ASCII, and for five of the characters there were alternate glyphs, which might have suggested the need for
a second
fontIn typography, a font is traditionally defined as a quantity of sorts composing a complete character set of a single size and style of a particular typeface...
. However, for convenience and efficiency all of the glyphs were expected to be accessible in a single
font using ASCII coding, with the additional characters placed at coding points that would otherwise
have been unused.
The modern descendant of ASCII is
UnicodeUnicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...
, also known as ISO 10646. Unicode contains ASCII and has
special provisions for OCR characters, so some implementations of OCR-A have looked to Unicode for
guidance on character code assignments.
Space, digits, and unaccented letters
All TrueType implementations of OCR-A use U+0020 for space,
U+0030 through U+0039 for the decimal digits,
U+0041 through U+005A for the unaccented upper case letters, and
U+0061 through U+007A for the unaccented lower case letters.
Regular characters
In addition to the digits and unaccented letters, many of the characters of OCR-A have obvious code points in ASCII.
Of those that do not, most, including all of OCR-A's accented letters, have obvious code points in Unicode.
Additional OCR-A code points based on ASCII and Unicode
| Name | | Glyph | Unicode |
| Exclamation Mark |
|
U+0021 |
| Quotation Mark |
|
U+0022 |
| Number Sign |
|
U+0023 |
| Dollar Sign |
|
U+0024 |
| Percent Sign |
|
U+0025 |
| Ampersand |
|
U+0026 |
| Apostrophe |
|
U+0027 |
| Left Parenthesis |
|
U+0028 |
| Right Parenthesis |
|
U+0029 |
| Asterisk |
|
U+002A |
| Plus Sign |
|
U+002B |
| Comma |
|
U+002C |
| Hyphen-Minus |
|
U+002D |
| Full Stop (Period) |
|
U+002E |
| Solidus (Slash) |
|
U+002F |
| Colon |
|
U+003A |
| Semicolon |
|
U+003B |
| Less-Than Sign |
|
U+003C |
| Equals Sign |
|
U+003D |
| Greater-Than Sign |
|
U+003E |
| Question Mark |
|
U+003F |
| Commercial At |
|
U+0040 |
| Left Square Bracket |
|
U+005B |
| Reverse Solidus (Backslash) |
|
U+005C |
| Right Square Bracket |
|
U+005D |
| Circumflex Accent |
|
U+005E |
| Low Line |
|
U+005F |
| Grave Accent |
|
U+0060 |
| Left Curly Bracket |
|
U+007B |
| Vertical Line |
|
U+007C |
| Right Curly Bracket |
|
U+007D |
| Tilde |
|
U+007E |
| Pound Sign (Sterling) |
|
U+00A3 |
| Yen Sign |
|
U+00A5 |
| Latin Capital Letter A with Dieresis |
|
U+00C4 |
| Latin Capital Letter A with Ring Above |
|
U+00C5 |
| Latin Capital Letter AE |
|
U+00C6 |
| Latin Capital Letter N with Tilde |
|
U+00D1 |
| Latin Capital Letter O with Stroke |
|
U+00D8 |
| Latin Small Letter O with Dieresis |
|
U+00F6 |
| Latin Small Letter U with Dieresis |
|
U+00FC |
| OCR Hook |
|
U+2440 |
| OCR Chair |
|
U+2441 |
| OCR Fork |
|
U+2442 |
Remaining Characters
John Sauter coded the remaining characters of OCR-A as follows:
Additional OCR-A Characters
| Name | | Glyph | Unicode |
Unicode Name |
| Character Erase |
|
U+007F |
Delete |
| Long Vertical Mark |
|
U+00A6 |
Broken Bar |
| Alternate Hyphen |
|
U+00AD |
Soft Hyphen |
| Alternate Apostrophe |
|
U+00B4 |
Acute Accent |
| Alternate Period |
|
U+00B7 |
Middle Dot |
| Alternate Comma |
|
U+00B8 |
Cedilla |
| Alternate Question Mark |
|
U+00BF |
Inverted Question Mark |
Exceptions
Some implementations do not use the above code point assignments for some characters.
PrecisionID
The PrecisionID implementation of OCR-A has the following non-standard code points:
- OCR Hook at U+007E
- OCR Chair at U+00C1
- OCR Fork at U+00C2
- Euro Sign at U+0080
Barcodesoft
The Barcodesoft implementation of OCR-A has the following non-standard code points:
- OCR Hook at U+0060
- OCR Chair at U+007E
- OCR Fork at U+005F
- OCR Belt Buckle at U+00DD
Moravia
The Moravia implementation of OCR-A has the following non-standard code points:
- OCR Hook at U+007E
- OCR Chair at U+00F0
- OCR Fork at U+005F
- Vertical Line at U+007C
IDAutomation
The IDAutomation implementation of OCR-A has the following non-standard code points:
- OCR Hook at U+007E
- OCR Chair at U+00C1
- OCR Fork at U+00C2
- OCR Belt Buckle at U+00C3
In addition, the IDAutomation implementation of OCR-A includes the Euro Sign character. The IDAutomation documentation does not specify the code point for the Euro Sign character. Since the code points for OCR Hook, OCR Chair and OCR Fork match those of PrecisionID, the IDAutomation OCR-A font may be a clone of the PrecisionID OCR-A font, in which case the Euro Sign would be coded as U+0080. The standard code point for Euro Sign is U+20AC.
OCR-A Extended
OCR-A Extended is an expanded version of the OCR-A font with 251 glyphs, 62 of which are composite glyphs, supporting the following languages in addition to English:
- French
- German
- Italian
- Portuguese
- Dutch
- Spanish
- Icelandic
- Norwegian
- Danish
- Finnish
- Swedish
- Albanian
Sellers of font standards
See also
- MICR
- Optical character recognition
Optical character recognition, usually abbreviated to OCR, is the mechanical or electronic translation of scanned images of handwritten, typewritten or printed text into machine-encoded text. It is widely used to convert books and documents into electronic files, to computerize a record-keeping...
- Westminster (typeface)
Westminster is a printing and display typeface designed to be read by computers. It was created in the 1960s and is named after the then Westminster Bank Limited , the United Kingdom bank that helped fund its production...
, another typeface designed to be machine-readable.
- OCR-B
The OCR-B is a set of monospace font developed in 1968 by Adrian Frutiger for Monotype by following the European Computer Manufacturer's Association standard. Its function was to facilitate the optical character recognition operations by specific electronic devices. It has been accepted as world...
External links