OCR-A explained

OCR-A
Style:Sans-serif
Releasedate:1968[1]
Creator:American Type Founders
Commissioned By:American National Standards Institute
Variations:OCR-A Extended

OCR-A is a font issued in 1966[2] and first implemented in 1968.[3] A special font was needed in the early days of computer optical character recognition, when there was a need for a font that could be recognized not only by the computers of that day, but also by humans.[4] OCR-A uses simple, thick strokes to form recognizable characters.[5] The font 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 Institute (ANSI)as ANSI X3.17-1981. X3.4 has since become the INCITS and the OCR-A standard is now called ISO 1073-1:1976.

Implementations

In 1968, American Type Founders 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 Metafont to describe the OCR-A font. That definition was subsequently improved by Richard B. Wales. Their work is available from CTAN.[6]

To make the free version of the font more accessible to users of Microsoft Windows, John Sauter converted the Metafont definitions to TrueType using potrace and FontForge in 2004.[7] In 2007, Gürkan Sengün created a Debian package from this implementation.[8] In 2008. Luc Devroye corrected the vertical positioning in John Sauter's implementation, and fixed the name of lower case z.[9]

Independently, Matthew Skala[10] used mftrace[11] to convert the Metafont definitions to TrueType format in 2006. In 2011 he released a new version created by rewriting the Metafont definitions to work with METATYPE1, generating outlines directly without an intermediate tracing step. On September 27, 2012, he updated his implementation to version 0.2.[12]

In addition to these free implementations of OCR-A, there are also implementations sold by several vendors. As a joke, Tobias Frere-Jones in 1995 created Estupido-Espezial, a redesign with swashes and a long s. It was used in a "technology"-themed section of Rolling Stone.[13] [14]

Maxitype designed the OCR-X typeface, based on the OCR-A typeface with OpenType features - alien- and technology-themed dingbats - available in six weights (Thin, Light, Regular, Medium, Bold, Black).[15]

Use

Although optical character recognition technology has advanced to the point where such simple fonts are no longer necessary,[16] the OCR-A font has remained in use. Its usage remains widespread in the encoding of checks around the world. Some lock box companies still insist that the account number and amount owed on a bill return form be printed in OCR-A.[17] Also, because of its unusual look, it is sometimes used in advertising and display graphics.

Notably, it is used for the subtitles in films and television series such as Blacklist and for the main titles in The Pretender. Additionally, OCR-A is used for the films Crimson Tide and .

Code points

A font is a set of character shapes, or glyphs. For a computer to use a font, each glyph must be assigned a code point 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 font. 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 Unicode, 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 forguidance on character code assignments.

Pre-Unicode standard representation

The ISO standard ISO 2033:1983, and the corresponding Japanese Industrial Standard JIS X 9010:1984 (originally JIS C 6229-1984), define character encodings for OCR-A, OCR-B and E-13B. For OCR-A, they define a modified 7-bit ASCII set (also known by its ISO-IR number ISO-IR-91) including only uppercase letters, digits, a subset of the punctuation and symbols, and some additional symbols.[18] Codes which are redefined relative to ASCII, as opposed to simply omitted, are listed below:

Character Image Location In ASCII Comments
£ 0x23 Matches BS 4730, the United Kingdom variant of ISO 646.[19]
0x29 ) Character name is still "RIGHT PARENTHESIS", despite showing a brace. Usual right brace ASCII code 0x7D is omitted.
0x3C <
0x3E >
¥ 0x5C \ Matches JIS X 0201. Included in JIS X 9010, but omitted by ISO 2033.
0x5D ]

Additionally, the long vertical mark is encoded at 0x7C, corresponding to the ASCII vertical bar (|).

Dedicated OCR-A characters in Unicode

See main article: Optical Character Recognition (Unicode block).

The following characters have been defined for control purposes and are now in the "Optical Character Recognition" Unicode range 2440–245F:

Dedicated OCR-A code points based on ASCII and Unicode[20]
Name Image TextUnicode
OCR Hook U+2440
OCR Chair U+2441
OCR Fork U+2442
OCR Inverted fork U+2443
OCR Belt buckle U+2444
OCR Bow tie U+2445

Space, digits, and unaccented letters

All 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, andU+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
Left Curly Bracket U+007B
Right Curly Bracket U+007D
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 Dieresis U+00D6
Latin Capital Letter O with Stroke U+00D8
Latin Capital Letter U with Dieresis U+00DC

Remaining characters

Linotype[21] coded the remaining characters of OCR-A as follows:

Additional OCR-A Characters
Name Glyph Unicode Unicode Name
Long Vertical Mark U+007C Vertical Line

Additional characters

The fonts that descend from the work of Tor Lillqvist and Richard B. Wales define four characters not in OCR-A to fill out the ASCII character set. These shapes use the same style as the OCR-A character shapes. They are:

Additional ASCII characters
Name Glyph Unicode
Low Line U+005F
Grave Accent U+0060
Vertical Line U+007C
Tilde U+007E

Linotype also defines additional characters.[22]

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:[23]

Barcodesoft

The Barcodesoft implementation of OCR-A has the following non-standard code points:[24] [25]

Morovia

The Morovia implementation of OCR-A has the following non-standard code points:[26]

IDAutomation

The IDAutomation implementation of OCR-A has the following non-standard code points:[27]

MS-DOS OCR-A encoding

The MS-DOS OCR-A encoding is code page 876.

Characters not in Unicode:[28]

Sellers of font standards

See also

External links

Notes and References

  1. https://typekit.com/fonts/ocr-a-std Background on the OCR-A font from Adobe
  2. Book: American National Standard Character Set for Optical Character Recognition (OCR-A) . American National Standards Institute, Inc . 1981 . ANSI X3.17-1981 . 3 . National Institute of Standards and Technology. The OCR-A character set for optical character recognition was first developed in the United States in 1961 as a numeric font only. In 1966 an alphanumeric font which contained 57 characters, including the existing numeric font, 4 abstract characters, and only capital letters, was issued. The revised standard was entitled American National Standard Character Set for Optical Character Recognition, ANSI X3.17-1966..
  3. Web site: OCR A . In 1968, American Type Founders 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 read by a machine, but it is slightly more difficult for the human eye to read. OCR-A follows the 1981 standard set by the American National Standards Institute (ANSI), X-3.17-1981 (size I). The same design is also specified for the German DIN 66008 standard. OCR-B was designed in 1968 by Adrian Frutiger for Monotype. This design pushes the limits of the optical reader, but is easier for people to read. OCR-B’s construction follows the ISO 1073/II-1976 (E) standard, with 1979 corrections (letterpress design, size I). Both OCR-A and OCR-B have “alternate” versions, which have the standard ISO-Adobe character set instead of the more limited OCR character set. .
  4. http://www.microscan.com/en-us/technology/opticalcharacterrecognition.aspx Motivation for OCR-A from Microscan
  5. Web site: Background on OCR from Embedded Software Engineering . 2012-09-01 . https://web.archive.org/web/20160917080003/http://embeddedengineeringgroup.com/ESE/auto-id.html . 2016-09-17 . dead .
  6. https://ctan.org/pkg/ocr-a The MetaFont sources for OCR-A from CTAN
  7. http://sourceforge.net/project/showfiles.php?group_id=121297 John Sauter's 2004 OCR-A font from those MetaFont sources
  8. https://packages.debian.org/search?keywords=fonts-ocr-a The fonts-ocr-a Debian packages, based on John Sauter's SourceForge project
  9. http://luc.devroye.org/fonts-48501.html Luc Devroye's account of his changes to John Sauter's implementation of OCR-A
  10. https://ansuz.sooke.bc.ca/ Matthew Skala's home page
  11. http://packages.debian.org/mftrace The mftrace Debian package
  12. https://tsukurimashou.org/ocr.php.en Matthew Skala's 2012 OCR-A font from the MetaFont sources
  13. Web site: Hoefler . Jonathan . Two Fools . Hoefler & Co. . 18 September 2021.
  14. Technology, Fall '97 . . 774 . 1997-11-27 . 59.
  15. Web site: OCR-X typeface. Maxitype. 24 September 2023.
  16. Data Processing Magazine . The History of OCR . 12 . 1970 . 46.
  17. Web site: Description of a lockbox service, note "The bill contains an invoice and a statement with patient information contained in a scannable Optical Character Recognition (OCR) line. The OCR line is similar in appearance to that found on a credit card statement or telephone bill." . 2015-07-30 . 2017-03-01 . https://web.archive.org/web/20170301092812/https://www.pnc.com/content/dam/pnc-com/pdf/corporateandinstitutional/Treasury%20Management/Healthcare/078_Patient_Pay_Lockbox_3-13.pdf . dead .
  18. 91 . Japanese OCR-A Graphic Character Set . ISO/TC97/SC2 . ISO/IEC JTC 1/SC 2#History . 1985-08-01.
  19. The set of graphic characters of the United Kingdom 7-bit data code . BSI . BSI Group . 1975-12-01 . 4.
  20. Web site: 4 January 2023 . Optical Character Recognition . live . https://web.archive.org/web/20230104125606/https://www.unicode.org/charts/PDF/U2440.pdf . 4 January 2023 . Unicode Consortium.
  21. https://www.linotype.com/1085573/ocr-a-regular-product.html Linotype's OCR-A font: choose Character Map to see the characters and their coding
  22. https://www.linotype.com/900974/ocr-a-extended-product.html Linotype's OCR-A Extended font: choose Character Map then Show all
  23. http://www.precisionid.com/tutorials/OCR_Font_User_Manual.pdf PrecisionID User Guide for the PrecisionID implementation of the OCR-A font
  24. http://www.barcode-soft.com/ocr_font.aspx Information page for the Barcode implementation of the OCR-A font
  25. http://www.ozgrid.com/barcodes/ocr-font.htm Another source of information about the Barcode fonts
  26. http://morovia.com/font/ocr.asp Information page for the Morovia implementation of the OCR-A font
  27. http://www.idautomation.com/ocr-a-and-ocr-b-fonts/#product-information Information page for the IDAutomation implementation of the OCR-A and OCR-B fonts
  28. Book: Alphanumeric character sets for optical recognition - Part I: Character set OCR-A - Shapes and dimensions of the printed image (preview). 2–3.