OCR-A

Last updated
OCR-A
OCR-A font.svg
Category Sans-serif
Designer(s) American Type Founders
Commissioned by American National Standards Institute
Date released1968 [1]
VariationsOCR-A Extended
Typeface specimen OCR A.svg
Sample

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 0.254 cm (0.10 inch) apart, and the reader required to accept any spacing between 0.2286 cm (0.09 inch) and 0.4572 cm (0.18 inch).

Contents

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. [3]

As metal type gave way to computer-based typesetting, Tor Lillqvist used Metafont to describe the OCR-A font.[ when? ] 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 and alien- and technology-themed dingbats, and available in six weights (Thin, Light, Regular, Medium, Bold, Black). [15]

Use

OCR-A on a German bank check. The ,  and characters are used to delimit particular fields in the machine-readable line (shown here partially redacted). Verrechnungsscheck, WestLB, Landeshauptkasse Dusseldorf, 2004.jpg
OCR-A on a German bank check. The ⑂, ⑀ and ⑁ characters are used to delimit particular fields in the machine-readable line (shown here partially redacted).

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[ how? ] for the films Crimson Tide and 13 Hours: The Secret Soldiers of Benghazi .

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 for guidance 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:

CharacterImageLocationIn ASCIIComments
£ OCR-A char Pound Sign.svg 0x23#Matches BS 4730, the United Kingdom variant of ISO 646. [19]
{ OCR-A char Left Curly Bracket.svg 0x28(Character name is still "LEFT PARENTHESIS", despite showing a brace. Usual left brace ASCII code 0x7B is omitted. [18]
} OCR-A char Right Curly Bracket.svg 0x29)Character name is still "RIGHT PARENTHESIS", despite showing a brace. Usual right brace ASCII code 0x7D is omitted. [18]
OCR-A char OCR Hook.svg 0x3C<
OCR-A char OCR Chair.svg 0x3E>
¥ OCR-A char Yen Sign.svg 0x5C\Matches JIS X 0201. Included in JIS X 9010, but omitted by ISO 2033. [18]
OCR-A char OCR Fork.svg 0x5D]

Additionally, the long vertical mark ( OCR-A char Long Vertical Mark.svg ) is encoded at 0x7C, corresponding to the ASCII vertical bar (|). [18]

Dedicated OCR-A characters in Unicode

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]
NameImageTextUnicode
OCR Hook OCR-A char OCR Hook.svg U+2440
OCR Chair OCR-A char OCR Chair.svg U+2441
OCR Fork OCR-A char OCR Fork.svg U+2442
OCR Inverted forkU+2443
OCR Belt buckleU+2444
OCR Bow tieU+2445

Space, digits, and unaccented letters

OCR-A digits OCR-A char digits.svg
OCR-A digits
OCR-A unaccented capital letters OCR-A char unaccented capital letters.svg
OCR-A unaccented capital letters
OCR-A unaccented small letters OCR-A char unaccented small letters.svg
OCR-A unaccented small 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, 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
NameGlyphUnicode
Exclamation Mark OCR-A char Exclamation Mark.svg U+0021
Quotation Mark OCR-A char Quotation Mark.svg U+0022
Number Sign OCR-A char Number Sign.svg U+0023
Dollar Sign OCR-A char Dollar Sign.svg U+0024
Percent Sign OCR-A char Percent Sign.svg U+0025
Ampersand OCR-A char Ampersand.svg U+0026
Apostrophe OCR-A char Apostrophe.svg U+0027
Left Parenthesis OCR-A char Left Parenthesis.svg U+0028
Right Parenthesis OCR-A char Right Parenthesis.svg U+0029
Asterisk OCR-A char Asterisk.svg U+002A
Plus Sign OCR-A char Plus Sign.svg U+002B
Comma OCR-A char Comma.svg U+002C
Hyphen-Minus OCR-A char Hyphen-Minus.svg U+002D
Full Stop (Period) OCR-A char Full Stop.svg U+002E
Solidus (Slash) OCR-A char Solidus.svg U+002F
Colon OCR-A char Colon.svg U+003A
Semicolon OCR-A char Semicolon.svg U+003B
Less-Than Sign OCR-A char Less-Than Sign.svg U+003C
Equals Sign OCR-A char Equals Sign.svg U+003D
Greater-Than Sign OCR-A char Greater-Than Sign.svg U+003E
Question Mark OCR-A char Question Mark.svg U+003F
Commercial At OCR-A char Commercial At.svg U+0040
Left Square Bracket OCR-A char Left Square Bracket.svg U+005B
Reverse Solidus (Backslash) OCR-A char Reverse Solidus.svg U+005C
Right Square Bracket OCR-A char Right Square Bracket.svg U+005D
Circumflex Accent OCR-A char Circumflex Accent.svg U+005E
Left Curly Bracket OCR-A char Left Curly Bracket.svg U+007B
Right Curly Bracket OCR-A char Right Curly Bracket.svg U+007D
Pound Sign (Sterling) OCR-A char Pound Sign.svg U+00A3
Yen Sign OCR-A char Yen Sign.svg U+00A5
Latin Capital Letter A with Dieresis OCR-A char A with Dieresis.svg U+00C4
Latin Capital Letter A with Ring Above OCR-A char A with Ring Above.svg U+00C5
Latin Capital Letter AE OCR-A char AE.svg U+00C6
Latin Capital Letter N with Tilde OCR-A char N with Tilde.svg U+00D1
Latin Capital Letter O with Dieresis OCR-A char o with Dieresis.svg U+00D6
Latin Capital Letter O with Stroke OCR-A char O with Stroke.svg U+00D8
Latin Capital Letter U with Dieresis OCR-A char u with Dieresis.svg U+00DC

Remaining characters

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

Additional OCR-A Characters
NameGlyphUnicodeUnicode Name
Long Vertical Mark OCR-A char Long Vertical Mark.svg U+007CVertical 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
NameGlyphUnicode
Low Line OCR-A char Low Line.svg U+005F
Grave Accent OCR-A char Grave Accent.svg U+0060
Vertical Line OCR-A char Vertical Line.svg U+007C
Tilde OCR-A char Tilde.svg 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]

  • 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: [24] [25]

  • OCR Hook at U+0060
  • OCR Chair at U+007E
  • OCR Fork at U+005F
  • Long Vertical Mark at U+007C (agrees with Linotype)
  • Character Erase at U+0008

Morovia

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

  • OCR Hook at U+007E (agrees with PrecisionID)
  • OCR Chair at U+00F0
  • OCR Fork at U+005F (agrees with Barcodesoft)
  • Long Vertical Mark at U+007C (agrees with Linotype)

IDAutomation

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

  • OCR Hook at U+007E (agrees with PrecisionID)
  • OCR Chair at U+00C1 (agrees with PrecisionID)
  • OCR Fork at U+00C2 (agrees with PrecisionID)
  • OCR Belt Buckle at U+00C3

MS-DOS OCR-A encoding

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

MS-DOS OCR-A [28]
0123456789ABCDEF
0x
1x [a]
2x  SP   ! " # $ % & ' ( ) * + , - . /
3x 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4x @ A B C D E F G H I J K L M N O
5x P Q R S T U V W X Y Z [ \ ] ^
2442
6x
2441
a b c d e f g h i j k l m n o
7x p q r s t u v w x y z { | }
2440
[b]
8x Ä Å
9x Æ Ö Ü £ ¥
Ax Ñ Ø
Bx
Cx
Dx
Ex
Fx

Characters not in Unicode: [29]

Sellers of font standards

See also

Notes

  1. Background on the OCR-A font from Adobe
  2. American National Standard Character Set for Optical Character Recognition (OCR-A) (PDF). ANSI X3.17-1981. American National Standards Institute, Inc. 1981. p. 3. 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.{{cite book}}: Unknown parameter |agency= ignored (help)
  3. 1 2 "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. Motivation for OCR-A from Microscan
  5. "Background on OCR from Embedded Software Engineering". Archived from the original on 2016-09-17. Retrieved 2012-09-01.
  6. The MetaFont sources for OCR-A from CTAN
  7. John Sauter's 2004 OCR-A font from those MetaFont sources
  8. The fonts-ocr-a Debian packages, based on John Sauter's SourceForge project
  9. Luc Devroye's account of his changes to John Sauter's implementation of OCR-A
  10. Matthew Skala's home page
  11. The mftrace Debian package
  12. Matthew Skala's 2012 OCR-A font from the MetaFont sources
  13. Hoefler, Jonathan. "Two Fools". Hoefler & Co. Retrieved 18 September 2021.
  14. "Technology, Fall '97". Rolling Stone . No. 774. 1997-11-27. p. 59.
  15. "OCR-X typeface". Maxitype. Retrieved 24 September 2023.
  16. "The History of OCR". Data Processing Magazine. 12: 46. 1970.
  17. "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."" (PDF). Archived from the original (PDF) on 2017-03-01. Retrieved 2015-07-30.
  18. 1 2 3 4 5 ISO/TC97/SC2 (1985-08-01). Japanese OCR-A Graphic Character Set (PDF). ITSCJ/IPSJ. ISO-IR-91.{{citation}}: CS1 maint: numeric names: authors list (link)
  19. BSI (1975-12-01). The set of graphic characters of the United Kingdom 7-bit data code (PDF). ITSCJ/IPSJ. ISO-IR-4.
  20. "Optical Character Recognition" (PDF). Unicode Consortium . Archived (PDF) from the original on 4 January 2023. Retrieved 4 January 2023.
  21. Linotype's OCR-A font: choose Character Map to see the characters and their coding
  22. Linotype's OCR-A Extended font: choose Character Map then Show all
  23. PrecisionID User Guide for the PrecisionID implementation of the OCR-A font
  24. Information page for the Barcode implementation of the OCR-A font
  25. Another source of information about the Barcode fonts
  26. Information page for the Morovia implementation of the OCR-A font
  27. Information page for the IDAutomation implementation of the OCR-A and OCR-B fonts
  28. "Code Page 876" (PDF). Archived from the original (PDF) on 2013-01-21.
  29. Alphanumeric character sets for optical recognition - Part I: Character set OCR-A - Shapes and dimensions of the printed image (preview) (PDF). pp. 2–3.

Related Research Articles

<span class="mw-page-title-main">ASCII</span> American character encoding standard

ASCII, an acronym for American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of technical limitations of computer systems at the time it was invented, ASCII has just 128 code points, of which only 95 are printable characters, which severely limited its scope. Modern computer systems have evolved to use Unicode, which has millions of code points, but the first 128 of these are the same as the ASCII set.

<span class="mw-page-title-main">Character encoding</span> Using numbers to represent text characters

Character encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers. The numerical values that make up a character encoding are known as "code points" and collectively comprise a "code space", a "code page", or a "character map".

<span class="mw-page-title-main">Unicode</span> Character encoding standard

Unicode, formally The Unicode Standard, is a text encoding standard maintained by the Unicode Consortium designed to support the use of text written in all of the world's major writing systems. Version 15.1 of the standard defines 149813 characters and 161 scripts used in various ordinary, literary, academic, and technical contexts.

Han unification is an effort by the authors of Unicode and the Universal Character Set to map multiple character sets of the Han characters of the so-called CJK languages into a single set of unified characters. Han characters are a feature shared in common by written Chinese (hanzi), Japanese (kanji), Korean (hanja) and Vietnamese.

Magnetic ink character recognition code, known in short as MICR code, is a character recognition technology used mainly by the banking industry to streamline the processing and clearance of cheques and other documents. MICR encoding, called the MICR line, is at the bottom of cheques and other vouchers and typically includes the document-type indicator, bank code, bank account number, cheque number, cheque amount, and a control indicator. The format for the bank code and bank account number is country-specific.

GB/T 2312-1980 is a key official character set of the People's Republic of China, used for Simplified Chinese characters. GB2312 is the registered internet name for EUC-CN, which is its usual encoded form. GB refers to the Guobiao standards (国家标准), whereas the T suffix denotes a non-mandatory standard.

The vertical bar, |, is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke, pipe, bar, or, vbar, and others.

<span class="mw-page-title-main">ArmSCII</span> Set of obsolete single-byte character encodings

ArmSCII or ARMSCII is a set of obsolete single-byte character encodings for the Armenian alphabet defined by Armenian national standard 166–9. ArmSCII is an acronym for Armenian Standard Code for Information Interchange, similar to ASCII for the American standard. It has been superseded by the Unicode standard.

The hyphen-minus symbol - is the form of hyphen most commonly used in digital documents. On most keyboards, it is the only character that resembles a minus sign or a dash so it is also used for these. The name hyphen-minus derives from the original ASCII standard, where it was called hyphen–(minus). The character is referred to as a hyphen, a minus sign, or a dash according to the context where it is being used.

<span class="mw-page-title-main">Zapf Dingbats</span> Dingbat typeface

ITC Zapf Dingbats is one of the more common dingbat typefaces. It was designed by the typographer Hermann Zapf in 1978 and licensed by International Typeface Corporation.

A Unicode font is a computer font that maps glyphs to code points defined in the Unicode Standard. The vast majority of modern computer fonts use Unicode mappings, even those fonts which only include glyphs for a single writing system, or even only support the basic Latin alphabet. Fonts which support a wide range of Unicode scripts and Unicode symbols are sometimes referred to as "pan-Unicode fonts", although as the maximum number of glyphs that can be defined in a TrueType font is restricted to 65,535, it is not possible for a single font to provide individual glyphs for all defined Unicode characters. This article lists some widely used Unicode fonts that support a comparatively large number and broad range of Unicode characters.

Symbol is one of the four standard fonts available on all PostScript-based printers, starting with Apple's original LaserWriter (1985). It contains a complete unaccented Greek alphabet and a selection of commonly used mathematical symbols. Insofar as it fits into any standard classification, it is a serif font designed in the style of Times New Roman.

<span class="mw-page-title-main">Universal Character Set characters</span> Complete list of the characters available on most computers

The Unicode Consortium and the ISO/IEC JTC 1/SC 2/WG 2 jointly collaborate on the list of the characters in the Universal Coded Character Set. The Universal Coded Character Set, most commonly called the Universal Character Set, is an international standard to map characters, discrete symbols used in natural language, mathematics, music, and other domains, to unique machine-readable data values. By creating this mapping, the UCS enables computer software vendors to interoperate, and transmit—interchange—UCS-encoded text strings from one to another. Because it is a universal map, it can be used to represent multiple languages at the same time. This avoids the confusion of using multiple legacy character encodings, which can result in the same sequence of codes having multiple interpretations depending on the character encoding in use, resulting in mojibake if the wrong one is chosen.

<span class="mw-page-title-main">Extended ASCII</span> Nickname for 8-bit ASCII-derived character sets

Extended ASCII is a repertoire of character encodings that include the original 96 ASCII character set, plus up to 128 additional characters. There is no formal definition of "extended ASCII", and even use of the term is sometimes criticized, because it can be mistakenly interpreted to mean that the American National Standards Institute (ANSI) had updated its ANSI X3.4-1986 standard to include more characters, or that the term identifies a single unambiguous encoding, neither of which is the case.

<span class="mw-page-title-main">OCR-B</span> Sans-serif typeface

OCR-B is a 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, originally for financial and bank-oriented uses. It was accepted as the world standard in 1973. It follows the ISO 1073-2:1976 (E) standard, refined in 1979. It includes all ASCII symbols, and other symbols needed in the bank environment. It is widely used for the human readable digits in UPC/EAN barcodes. It is also used for machine-readable passports. It shares that purpose with OCR-A, but it is easier for the human eye and brain to read and it has a less technical look than OCR-A.

Optical Character Recognition is a Unicode block containing signal characters for OCR and MICR standards.

<span class="mw-page-title-main">ISO 2047</span> Published standard

ISO 2047 is a standard for graphical representation of the control characters for debugging purposes, such as may be found in the character generator of a computer terminal; it also establishes a two-letter abbreviation of each control character. The graphics and two-letter codes are essentially unchanged from the 1968 European standard ECMA-17 and the 1973 American standard ANSI X3.32-1973. It became an ISO standard in 1975. It is also standardized as GB/T 3911-1983 in China, as KS X 1010 in Korea, and was enacted in Japan as "graphical representation of information exchange capabilities for character" JIS X 0209:1976.

The ISO 2033:1983 standard defines character sets for use with Optical Character Recognition or Magnetic Ink Character Recognition systems. The Japanese standard JIS X 9010:1984 is closely related.