6

I am experimenting with the use of alternate fonts with LaTeX using pdfTeX (no XeTeX nor LuaTeX).

I have installed FontPro with Adobe Reader's Minion & Myriad Pro, plus some Cronos Pro files I had; small family (no semibold) but with all optical sizes (text, capt, subh, disp). Before building, I have renamed my CronosPro files as required by the instructions. The installation seemed to work fine.

However, I get fatal errors when I try using the CronosPro package with the slides or opticals options.

Non-working example:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[opticals]{CronosPro}

\begin{document}
\sffamily
\LARGE Text
\end{document}

This gives:

[...]
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+573/600 --dpi 573
CronosPro-Subh-Base-ac
mktexpk: don't know how to create bitmap font for CronosPro-Subh-Base-ac.
mktexpk: perhaps CronosPro-Subh-Base-ac is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.

!pdfTeX error: /usr/texbin/pdflatex (file CronosPro-Subh-Base-ac): Font
CronosPro-Subh-Base-ac at 573 not found
 ==> Fatal error occurred, no output PDF file produced!

Again, I did put a CronosPro-Subh.otf in the otf subfolder of FontPro before running make all. Any suggestions about what might be going on?

  • Why don't you simply use xelatex. Then you can use the otf font version directly. Put the files into your systems font directory and use: \usepackage{fontspec} \setmainfont{CronosPro-Regular} – user2478 Dec 9 '14 at 20:44
  • @Herbert : Thanks, I will look into it someday; right now I'm more interested in making this work. – fudo Dec 9 '14 at 22:53
  • @DG' : Yes, I did run clean before makeall, the last time. And yes, I did run updmap-sys --enable Map=CronosPro.map after install. In fact, I don't get any errors if I don't use slides nor opticals. – fudo Dec 9 '14 at 22:56
  • 2
    @DG' I would not recommend installing fonts in TEXMFHOME or using updmap. It leads to all kinds of headaches later on. Installation should be to TEXMFLOCAL with updmap-sys unless a user simply has no other option. For testing, you can just have all of the font files in a single directory, including the map file, and use \pdfmapfile{+CronosPro.map} in the preamble of your test document, which should also be in the same directory. – cfr Dec 10 '14 at 21:59
  • 2
    Glad you got it sorted ;). – cfr Dec 12 '14 at 21:35
6

In order to use the new fonts, you need to ensure 2 things: that all of the files can be found, and that the fonts are correctly listed in the map files which TeX uses to match different bits of font information.

I recommend the following procedure if installing on TeX Live:

  1. Test the fonts prior to installing them. To do this, put all the files in one directory (or make copies or symbolic links or whatever), create a test file using the new package and add \pdfmapfile{+CronosPro.map} before the \usepackage... command. Compile with pdfLaTeX and check that the results are as expected.

    • If this step fails, you are in trouble. Don't bother installing the fonts as moving them around won't make them suddenly work. Either the package is faulty or you made a mistake when converting the fonts or preparing the package for installation. Either way, go back to the README or installation instructions, and ask somebody for help if necessary.
  2. Install into TEXMFLOCAL unless you do not have permission to do so. If you are not sure where this is, run kpsewhich --var TEXMFLOCAL to find out. On a Unix-ish system, with upstream's installer, this will be /usr/local/texlive/texmf-local unless you changed the default.

    1. Put the files in the relevant places in TEXMFLOCAL. For example for type1 fonts from vendor packaged as packagename:

      • .tfm files in fonts/tfm/vendor/packagename
      • .pfb files in fonts/type1/vendor/packagename
      • .map files in fonts/map/dvips/packagename
      • .fd files and .sty files [if applicable] in tex/latex/packagename
      • documentation in doc/fonts/packagename [if applicable]
      • .vf files in fonts/vf/vendor/packagename [if applicable]
      • .enc files in fonts/enc/dvips/packagename [if applicable]
      • .afm files in fonts/afm/vendor/packagename [if applicable]
      • source files in source/fonts/packagename [if applicable]
    2. Tell TeX about the new files by running mktexlsr $(kpsewhich --var TeXMFLOCAL)).

    3. Install the new map file fragment(s) by running updmap-sys --enable Map=<mapfilename>.map e.g. updmap-sys --enable Map=CronosPro.map.

      • Pay attention to the output. If the map files are not updated or updmap-sys can't find something, you need to diagnose and correct the problem. If you need help, be sure to include the errors and explain the steps you followed previously.
  3. Now move your test file to a clean directory, delete the line which adds the map file manually, and rerun it. It should work as before.

    • If all is well, go to step 5.

    • If not, go to step 4.

  4. Things to check/try:

    • If LaTeX complains that it cannot find a file, run kpsewhich <filename> to check. If it still can't find it, look for the file. Did you install it in the right place? If not, move it appropriately. After making any necessary adjustments, go to step 2.2. Check the file is found before progressing to step 2.3.

    • If LaTeX can't find a font at all (i.e. isn't complaining about a specific file, complete with extension, but just can't find a named font, which won't have an extension), get the value of kpsewhich -var-value TEXMFSYSVAR and look in TEXMFSYSVAR/fonts/map/pdftex/updmap/. Do the files here include that font? If not, check the .map file you installed earlier. Is the font listed there? If not, something more serious is wrong. But if it is, try rerunning steps 2.2 and 2.3.

    • Do you have a directory name .texliveYYYY in your home directory, where YYYY is the edition of your TeX Live installation? For example, for TL 2014 on a GNU/Linux system this would be /home/username/.texlive2014 if username is your user name. If you have such a directory, rename or delete it. (Only delete if you are 100% confident you have the correct directory.)

    • If it just isn't helping, running updmap-sys --disable <mapfile>.map and then updmap-sys --enable Map=<mapfile>.map may do the trick.

    • If it is now working, go to step 5.

    • If not, update your question or (if you are not the OP) ask a new question, detailing the results of the above steps. Be sure to include the output from step 2.3 and the specific errors you get when you try to compile your test file.

  5. You are done!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.