[Tex/LaTex] How to install and use the ocr-a font

fontsinstallingpackages

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.

Best Answer

The following should do:

  1. Download the zip file http://mirrors.ctan.org/fonts/ocr-a.zip

  2. Unzip it: unzip ocr-a.zip

  3. Do cd ocr-a and edit the ocr10.mf, ocr12.mf and ocr16.mf files so that their last line reads input ocr-a instead of input ocra (this is a bug in the distribution)

  4. Do cd .. to get one level up

  5. Do 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 mktexlsr
    
  6. Try compiling the following plain TeX file (pdftex tryocra)

    %%% File name tryocra.tex
    \font\ocraten=ocr10
    \ocraten
    
    ABCDEFGHIJKLMNOPQRSTUVZ
    
    \bye
    

The result should be as follows

enter image description here


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.