Tools,

OCR fonts, tested

29

of 200 OCR-A lines Tesseract read exactly

Get the free fonts

Each OCR font has a free version

One made-up code, SN 0O1I-5S8B-2Z, in OCR-A, OCR-B, Arial and Courier New, and a made-up check line in MICR E-13B with its transit, dash and on-us symbols.
The same made-up code in each font. Compare 0 and O, 1 and I.

Google Fonts has none of these. Paid OCR-A and OCR-B come from Adobe Fonts and Linotype.

OCR-A reads worse than Arial

40 made-up lines a font: clean, small, fax, noisy and phone photo. 200 images a font.

Lines read exactly, of 200
Font Tesseract Apple Vision
OCR-A (Skala) 29 123
OCR-B (Skala) 121 159
OCR-B (CTAN) 122 160
Arial 162 179
Times New Roman 131 131
Courier New 107 147

Tesseract's top OCR-A misreads: 6 as b (54 of 110) and 2 as e (38 of 195). One clean line:

2010-01-12 $76,725.54 QTY 36
COL0-Ol-le $7?61725-54 ATTY 3b

OCR-A became a US standard in 1966, for the reading machines of its day. Neither engine I tested read it as well as Arial.

OCR-B is still the passport font

ICAO Doc 9303 sets passport lines in OCR-B, size 1, 10 characters an inch, with only 0 to 9, A to Z and <.

The free ocrb model for Tesseract knows only those 37 characters, so it read 0 of our lines exactly. For passport lines, see MRZ OCR in Python.

MICR: add the e13b model

MICR lines of 200
Way Exact Digits exact
Tesseract, e13b model 163 167
Apple Vision 0 3
Tesseract English 0 0

Get tessdata_best/e13b.traineddata from tesseractMICR (archived, BSD-3-Clause), then:

tesseract check.png - --psm 7 -l e13b --tessdata-dir .

It writes the symbols as A transit, B amount, C on-us and D dash, the same keys as GnuMICR. Fax and photo were its weak spots: 24 and 22 of 40.

Checks print the MICR line in magnetic ink or toner, for magnetic readers. The font alone is not enough.

Scans to text? Use the Actor

Our OCR Actor reads scanned PDFs and photos of documents into Markdown, tables included. I did not test it on these fonts.

Pages with their own text are free. A scanned page costs $0.006, and each run has a $0.00005 start fee at the default 1 GB.

How I tested it
  • make.py drew 40 made-up lines in each text font: codes with look-alike characters, dates with amounts, and short phrases. Only characters every font has. 40 made-up check lines in GnuMICR.
  • Each line at 42 pixels (10 point at 300 dpi), then 5 ways: clean, a third of the size, fax (1 bit, 204 by 98 dpi, specks), blur with noise and hard JPEG, and a phone photo (tilt, gray paper, uneven light).
  • Tesseract 5.5.4 (Homebrew English, page mode 7), one line an image. Apple Vision: accurate, no language correction. Exact: equal with spaces left out.
  • Tesseract returned no text for 30 of 40 Courier New photos.
What I did not test
  • Real passports, real checks, printers and magnetic readers.
  • CMC-7, John Sauter's OCR-A, and the paid fonts from Adobe and Linotype.
  • OCR engines other than Tesseract and Apple Vision.
Sources

Two ways to skip the work

Run it yourself. Our Apify Actor turns scanned PDFs into Markdown, tables included.

Try the Actor

Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.

Get one page free

Questions people ask

Is there a free OCR-B font?

Yes. The OCR-B outline fonts on CTAN may be used, changed and shared without limitation. Matthew Skala's OCR B is free too.

Does OCR read OCR-A better than other fonts?

Not in our test. Tesseract read 29 of 200 OCR-A lines exactly and 162 of 200 in Arial. Apple Vision read 123 and 179.

Can Tesseract read MICR E-13B?

Not with its English model: 0 of 200 lines. With the free e13b model, it read 163 of 200 MICR lines exactly.