9

I'm trying to use a .otf font I downloaded with pdflatex. I know that I could just use XeLaTeX to make it work, but I want to stick with pdflatex.

Having downloaded the latest version of LCDF-Typetools, I tried running

otftotfm -a -e texnansx FedraSerifBPro-Book.otf

on one of the four files of the font family, but got the error

otftotfm: encoding 'texnansx' not found

even though I have that file, as shown by running

kpsewhich texnansx.enc

Up until this point I placed the otf files in my home tex tree, i.e. in

~/Library/texmf/fonts/opentype/FedraSerifBPro

but even moving the folder to the texlive tree, i.e. in

/usr/local/texlive/2019/texmf-dist/fonts/opentype/FedraSerifBPro

I still get the error saying that the encoding cannot be found.

I suspect that maybe I don't have the kpathsea path finder. Is there a way to see if this is the problem, or am I doing something else wrong?

noibe
  • 2,084
  • https://github.com/ummels/fedraserif ? – Oleg Lobachev Jun 09 '19 at 18:34
  • I used that font just as an example, I'm more interested in the general procedure than in getting this specific font to work. – noibe Jun 09 '19 at 18:36
  • 1
    otftotfm doesn't know about kpathsea, which should it? Beside this, better use the autoinst script. – Ulrike Fischer Jun 09 '19 at 18:42
  • I got the idea that otftotfm uses kpathsea from this post. In the log file, the first line says otftotfm: encoding file ec.enc found with kpathsea at /opt/tex/texlive/qstex/texmf-dist/fonts/enc/dvips/base/ec.enc – noibe Jun 09 '19 at 18:46
  • Also, if I'm not wrong autoinst uses otftotfm, so the problem would remain. – noibe Jun 09 '19 at 18:48
  • I have two otftotfm: one in the texlive 2019 bin folder and one that I downloaded at some time and installed manually. The one in texlive 2019 finds the encoding file without problem, the other not. – Ulrike Fischer Jun 12 '19 at 09:55
  • @UlrikeFischer I think I have both as well, since I installed lcdftypetools (which contains otftotfm) through homebrew before realising that otftotfm is already present in texlive. How do I know which one I'm using, and how can I switch between the two? – noibe Jun 12 '19 at 10:06
  • no idea, I'm on windows. There I use where to check the path, and set the path variable to switch. – Ulrike Fischer Jun 12 '19 at 10:10
  • I had indeed two versions of otftotfm, I uninstalled the one from homebrew and now it seems to work as it should. If you want you can make an answer out of these comments, so that I can accept it. – noibe Jun 12 '19 at 10:25

2 Answers2

11

I always use autoinst. For example:

 autoinst FedraSansStd-Book.otf FedraSansStd-Bold.otf FedraSansStd-BoldItalic.otf FedraSansStd-BookItalic.otf

creates all font files for use with pdflatex and save it automatically in the correct directories for the local tree. E.g.: in usr/local/texlive/texmflocal/latex/FedraSansStd with the files

-rw-r--r-- 1 abcd abcd 1933 Jun  9 21:07 FedraSansStd.sty
-rw-r--r-- 1 abcd abcd 3568 Jun  9 21:07 LY1FedraSansStd-LF.fd
-rw-r--r-- 1 abcd abcd 3631 Jun  9 21:07 LY1FedraSansStd-OsF.fd
-rw-r--r-- 1 abcd abcd 2059 Jun  9 21:07 LY1FedraSansStd-Sup.fd
-rw-r--r-- 1 abcd abcd 3631 Jun  9 21:07 LY1FedraSansStd-TLF.fd
-rw-r--r-- 1 abcd abcd 3694 Jun  9 21:07 LY1FedraSansStd-TOsF.fd
-rw-r--r-- 1 abcd abcd 3568 Jun  9 21:07 OT1FedraSansStd-LF.fd
-rw-r--r-- 1 abcd abcd 3631 Jun  9 21:07 OT1FedraSansStd-OsF.fd
-rw-r--r-- 1 abcd abcd 2059 Jun  9 21:07 OT1FedraSansStd-Sup.fd
-rw-r--r-- 1 abcd abcd 3631 Jun  9 21:07 OT1FedraSansStd-TLF.fd
-rw-r--r-- 1 abcd abcd 3694 Jun  9 21:07 OT1FedraSansStd-TOsF.fd
-rw-r--r-- 1 abcd abcd 3527 Jun  9 21:07 T1FedraSansStd-LF.fd
-rw-r--r-- 1 abcd abcd 3590 Jun  9 21:07 T1FedraSansStd-OsF.fd
-rw-r--r-- 1 abcd abcd 2037 Jun  9 21:07 T1FedraSansStd-Sup.fd
-rw-r--r-- 1 abcd abcd 3590 Jun  9 21:07 T1FedraSansStd-TLF.fd
-rw-r--r-- 1 abcd abcd 3653 Jun  9 21:07 T1FedraSansStd-TOsF.fd
-rw-r--r-- 1 abcd abcd 2026 Jun  9 21:07 TS1FedraSansStd-LF.fd
-rw-r--r-- 1 abcd abcd 2059 Jun  9 21:07 TS1FedraSansStd-OsF.fd
-rw-r--r-- 1 abcd abcd 2059 Jun  9 21:07 TS1FedraSansStd-TLF.fd
-rw-r--r-- 1 abcd abcd 2092 Jun  9 21:07 TS1FedraSansStd-TOsF.fd
-rw-r--r-- 1 abcd abcd 2015 Jun  9 21:07 UFedraSansStd-Orn.fd

and also for the tfm, pfb a.s.o. always in a subdirectory lcdeftools

Display Name
  • 46,933
user187802
  • 16,850
  • Mh something's not working for me here. After I launch the autoinst I get like twenty times is a row the warning otftotfm: too many arguments, and at the end of those warnings I get [WARNING] 'otftotfm' returned non-zero; something's wrong!'. The original question was about otftotfm; using autoinst isn't going to work if I have problems with otftotfm, since it uses it. – noibe Jun 10 '19 at 08:49
  • I too prefer autoinst, which is one of a best .... – MadyYuvi Jun 10 '19 at 11:11
4

I wouldn't expect an externally installed otftotfm to know about kpathsea, and a test confirmed this:

I have two otftotfm: one in the texlive 2019 bin folder and one that I downloaded at some time and installed manually.

The one in texlive 2019 finds the encoding file without problem, the other not.

Ulrike Fischer
  • 327,261