# TeXLive- installing a Type - 1 font

I got a .zip file with some font files inside it - they look like this:

• MO-DLRG_.PFB
• MO-DLRG_.PFM

I put these two files into a folder ~/texmf/fonts/type1/sckr and then I ran commands:

sudo texhash ~/texmf
sudo updmap-sys --enable Map=fontname.map
sudo texhash ~/texmf

But when I try to include my fonts in my dcument which looks like this:

\documentclass[a4paper,10pt]{article}

\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{sckr}

\begin{document}
\thispagestyle{empty}

{\sckr primer}

\end{document}

I get an error saying that sckr.sty not found. Can anyone help me with this one?

ADD: So I only got .pfb and .pfm files from a vendor, but in a Lehman's tutorial it says that I also need .afm file.

Now I copied my files in a directory and renamed them to be sckr.pfb and sckr.pfm (I only watched out that name is shorter than 8 chars like sugested in fontname.pdf written by Berry) and didnt bother with other renaming conventions.

then I added this fontinst file named pfb-drv.tex into the same folder:

\input fontinst.sty
\recordtransforms{psb-rec.tex}
\latinfamily{psb}{}
\endrecordtransforms
\bye

And I ran it using command

tex psb-drv.tex

And what I get is a lot of errors:

[ziga@Ziga-laptop sckr (normal)]$tex psb-drv.tex This is TeX, Version 3.14159265 (TeX Live 2014/Arch Linux) (preloaded format=tex) (./psb-drv.tex (/usr/share/texmf-dist/tex/fontinst/base/fontinst.sty No file fontinst.rc. ) INFO> parse family <psb><> INFO> to make LaTeX font shape <psb,m,n,> seek psbr8r.mtx INFO> to make LaTeX font shape <psb,m,sc,> seek psbrc8r.mtx INFO> to make LaTeX font shape <psb,m,sl,> seek psbro8r.mtx INFO> to make LaTeX font shape <psb,m,it,> seek psbri8r.mtx INFO> to make LaTeX font shape <psb,m,n,c> seek psbr8rn.mtx INFO> to make LaTeX font shape <psb,m,sc,c> seek psbrc8rn.mtx INFO> to make LaTeX font shape <psb,m,sl,c> seek psbro8rn.mtx INFO> to make LaTeX font shape <psb,m,it,c> seek psbri8rn.mtx INFO> to make LaTeX font shape <psb,m,n,> seek psbk8r.mtx INFO> to make LaTeX font shape <psb,m,sc,> seek psbkc8r.mtx INFO> to make LaTeX font shape <psb,m,sl,> seek psbko8r.mtx INFO> to make LaTeX font shape <psb,m,it,> seek psbki8r.mtx INFO> to make LaTeX font shape <psb,m,n,c> seek psbk8rn.mtx INFO> to make LaTeX font shape <psb,m,sc,c> seek psbkc8rn.mtx INFO> to make LaTeX font shape <psb,m,sl,c> seek psbko8rn.mtx INFO> to make LaTeX font shape <psb,m,it,c> seek psbki8rn.mtx INFO> to make LaTeX font shape <psb,b,n,> seek psbb8r.mtx INFO> to make LaTeX font shape <psb,b,sc,> seek psbbc8r.mtx INFO> to make LaTeX font shape <psb,b,sl,> seek psbbo8r.mtx INFO> to make LaTeX font shape <psb,b,it,> seek psbbi8r.mtx INFO> to make LaTeX font shape <psb,b,n,c> seek psbb8rn.mtx INFO> to make LaTeX font shape <psb,b,sc,c> seek psbbc8rn.mtx INFO> to make LaTeX font shape <psb,b,sl,c> seek psbbo8rn.mtx INFO> to make LaTeX font shape <psb,b,it,c> seek psbbi8rn.mtx INFO> to make LaTeX font shape <psb,sb,n,> seek psbs8r.mtx INFO> to make LaTeX font shape <psb,sb,sc,> seek psbsc8r.mtx INFO> to make LaTeX font shape <psb,sb,sl,> seek psbso8r.mtx INFO> to make LaTeX font shape <psb,sb,it,> seek psbsi8r.mtx INFO> to make LaTeX font shape <psb,sb,n,c> seek psbs8rn.mtx INFO> to make LaTeX font shape <psb,sb,sc,c> seek psbsc8rn.mtx INFO> to make LaTeX font shape <psb,sb,sl,c> seek psbso8rn.mtx INFO> to make LaTeX font shape <psb,sb,it,c> seek psbsi8rn.mtx INFO> to make LaTeX font shape <psb,db,n,> seek psbd8r.mtx INFO> to make LaTeX font shape <psb,db,sc,> seek psbdc8r.mtx INFO> to make LaTeX font shape <psb,db,sl,> seek psbdo8r.mtx INFO> to make LaTeX font shape <psb,db,it,> seek psbdi8r.mtx INFO> to make LaTeX font shape <psb,db,n,c> seek psbd8rn.mtx INFO> to make LaTeX font shape <psb,db,sc,c> seek psbdc8rn.mtx INFO> to make LaTeX font shape <psb,db,sl,c> seek psbdo8rn.mtx INFO> to make LaTeX font shape <psb,db,it,c> seek psbdi8rn.mtx INFO> to make LaTeX font shape <psb,mb,n,> seek psbm8r.mtx INFO> to make LaTeX font shape <psb,mb,sc,> seek psbmc8r.mtx INFO> to make LaTeX font shape <psb,mb,sl,> seek psbmo8r.mtx INFO> to make LaTeX font shape <psb,mb,it,> seek psbmi8r.mtx INFO> to make LaTeX font shape <psb,mb,n,c> seek psbm8rn.mtx INFO> to make LaTeX font shape <psb,mb,sc,c> seek psbmc8rn.mtx INFO> to make LaTeX font shape <psb,mb,sl,c> seek psbmo8rn.mtx INFO> to make LaTeX font shape <psb,mb,it,c> seek psbmi8rn.mtx INFO> to make LaTeX font shape <psb,eb,n,> seek psbc8r.mtx INFO> to make LaTeX font shape <psb,eb,sc,> seek psbcc8r.mtx INFO> to make LaTeX font shape <psb,eb,sl,> seek psbco8r.mtx INFO> to make LaTeX font shape <psb,eb,it,> seek psbci8r.mtx INFO> to make LaTeX font shape <psb,eb,n,c> seek psbc8rn.mtx INFO> to make LaTeX font shape <psb,eb,sc,c> seek psbcc8rn.mtx INFO> to make LaTeX font shape <psb,eb,sl,c> seek psbco8rn.mtx INFO> to make LaTeX font shape <psb,eb,it,c> seek psbci8rn.mtx INFO> to make LaTeX font shape <psb,eb,n,> seek psbh8r.mtx INFO> to make LaTeX font shape <psb,eb,sc,> seek psbhc8r.mtx INFO> to make LaTeX font shape <psb,eb,sl,> seek psbho8r.mtx INFO> to make LaTeX font shape <psb,eb,it,> seek psbhi8r.mtx INFO> to make LaTeX font shape <psb,eb,n,c> seek psbh8rn.mtx INFO> to make LaTeX font shape <psb,eb,sc,c> seek psbhc8rn.mtx INFO> to make LaTeX font shape <psb,eb,sl,c> seek psbho8rn.mtx INFO> to make LaTeX font shape <psb,eb,it,c> seek psbhi8rn.mtx INFO> to make LaTeX font shape <psb,eb,n,> seek psbx8r.mtx INFO> to make LaTeX font shape <psb,eb,sc,> seek psbxc8r.mtx INFO> to make LaTeX font shape <psb,eb,sl,> seek psbxo8r.mtx INFO> to make LaTeX font shape <psb,eb,it,> seek psbxi8r.mtx INFO> to make LaTeX font shape <psb,eb,n,c> seek psbx8rn.mtx INFO> to make LaTeX font shape <psb,eb,sc,c> seek psbxc8rn.mtx INFO> to make LaTeX font shape <psb,eb,sl,c> seek psbxo8rn.mtx INFO> to make LaTeX font shape <psb,eb,it,c> seek psbxi8rn.mtx INFO> to make LaTeX font shape <psb,ub,n,> seek psbu8r.mtx INFO> to make LaTeX font shape <psb,ub,sc,> seek psbuc8r.mtx INFO> to make LaTeX font shape <psb,ub,sl,> seek psbuo8r.mtx INFO> to make LaTeX font shape <psb,ub,it,> seek psbui8r.mtx INFO> to make LaTeX font shape <psb,ub,n,c> seek psbu8rn.mtx INFO> to make LaTeX font shape <psb,ub,sc,c> seek psbuc8rn.mtx INFO> to make LaTeX font shape <psb,ub,sl,c> seek psbuo8rn.mtx INFO> to make LaTeX font shape <psb,ub,it,c> seek psbui8rn.mtx INFO> to make LaTeX font shape <psb,l,n,> seek psbl8r.mtx INFO> to make LaTeX font shape <psb,l,sc,> seek psblc8r.mtx INFO> to make LaTeX font shape <psb,l,sl,> seek psblo8r.mtx INFO> to make LaTeX font shape <psb,l,it,> seek psbli8r.mtx INFO> to make LaTeX font shape <psb,l,n,c> seek psbl8rn.mtx INFO> to make LaTeX font shape <psb,l,sc,c> seek psblc8rn.mtx INFO> to make LaTeX font shape <psb,l,sl,c> seek psblo8rn.mtx INFO> to make LaTeX font shape <psb,l,it,c> seek psbli8rn.mtx Font definitions written on 8rpsb.fd. Font definitions written on ot1psb.fd. Font definitions written on t1psb.fd. Font definitions written on ts1psb.fd. Font transformation records written on psb-rec.tex. ) No pages of output. Transcript written on psb-drv.log. I am sure I wrote something wrong... • Running texhash on a personal TEXMF tree is unnecessary and entirely pointless. This tree is searched directly (unless you've changed the default) and does not use a database. Installing fonts into your personal TEXMF tree is somewhat dubious. However, the main problem here is that you have not installed anything else. For example, you don't mention installing a sckr.sty file, so it is not surprising it cannot be found. You also would need a .map and .tfm files, at least. You must have got a warning when you ran updmap-sys?? Don't ignore errors and warnings! – cfr Sep 4 '15 at 21:29 • To expand slightly: if this is just an arbitrary type1 font you cannot use it with (pdf)TeX without preparing a set of support files for it. This includes at least .tfm and .map files. Usually also .fd, .sty and, possibly, .vf and/or .enc. Without these files, the font is useless. Do you have these files or only the .pfb and pfm files? Oh, and you don't need sudo to write to your personal texmf tree unless you have a very odd configuration indeed. And don't use utf8x rather than utf8 if you can help it. – cfr Sep 4 '15 at 21:31 • I provide some references in this answer. The Font Installation Guide explains the process required to create the support files needed to use an arbitrary type1 font with (pdf)LaTeX. – cfr Sep 4 '15 at 21:42 • You can probably follow the basic tutorial in the Font Installation Guide without reading anything else, even if it advises you to. Definitely don't read fontinst's manual or fontname. The former is probably very good but I can't say for sure as I've never been able to decipher it. The latter is useful but only for reference. Most of it is lists of font names. – cfr Sep 5 '15 at 23:13 • – cfr Sep 6 '15 at 0:21 ## 1 Answer I'm going to start recording this for the sake of posterity, should posterity turn out to be interested ;. This works for me (as discussed in chat) but the OP is still having a few fontinst teething troubles. This answer assumes a Unix-ish system such as GNU/Linux, OS X, BSD or similar. It will not work unmodified on Windows. # Introduction To use a font with (pdf)(La)TeX, you need a good number of support files in addition to the type1 font itself. This answer is based on the initial, basic fontinst installation method covered in the first tutorial in The Font Installation Guide. In most cases, it will produce a working, though not entirely perfect, result. In other cases, it may fail or it may produce as perfect a result as is possible given the nature of the font. For the font which is the subject of this question, it should produce a working result. # Prepare font support package Start by renaming the .pfm sckr.pfm and the .pfb sckr.pfb. Then pf2afm sckr mv sckr.afm sckr8a.afm mv sckr.pfb sckr8a.pfb Then the OP created a file sck-drv.tex: \input fontinst.sty \needsfontinstversion{1.926} \recordtransforms{sck-rec.tex} \latinfamily{sck}{} \endrecordtransforms \bye and another sck-map.tex: \input finstmsc.sty \resetstr{PSfontsuffix}{.pfb} \adddriver{dvips}{sck.map} \adddriver{pltotf}{sck-pltotf.sh} \input sck-rec.tex \donedrivers \bye Then: tex sck-drv.tex to produce sck-rec.tex and a bunch of .fd, .pl and .vpl files. The .pl files get converted to .tfm: for i in *.pl do pltotf$i
done

and the .vpl to .vf:

for i in *.vpl
do
vptovf $i done Then tex sck-map.tex produces sck.map and a script sck-pltotf.sh which can be run using sh: sh sck-pltotf.sh You can now delete the *.pl *.vpl sck-rec.tex sck-pltotf.sh etc. as they are no longer needed. Then you can make a package, sck.sty: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{DAX}[2015/09/06 v1.0 DAX] \DeclareOption{default}{% \renewcommand{\sfdefault}{sck}} \ProcessOptions \DeclareRobustCommand{\sckfamily}{% \fontseries{m}% \fontshape{n}% \fontfamily{sck}% \selectfont} \DeclareTextFontCommand{\sck}{\sckfamily} \endinput # Testing At this point, you can say \documentclass{article} \pdfmapfile{+sck.map} \usepckage[T1]{fontenc}% optional \usepackage{sck} \begin{document} \sck{Some text} {\sckfamily More text including off, office, affluent, fluorine, infinitude, --- and -- \slshape This is fake, oblique. The results will not be as good as a designed italic or oblique shape. \upshape\scshape You may also get faked small-caps. Again, the results won't be as good as real small-caps. \upshape\itshape Italics should give us the oblique as a substitute. \par} \end{document} and it should work when you latex or pdflatex the test file, provided your test file is in the same directory as all the font files you've created. Don't proceed to installation until you are happy with the results. # Installation When you are happy with the results of testing, you can install the font files. For reasons I explain here, it is not recommended to install into your personal TEXMF tree unless you have no choice. Instead, install into your system-wide local TEXMF tree. You can find out where this is using kpsewhich: kpsewhich -var TEXMFLOCAL If you are using upstream's TeX Live and haven't changed texmf.cnf, then this will likely return a single directory. For example, I get /usr/local/texlive/texmf-local So this is the directory I would use. If you are using a packaged version of TeX Live - from a GNU/Linux distro, for example - then you might get more than one directory. For example, on Arch Linux, you would get /usr/local/share/texmf:/usr/share/texmf Thanks to the OP for this information. In this case, you should pick the directory which is not managed by your Linux distro's package manager. In most cases, this will begin with /usr/local. So, on Arch Linux, you'd use /usr/local/share/texmf In the rest of this answer I refer to the selected directory as <TEXMFLOCAL>. If kpsewhich returned exactly one result, you can substitute$(kpsewhich -var TEXMFLOCAL). Otherwise, substitute the relevant directory path appropriately.

The remaining steps may need to be done with root privileges, depending on your system's configuration.

Very likely, you will need to create some directories here. This is normal.

mkdir -p <TEXMFLOCAL>/fonts/type1/public/sck
mkdir -p <TEXMFLOCAL>/fonts/tfm/public/sck
mkdir -p <TEXMFLOCAL>/fonts/afm/public/sck
mkdir -p <TEXMFLOCAL>/fonts/vf/public/sck
mkdir -p <TEXMFLOCAL>/fonts/map/dvips/sck
mkdir -p <TEXMFLOCAL>/tex/latex/sck
mkdir -p <TEXMFLOCAL>/source/fonts/sck

You can use something other than sck for the directory name - just substitute appropriately.

Now, from the working directory in which you prepared the font files:

mv *.pfb *.pfm <TEXMFLOCAL>/fonts/type1/public/sck/
mv *.tfm <TEXMFLOCAL>/fonts/tfm/public/sck/
mv *.afm <TEXMFLOCAL>/fonts/afm/public/sck/
mv *.vf <TEXMFLOCAL>/fonts/vf/public/sck/
mv *.map <TEXMFLOCAL>/fonts/map/dvips/sck/
mv *.fd *.sty <TEXMFLOCAL>/tex/latex/sck/
mv sck-drv.tex sck-map.tex <name of test file>.tex <notes> <TEXMFLOCAL>/source/fonts/sck/

Putting things in source is optional and just for reference. I find it useful so I can find things.

Now, you need to update the file name database:

mktexlsr <TEXMFLOCAL>

There are two ways to enable the .map file fragment. One has certain advantages but I'm not sure how it works with Arch's packages, so I suggest the second:

updmap-sys --enable Map=sck.map

# Retest

You should now be able to drop any root privileges and recompile your test document from another directory, commenting out or deleting the \pdfmapfile... line, to get the same results.

• It didnt work for me, because I had files named sck8a.pfm and sck8a.pfb before using pf2afm. I allso used comand in different manner than you. I used it like this pf2asm sck8a.pfb and not like you did pf2asm sckr - mind the file extension and the name which was different in my case. Should renaming before or afterwar pf2afm have any influence on the sucess? Maybee I got errors because I provided a file extension and you didn't. – 71GA Sep 6 '15 at 8:55
• @71GA Please see edit. – cfr Sep 6 '15 at 11:38
• Well when I use command kpsewhich -var TEXMFLOCAL I get this /usr/local/share/texmf:/usr/share/texmf and the script therefore fails. It works if I manually replace kpsewhich -var TEXMFLOCAL with either /usr/local/share/texmf or /usr/share/texmf. With kind regards. – 71GA Sep 6 '15 at 21:50
• @71GA The <TEXMFLOCAL> is supposed to be substituted with whichever directory is the right one. I don't want to automate selection if there are multiple directories because the first one might not be the correct choice. So I think it is better to explain how you should pick a directory if kpsewhich gives you more than one. This means that the scripts cannot be copy-pasted without modification but it is a false convenience to provide scripts which can be if I can't be sure they'll do something reasonable. – cfr Sep 6 '15 at 22:40
• general info about how (La)TeX processes font files: tex.stackexchange.com/a/119488/8666 – Ioannis Filippidis Jan 15 '16 at 5:32