[OS X TeX] Fwd: [pdftex] using OpenType fonts in LaTeX

Ingo Reich ireich at mac.com
Mon Aug 1 12:11:51 CEST 2005

Hi Jonas,

I never used this initexmf command (or an equivalent to it). It looks as if this command were necessary to update the map-files in miktex ? so it's probably the equivalent to putting the map-files in the right folder and running "sudo updmap" in the gwtex setup, but I really don't know. Maybe it's of some help to describe what I did when I converted and installed my opentype fonts:

1. First have a look at the otftotfm manual: http://www.lcdf.org/~eddietwo/type/otftotfm.1.html
There's actually all the information you need. There is an automatic option "-a" mentioned which didn't work for me. But if you don't mind installing the fonts manually, do the following:

2. put all your opentype files into one folder, say "acaslon" (on the desktop or whereever you want) 

3. also put the file t1.enc in that folder

4. go to the terminal, change to that folder and run otftotfm on the files and with the options of your choice; if you're done, you find several .pfb, .vf, .enc-files, and a file called lcdftools.map in this directory; rename lcdftools.map to, say, acaslon.map. This map-file is absolutely crucial to the use of type1-fonts, and if you have a look at the filecontents you will see that this file references the .enc-files mentioned above, i.e., these are absolutely crucial, too.

5. Having generated the necessary files, you need to put them in the right places. I chose to put them in the texmf-folder in my personal library folder, which is in your case probably something like /jonas/library/texmf/

your .pfb files go to /jonas/library/texmf/fonts/type1/lcdftools/acaslon/
your .vf files go to /jonas/library/texmf/fonts/vf/lcdftools/acaslon/
your .tfm files go to /jonas/library/texmf/fonts/tfm/lcdftools/acaslon/
your .enc files go to /jonas/library/texmf/fonts/enc/lcdftools/
your acaslon.map file goes to /jonas/library/texmf/fonts/map/dvips/lcdftools/

6. you need to make tex aware of your new map-file, so put the line 
Map acaslon.map # Adobe Caslon Pro
in the file updmap.cfg (which is in the system's library folder in /library/teTeX/share/texmf.local/web2c/)

7. run "sudo updmap" in the Terminal (this then automatically updates all the files relevant for dvips, pdftex etc.)

8. Now for using the font in latex you still have to write the necessary .fd-files (always named according to the scheme FontencodingFontfamily.fd), a style-file, and a testfile. An .fd file I wrote for use with Adobe Caslon you can see below (this one is for hanging figures; you probably named the files differently, i.e. you need to change everything accordingly):

%Filename: t1acaslonj.fd

   [2005/03/02 font definitions for T1/Adobe Caslon Pro.]

\expandafter\ifx\csname acaslon at scale\endcsname\relax
   \let\acaslon at scale\@empty

   <-> \acaslon at scale T1--ACaslonPro-Regular--fonum
   <-> \acaslon at scale T1--ACaslonPro-Italic--fonum
   <-> \acaslon at scale T1--ACaslonPro-Regular--fonum--fsmcp
\DeclareFontShape{T1}{acaslonj}{m}{sl}{<->ssub * acaslonj/m/it}{}
   <-> \acaslon at scale T1--ACaslonPro-Semibold--fonum
   <-> \acaslon at scale T1--ACaslonPro-SemiboldItalic--fonum
   <-> \acaslon at scale T1--ACaslonPro-Semibold--fonum--fsmcp
\DeclareFontShape{T1}{acaslonj}{sb}{sl}{<->ssub * acaslonj/sb/it}{}
   <-> \acaslon at scale T1--ACaslonPro-Bold--fonum
   <-> \acaslon at scale T1--ACaslonPro-BoldItalic--fonum
   <-> \acaslon at scale T1--ACaslonPro-Bold--fonum--fsmcp
\DeclareFontShape{T1}{acaslonj}{b}{sl}{<->ssub * acaslonj/b/it}{}
\DeclareFontShape{T1}{acaslonj}{bx}{n}{<->ssub * acaslonj/b/n}{}
\DeclareFontShape{T1}{acaslonj}{bx}{it}{<->ssub * acaslonj/b/it}{}
\DeclareFontShape{T1}{acaslonj}{bx}{sl}{<->ssub * acaslonj/b/it}{}
\DeclareFontShape{T1}{acaslonj}{bx}{sc}{<->ssub * acaslonj/b/sc}{}
\DeclareFontShape{T1}{acaslonj}{eb}{n}{<->ssub * acaslonj/b/n}{}
\DeclareFontShape{T1}{acaslonj}{eb}{it}{<->ssub * acaslonj/b/it}{}
\DeclareFontShape{T1}{acaslonj}{eb}{sl}{<->ssub * acaslonj/b/it}{}
\DeclareFontShape{T1}{acaslonj}{eb}{sc}{<->ssub * acaslonj/b/sc}{}
%%%%%%% End of file %%%%%%%%%%%%%%%%%%%%%%%

The stylefile I use is the following one:

%%%%%%%%%%%%%%%%%%%% acaslon.sty %%%%%%%%%%%%%%%
\ProvidesPackage{acaslon}[2005/14/02 v1.0 Adobe Caslon Pro]
\define at key{acaslon}{scale}[1]{\def\acaslon at scale{s*[#1]}}
\renewcommand{\textos}[1]{{\fontfamily{acaslonj}\selectfont #1}}
\renewcommand{\textln}[1]{{\fontfamily{acaslon}\selectfont #1}}
\renewcommand{\textsw}[1]{{\fontfamily{acaslonx}\selectfont #1}}
\newcommand{\textor}[1]{{\fontfamily{acaslono}\selectfont #1}}
%%%%%%%%%%%% end of file %%%%%%%%%%%%%%%%%%

nfssext.sty is a stylefile mentioned in the fontinstallationguide; whith the stylefile above, however, it is strictly speaking not necessary to load nfssext.sty, since font selection commands like \textos are redefined in the stylefile itself.

9. Put all these files in the directory /jonas/library/texmf/tex/latex/fonts/lcdftools/acaslon/
then you should be able to run a testfile like the following (the option scale allows you to scale the font; this is especially nice in case of sans serif fonts to match the x-height of the serif font):


\noindent \textbf{Hier \textit{stünde} die Überschrift}\hfill \textbf{12\textln{34}567890}\\
Das ist ein erster \textit{Text} gesetzt in \textsc{Caslon}.

Adobe Caslon enthält einen roman-Zeichensatz: Zeichensatz;\\
Adobe Caslon enthält einen semibold-Zeichensatz: \textbf{Zeichensatz};\\
Adobe Caslon enthält einen bold-Zeichensatz: \texteb{Zeichensatz};\\
Adobe Caslon verfügt über hängende Ziffern, über Swash-Varianten (\textsw{Das ist fast
ein Act}) und Ornamente (\textor{q w e r t z u i o p a s d f g h i j} )

%%%%%%%%%% end of file %%%%%%%%%%%%%%%%%%%%%%%

Hope this helps.
Best, Ingo


Am 29.07.2005 um 23:44 schrieb Jonas Wellendorf:

Thank you very much for your help!

Since you have been so kind as to help me, I take the liberty of asking another question. According to the web page one should issue the following commands

cd C:\localtexmf
initexmf -u
initexmf --mkmaps
initexmf -u
cd C:\texmf
initexmf -u
initexmf --mkmaps
initexmf -u

As far as I can understand the initexmf-command is a miktex specific command, which command shall I use instead?

Another thing: The otftotfm command left me with a number of *.enc files (the first of which is named a_2pdmfd.enc), can I trash these files or should I place them somewhere?

Thank you once again,



Den 29. jul. 2005 kl. 11.43 skrev Ingo Reich:

Hi Jonas,
I write you off-list since I attach a file: put the attached file in /usr/library/texmf/fonts/enc/dvips/base/ or, if that doesn't work, in the folder where your open type fonts reside and which you want to use as the working folder for the font conversion. Then just write "t1" where you wrote "texnansx" below. Also change every occurrence of LY1 to T1 (this is strictly speaking not necessary, but why would one want to name a T1-encoded font LY1-?;-). This worked for me.
Hope this helps,

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>

More information about the macostex-archives mailing list