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…
Best 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
Then the OP created a file
sck-drv.tex
:and another
sck-map.tex
:Then:
to produce
sck-rec.tex
and a bunch of.fd
,.pl
and.vpl
files. The.pl
files get converted to.tfm
:and the
.vpl
to.vf
:Then
produces
sck.map
and a scriptsck-pltotf.sh
which can be run usingsh
: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
:Testing
At this point, you can say
and it should work when you
latex
orpdflatex
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
: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 getSo 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
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 useIn the rest of this answer I refer to the selected directory as
<TEXMFLOCAL>
. Ifkpsewhich
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.
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:
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:
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: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.