Can someone help to install the ocr-a font? I'm using fedora, I'm trying to find a proper tutorial but cannot find a good one.
Asked
Active
Viewed 2,766 times
8
-
See: http://www.tug.dk/FontCatalogue/ocr-a/ – Marco Daniel Apr 01 '13 at 17:45
-
1Welcome to TeX.SX. – Claudio Fiandrino Apr 01 '13 at 17:52
1 Answers
10
The following should do:
Download the zip file http://mirrors.ctan.org/fonts/ocr-a.zip
Unzip it:
unzip ocr-a.zipDo
cd ocr-aand edit theocr10.mf,ocr12.mfandocr16.mffiles so that their last line readsinput ocr-ainstead ofinput ocra(this is a bug in the distribution)Do
cd ..to get one level upDo the following commands in super user mode (I'll use
sudo, assuming a Bash shell)sudo mkdir -p $(kpsewhich -var-value=TEXMFLOCAL)/fonts/source sudo mv ocr-a $(kpsewhich -var-value=TEXMFLOCAL)/fonts/source/ sudo mktexlsrTry compiling the following plain TeX file (
pdftex tryocra)%%% File name tryocra.tex \font\ocraten=ocr10 \ocraten ABCDEFGHIJKLMNOPQRSTUVZ \bye
The result should be as follows

A ZIP file with the fonts converted to Type1 and OpenType, along with a style file for getting them with LaTeX is available here, with instructions for installation on a Unix system with TeX Live.
egreg
- 1,121,712
-
But when I need to write one piece of text, should i do it like \ocraten{test} ?? – Noor Apr 02 '13 at 11:01
-
-
-
-
Be careful: in MikTex 2.9, the first solution works if you copy the files in the correct folder. It happens for me that even if MikTex is installed in AppData/local/Programs/MikTex2.9, the metafont program was working in AppData/local/MikTex/2.9. When I placed the file over there, it finally work. – Denis Cousineau Sep 17 '18 at 21:25
-
@DenisCousineau I never support MiKTeX on Windows, for character incompatibility. Today I had to plug in a USB key into a Windows computer for printing a file (no other way to access the printer) and finding how to access the file system took me a few minutes.
;-)– egreg Sep 17 '18 at 21:30 -
I followed the first set of instructions, and am able to compile the example plain-TeX document with the alphabet. However, using the
ocrpackage or using\font\ocrten=ocr10in a LaTeX document, the font only seems to have numerals 0-9 and no letters. Why does this happen? – Scott Colby Nov 14 '21 at 07:52 -
-
@egreg, that is what I was using,
\usepackage[ocr-a]{ocr} ... \begin{document}\ocrfamily abcdefg123456789 ...results inMissing character: There is no a in font ocr10!etc. for all the letters but none of the numbers. – Scott Colby Nov 17 '21 at 04:01 -
@ScottColby I have the same and get no error and no missing character. Maybe you have a wrong version of the fonts? – egreg Nov 17 '21 at 09:37
-
:/ this was my fault. My input had lower-case letters, which OCR-B has, but OCR-A doesn't. Changing to upper case made the missing letters appear! Thank you. – Scott Colby Nov 19 '21 at 01:59
-
As a quick question: if there is an error in the distribution, why is it not corrected nearly 10 years later? – Denis Cousineau Jun 07 '23 at 01:10
-
@DenisCousineau The author/maintainer should do it, but the last intervention was in 1989. The package has a restrictive licence that doesn't allow replacing an inactive maintainer. – egreg Jun 07 '23 at 07:48