2

I am trying to convert OTF font to be used with pdflatex, using otftotfm. Following direction from these links How do I use TrueType Fonts with PDFTeX using otftotfm? and Installing OpenType Fonts in LaTeX with the LCDF Typetools John Owens

However when trying manual conversion using this command:

otftotfm  --verbose -e ec  -fkern -fliga Ubuntu-R.ttf T1--Ubuntu--Regular

I got this error message:

warning: kpathsea: configuration file texmf.cnf not found in these directories: C:/Program Files (x86)/lcdf-typetools;C:/Program Files (x86)/lcdf-typetools/share/texmf-local/web2c;C:/Program Files (x86)/lcdf-typetools/share/texmf-dist/web2c;C:/Program Files (x86)/lcdf-typetools/share/texmf/web2c;C:/Program Files (x86)/lcdf-typetools/texmf-local/web2c;C:/Program Files (x86)/lcdf-typetools/texmf-dist/web2c;C:/Program Files (x86)/lcdf-typetools/texmf/web2c;C:/Program Files (x86);C:/Program Files (x86)/share/texmf-local/web2c;C:/Program Files (x86)/share/texmf-dist/web2c;C:/Program Files (x86)/share/texmf/web2c;C:/Program Files (x86)/texmf-local/web2c;C:/Program Files (x86)/texmf-dist/web2c;C:/Program Files (x86)/texmf/web2c;C://texmf-local/web2c;C:/;C://share/texmf-local/web2c;C://share/texmf-dist/web2c;C://share/texmf/web2c;C://texmf-local/web2c;C://texmf-dist/web2c;C://texmf/web2c. otftotfm: c:/usr/local/share/lcdf-typetools/glyphlist.txt: No such file or directory otftotfm: c:/usr/local/share/lcdf-typetools/texglyphlist.txt: No such file or directory otftotfm: encoding file ec.enc not found with kpathsea otftotfm: encoding file ec not found with kpathsea otftotfm: encoding 'ec' not found

Note: I am using MiKTeX 2.9 on Windows 10. The otftotfm was extracted from W32TEX pre-built binary lcdf-typetools-w32.tar, the BIN folders to program files and the SHARED folder to my local TEXMF . The location of local TEXMF according to:

kpsewhich -expand-var '$TEXMFHOME'

are in these location:

'{D:/USERS/YOSEDATA/Documents/texmf-koma-script-current,D:/USERS/YOSEDATA/Documents/LocalTEXmf}'

Do I have miss something ?

Or is it the otftotfm really not compatible with MiKTeX? Because it is seaching for texmf.cnf, which to my understanding are not use by MiKTeX.

On the other hand, is it possible to re-direct or configure otftotfm to look for its config which is in the local TEXMF ?

Any pointers will be highly appreciated.

  • 1
    I would suggest using XeLaTeX, it is much easier and barely slower. – fractal Dec 29 '19 at 08:42
  • Some times ago I've success following this istructions. – vi pa Dec 29 '19 at 10:50
  • With MiKTeX under Windows 7, I've already used it as an independent program, and installed the resulting .tfms in the relevant subdirectory of my LocalTeXMF by hand. – Bernard Dec 29 '19 at 11:10
  • Did you really get the error from your command line? I would have expected otftotfm to look for pathes only with the -a switch. – Ulrike Fischer Dec 29 '19 at 11:40
  • @Fractal Right now, I still defering to use XeTeX. For the known reason such as compatibility with microtype and better compiling speed of PDFTeX. – Yose Tuandrillo Dec 29 '19 at 12:54
  • @vi The instruction from the link you give is exclusively for truetype (TTF) font. I am also planning to convert Sabon as the serif font, which is an opentype OTF. Thats why i need to use otftotfm. – Yose Tuandrillo Dec 29 '19 at 12:59
  • @Ulrike Yes that was the error message I got, either using CMD prompt or from EMACS shell. Could it be something to do with updating to the latest pre-built binary? The version I used is otftotfm 2.108 from w32tex. I remember using otftotfm last year to convert a script font without any issue. I lose that old version. – Yose Tuandrillo Dec 29 '19 at 13:12
  • the question was not if you got this error, but if you really used the command you showed above. Beside this I can't test, I have texlive installed beside miktex and use otftotfm with it. – Ulrike Fischer Dec 29 '19 at 13:17
  • @Ulrike I did type the command, here is the screenshot of it otftotfm command prompt – Yose Tuandrillo Dec 29 '19 at 13:45
  • Try to set the path to the encoding file with --encoding-directory=dir. – Ulrike Fischer Dec 29 '19 at 13:51
  • @UlrikeFischer Nothing change, still the same message. otftotfm with encoding directory localTEXMF – Yose Tuandrillo Dec 29 '19 at 14:08
  • check with kpsewhich ec.enc where the file is and then use the correct path. – Ulrike Fischer Dec 29 '19 at 14:12
  • @UlrikeFischer I just checking the github page. I think the binary is hard coded to specific path. Here are the built instructions from the lcdf-typetools github. It said

    ./configure accepts the usual options; see INSTALL for details. Some of the typetools programs can link with additional libraries. Otftotfm can use the Kpathsea library for integration with TeX directories; if your version of this library is in a nonstandard place, supply ./configure with the --with-kpathsea=PREFIX option to find it.

    – Yose Tuandrillo Dec 29 '19 at 14:23

1 Answers1

1

I eventually have to build the otftotfm from github source and de-activating the kpathsea option:

./configure --without-kpathsea

Also due to differences between Windows and UNIX about winsock library, according to this report. Temporarily until Eddie Kohler can resolve the conflicting issues of supporting different platforms, the source have to manually compiled with -lws2_32:

g++  -g -O2   -o otftotfm.exe automatic.o dvipsencoding.o glyphfilter.o metrics.o otftotfm.o secondary.o uniprop.o util.o  ../libefont/libefont.a ../liblcdf/liblcdf.a -lws2_32

This compilation resolve the warning about kpathsea, but not the problem how otftotfm finding the necessary encoding files without kpathsea. The quick fix for me, is by copying the necessary .enc files to current folder.

Hopefully maybe someday Eddie Kohler or Akira Kakuto could provide better solutions for non TeXlive users.

  • Please try with autoinst for OTF fonts to LaTeX compatibility especially for Windows OS – MadyYuvi Dec 30 '19 at 11:28
  • The autoinst is just a wrapper script of LCDF tools. It won't work in my case where MiKTeX are used. MiKTeX differ from TeXlive in the use of Web2C and kpathsea. – Yose Tuandrillo Dec 30 '19 at 11:56