Installing Open Type Fonts in MiKTeX

In what follows, I have used TEXMF and LOCALTEXMF to generically refer to the directories c:\texmf and c:\localtexmf, respectively, as this is what they are on my machine.
  1. Go to Adobe's website and download an open type font. For the Sabon font, I went here: http://store.adobe.com/type/browser/P/P_1392.html

    Once I downloaded the font and license files, I had the following font files:

    	SabonLTStd-Roman.otf
    	SabonLTStd-Italic.otf
    	SabonLTStd-Bold.otf
    	SabonLTStd-BoldItalic.otf
    
  2. Go to http://www.lcdf.org/~eddietwo/type/index.html and download the otftotfm and other LCDF utilities.

  3. I wasn't able to get the automation (- a) option of otftotfm to work, so I opted for a manual approach. For this I placed the four .otf files together in the same directory as the binary/executable LCDF files. I also copied TEXMF\fonts\enc\dvips\fontname\texnansx.enc into this directory.

  4. Next I ran four commands:
    	otftotfm -fkern -fliga -e texnansx SabonLTStd-Roman.otf psbr8a
    	otftotfm -fkern -fliga -e texnansx SabonLTStd-Italic.otf psbri8a
    	otftotfm -fkern -fliga -e texnansx SabonLTStd-Bold.otf psbb8a
    	otftotfm -fkern -fliga -e texnansx SabonLTStd-BoldItalic.otf psbbi8a
    
    The first command produced output:
    	I had to round some heights by 18.5000000 units.
    	I had to round some depths by 2.0000000 units.
    	cfftot1: glyph 'E': warning: complex flex hint replaced with curves
    	cfftot1: (This Type 2 format font contains flex hints prohibited by Type 1.
    	cfftot1: I've safely replaced them with ordinary curves.)
    	psbr8a SabonLTStd-Roman "AutoEnc_pe3rdlbr2pgfwkjmgm3iyj626a ReEncodeFont" <[a_pe3rdl.enc 
    as well as files:
    
    	a_pe3rdl.enc
    	SabonLTStd-Roman.pfb
    	psbr8a.tfm
    
    The other three commands produced similar output and the following files:
    	SabonLTStd-Italic.pfb
    	psbri8a.tfm
    	SabonLTStd-Bold.pfb
    	psbb8a.tfm
    	SabonLTStd-BoldItalic.pfb
    	psbbi8a.tfm
    
  5. The .pfb files I copied to the directory LOCALTEXMF\fonts\type1\adobe\sabon (here I had to create a few of the directories in this path).

    The .tfm files I copied to the directory LOCALTEXMF\fonts\tfm\adobe\sabon

    The file a_pe3rdl.enc I copied to the directory LOCALTEXMF\fonts\enc\dvips\adobe

  6. I then created the file LOCALTEXMF\tex\Sabon\LY1psb.fd with the following contents:
    	\ProvidesFile{LY1psb.fd}[Adobe Sabon font definitions]
    	\DeclareFontFamily{LY1}{psb}{}
    	\DeclareFontShape{LY1}{psb}{m}{n}{ <-> psbr8a }{}
    	\DeclareFontShape{LY1}{psb}{m}{it}{ <-> psbri8a }{}
    	\DeclareFontShape{LY1}{psb}{b}{n}{ <-> psbb8a }{}
    	\DeclareFontShape{LY1}{psb}{b}{it}{ <-> psbbi8a }{}
    
    	\endinput
    
  7. I next created the file psb.map with the following contents (taken from the otftotfm output above):
    	psbr8a SabonLTStd-Roman "AutoEnc_pe3rdlbr2pgfwkjmgm3iyj626a ReEncodeFont" <[a_pe3rdl.enc <SabonLTStd-Roman.pfb
    	psbri8a SabonLTStd-Italic "AutoEnc_pe3rdlbr2pgfwkjmgm3iyj626a ReEncodeFont" <[a_pe3rdl.enc <SabonLTStd-Italic.pfb
    	psbb8a SabonLTStd-Bold "AutoEnc_pe3rdlbr2pgfwkjmgm3iyj626a ReEncodeFont" <[a_pe3rdl.enc <SabonLTStd-Bold.pfb
    	psbbi8a SabonLTStd-BoldItalic "AutoEnc_pe3rdlbr2pgfwkjmgm3iyj626a ReEncodeFont" <[a_pe3rdl.enc <SabonLTStd-BoldItalic.pfb
    
    and put copies of this file in both of the following directories:
    	LOCALTEXMF\dvips\config
    	LOCALTEXMF\fonts\map\dvips\sabon
    
  8. In order to get the font to properly embed in PDF files generated via dvips and ps2pdf, I had to update the file TEXMF\web2c\updpmap.cfg by adding the following at the bottom:
    	# sabon
    	Map psb.map
    
  9. I refreshed the MiKTeX file name database (which is done from MiKTeX). I also did this:
    	cd LOCALTEXFM
            initexmf --mkmaps
    
  10. In my LaTeX document(s), I can now use the font as follows:
    	\usepackage[LY1]{fontenc}
    	\newcommand{\sabon}{\usefont{LY1}{psb}{m}{n}}
    	\newcommand{\sabonIt}{\usefont{LY1}{psb}{m}{it}}
    	\newcommand{\sabonBold}{\usefont{LY1}{psb}{b}{n}}
    	\newcommand{\sabonBoldIt}{\usefont{LY1}{psb}{b}{it}}
    
    and
    	{\sabon This is sabon}
    	{\sabonIt This is italicised}
    	{\sabonBold This is bold}
    	{\sabonBoldItalic This is bold and italicised}
    

[Home] [Mail]

Last Modified: Friday, 11-May-2012 07:57:28 NDT