2

I have been looking around the web for guides on how to install a new font for LaTeX with PDFlatex. There are plenty of guides, but I have a hard time trying to follow them.

At the moment I have the following files and file structure:

-pwb(walbaum)
  -fonts
    -afm
      -abobe
        -walbaum
          <18x .afm files>
    -enc
      <empty>
    -map
      <1x .map file>
    -tfm
      -abobe
        -walbaum
          <60x .tfm files>
    -type1
      -abobe
        -walbaum
          <18x .pfb files>
    -vf
      -abobe
        -walbaum
          <30x .vf files>
  -tex
    -latex
      -abobe
        -walbaum
          <4x .fd files>
          <1x .sty file>

So what is the next steps to be able to use the font? Where should I put the files, etc? And will I be able to use it for math equations?

If you can explain it in a simple way, I would be glad.

Bonus info: I am using TexMaker and PDFLatex on a Mac.

  • You find instructions in appendix B of this paper: http://tug.org/TUGboat/tb32-1/tb100gregorio.pdf – egreg Aug 06 '14 at 09:19
  • 1
    Since you are using TeXLive, you will have to refresh your file database (texhash) and run updmap. But really: Use XeTeX or LuaTeX. Both do microtype, LuaTeX more so. – Martin Schröder Aug 06 '14 at 10:02
  • @MartinSchröder, wouldn't it be better to use updmap-sys if it is a single user system? – daleif Aug 06 '14 at 10:06
  • @daleif: Probably. :-) – Martin Schröder Aug 06 '14 at 10:09
  • @daleif Better to use it if it is a single user system; *essential* if it is a multi user system. (Unless installing the font in your personal tree but that is not recommended unless you don't have permission to do anything else. In which case no need to update the database either.) – cfr Aug 06 '14 at 21:48

2 Answers2

1

Essentielly you're missing a pwb.map file which describes the correspondence between the virtual fonts and the actual, type 1 fonts, so that pdflatex or dvips can use them. You install it in your_local_texmf\ fonts\map\adobe` (not abobe!). That done:

  1. Add to your local updmap.cfg this line: Map pwb.map
  2. Run texhash (TeXLive or MacTeX) or Refresh FNBD (MiKTeX)
  3. Run initexmf --mkmaps to refresh the databases of type 1 fonts

You can see more details in the excellent Font Installation Guide

Bernard
  • 271,350
  • I have a problem with no.3 in your procedure. When I run the command initexmf --mkmaps I get the following error: -bash: initexmf: command not found. – Christoffer Aug 06 '14 at 10:39
  • Oh! I gave the procedure for MiKTeX. For TeX Live and MacTeX, run (+ sudo if you're not under Windows) updmap-sys --enable Map=pwb.map, then runtexhash``. – Bernard Aug 06 '14 at 11:15
  • It seems like the terminal commands worked. However, when I try to use the font, I end up with this warning: Font shapeT1/pwb/m/n' undefined`.

    I am trying to load the font with \usefont{T1}{pwb}{m}{n}\selectfont

    Any ideas of what is wrong?

    – Christoffer Aug 06 '14 at 12:23
  • Mac OS X - Mavericks – Christoffer Aug 06 '14 at 12:35
  • Sudo? Do you have a t1pwb.fd file, and the relevant .vf files? – Bernard Aug 06 '14 at 12:38
  • I used sudo before the commands. With regard to the t1pwb.fd file, I have 4 different types of them: t1pwbj.fd, t1pwbx.fd, ts1pwbj.fd and ts1pwbx.fd. They are located in texlive -> texmf-local -> tex -> latex -> walbaum. I also have a bunch (30) of .vf files. They are called pwbb8c.vf (or something similar) and are located in texlive -> texmf-local -> fonts -> vf -> walbaum – Christoffer Aug 06 '14 at 14:17
  • Ok, I will leave it for now.. It seems to work (no warnings or error) when I use \usefont{T1}{pwbj}{m}{n}\selectfont or \usepackage[T1]{fontenc} \fontfamily{pwbj}\selectfont, but the font has not changed. Now it is just the default LaTeX font. – Christoffer Aug 06 '14 at 15:04
  • You should check if they're mentioned in dvips.map, pdftex.map and the like. It's thoses files that are used to load the real fonts. Also run maketexlsr and updmap-sys in verbose mode (--verbose) to see what really happens. – Bernard Aug 06 '14 at 16:02
  • Generally, I think you need to update the filename database before you run updmap-sys else it won't find the map file. But I'm not sure - I've never done it the other way. @Christoffer Where did you add the map line? That is, which file? Try updmap-sys --enable Map=pwb.map - this is generally easier for a single file addition as you don't need to worry about which file to edit. Also, if the directory /Users/YourUserName/.texliveYYYY exists where YYYY is the year of the version you are using, delete it. – cfr Aug 06 '14 at 21:55
0

Do you know of the fontspec package? According to the documentation it "allows users of either XeTeX or LuaTeX to load OpenType fonts in a LaTeX document. No font installation is necessary, and font features can be selected and used as desired throughout the document."

I use it with documents typeset using pdflatex on Mac, simply putting

\usepackage{fontspec}
\setmainsfont{Georgia}

to use Georgia, which is installed as a system font.

Geert F
  • 247