The low level font selection commands are best avoided in documents when possible. For a one-off special effect, where you just want something special for a title or something, they are satisfactory. For anything else, they should be avoided.
Let's see what
\documentclass{article}
\usepackage{fourier}
\begin{document}
This text has the expected size.
\fontfamily{futs}\selectfont This text has the expected size.
{\fontfamily{put}\selectfont This text has not the expected size.}
\end{document}
actually does on the console:
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
This sets up the point sizes for a default 10pt font.
(/usr/local/texlive/2016/texmf-dist/tex/latex/fourier/fourier.sty
Setting aside what fourier
does for a minute, it loads some additional things:
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/textcomp.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ts1enc.def))
Output uses T1 font encoding. The TS1 encoding is loaded to support text-mode symbols.
(/usr/local/texlive/2016/texmf-dist/tex/latex/fourier/fourier-orns.sty))
These are fourier
embellishments and ornaments.
(./prawf.aux) (/usr/local/texlive/2016/texmf-dist/tex/latex/fourier/fmlfutm.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/fourier/fmsfutm.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/fourier/fmxfutm.fd)
These are font definitions for maths. They use non-standard encodings: FML, FMS and FMX, roughly equivalent to OML, OMS and OMX, which are standard maths encodings.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ts1cmr.fd)
This is reading the font definitions for Computer Modern Roman's text symbol (TS1) encoding.
(/usr/local/texlive/2016/texmf-dist/tex/latex/fourier/t1futs.fd)
This reads the font definitions for futs
in the T1 font encoding.
(/usr/local/texlive/2016/texmf-dist/tex/latex/psnfss/t1put.fd)
This reads the font definitions for put
in the T1 font encoding. This is part of psnfss
, so it is provided by the LaTeX support for the base postscript 35 fonts.
[1{/usr/local/texlive/2016/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
This is the active main mapping file which pdfTeX uses to find the postscript fonts corresponding to the TeX fonts requested. The file tells pdfTeX something about which `.pfb` file to use and how to figure out where in the `.pfb` file a requested character's glyph can be found.
{/usr/local/texlive/2016/texmf-dist/fonts/enc/dvips/base/8r.enc}
This is a raw encoding for 8-bit fonts (with 256 slots). You don't use this encoding directly, but it is sometimes used as an intermediate encoding, to translate a standard postscript encoding.
</usr/local/texlive/2016/texmf-dist/fonts/type1/adobe/utopia/putr8a.pfb>
This is the actual PFB file used in the document: putr8a
means that this is Adobe Utopia regular and that the file uses the Adobe 8-bit encoding. This doesn't contain enough information to use the font because it really only contains the pictures of the characters (glyphs). It doesn't contain information about how to combine them, for example. (Postscript type1 fonts are supplied in 2 parts: typically, a PFB file and an Adobe Font Metric (AFM) file.)
So why does TeX load put
rather than futs
? Let's look at the font definition file for futs
, t1futs.fd
:
%Filename: t1futs.fd
%Created by: tex build-fourier
%Created using fontinst v1.926
%THIS FILE SHOULD BE PUT IN A TEX INPUTS DIRECTORY
\ProvidesFile{t1futs.fd}
[2004/03/02 Fontinst v1.926 font definitions for T1/futs.]
\DeclareFontFamily{T1}{futs}{\providecommand {\SetFourierSpace }{}}
%Filename: t1futs.fd
%Created by: tex build-fourier
%Created using fontinst v1.926
%THIS FILE SHOULD BE PUT IN A TEX INPUTS DIRECTORY
\ProvidesFile{t1futs.fd}
[2004/03/02 Fontinst v1.926 font definitions for T1/futs.]
\DeclareFontFamily{T1}{futs}{\providecommand {\SetFourierSpace }{}}
\DeclareFontShape{T1}{futs}{m}{n}{% medium upright
<-> futr8t
}{\SetFourierSpace}
\DeclareFontShape{T1}{futs}{m}{it}{% medium italic
<-> futri8t
}{\SetFourierSpace}
\DeclareFontShape{T1}{futs}{b}{n}{% bold upright
<-> futb8t
}{\SetFourierSpace}
\DeclareFontShape{T1}{futs}{b}{it}{% bold italic
<-> futbi8t
}{\SetFourierSpace}
\DeclareFontShape{T1}{futs}{m}{sc}{% medium small-caps
<-> futrc8t
}{\SetFourierSpace}
\DeclareFontShape{T1}{futs}{b}{sc}{% bold small-caps
<-> futbc8t
}{\SetFourierSpace}
\DeclareFontShape{T1}{futs}{m}{sl}{% medium oblique
<-> futro8t
}{\SetFourierSpace}
\DeclareFontShape{T1}{futs}{b}{sl}{% bold oblique
<-> futbo8t
}{\SetFourierSpace}
% silent font substitutions which substitute bold for bold extended when the latter is requested, without issuing a warning
\DeclareFontShape{T1}{futs}{bx}{n}{<->ssub * futs/b/n}{}
\DeclareFontShape{T1}{futs}{bx}{it}{<->ssub * futs/b/it}{}
\DeclareFontShape{T1}{futs}{bx}{sc}{<->ssub * futs/b/sc}{}
\DeclareFontShape{T1}{futs}{bx}{sl}{<->ssub * futs/b/sl}{}
\endinput
So suppose we ask for futs
medium upright in the T1 encoding. Then LaTeX will look for futr8t
. 8t
designates the T1 encoding. More specifically, it will load futr8t.tfm
which is a TeX Font Metric file. (AFM files get combined with further information to create TFMs when font packages are created.)
Because this is pdfTeX and not TeX, pdfTeX will also look for information about where to find the glyphs etc. However, no entry for futr8t
is to be found in the mapping file.
We do, however, find the line
futr8r Utopia-Regular "TeXBase1Encoding ReEncodeFont " <8r.enc <putr8a.pfb
So how do we get from futr8t
to futr8r
? The answer lies in the fact that fourier
provides virtual fonts. In this case, the virtual font is futr8t.vf
. Virtual fonts are useful because they allow you to combine glyphs from different fonts into a single TeX font, construct certain missing glyphs and do some more dubious things, such as fake oblique and small-caps.
However, virtual fonts don't contain any glyphs. Rather the virtual font refers to one or more further fonts, which eventually have to refer to something in the mapping file pointing to an actual PFB or similar. In this case, the virtual font must eventually point to the TeX font futr8r
which has both a TFM file, futr8r.tfm
and a line in the mapping file referencing putr8a.pfb
.
So if putr
was not available on your system, you could not possibly use futr
with pdfTeX. (You could potentially use it with TeX, but you would not be able to view the result except as a series of boxes, because the DVI viewer would need the glyphs to render the document meaningfully.)
OK. Enough background. How can we set things up to use multiple fonts in a document, desirous as we are of spawning a typographical monstrosity?
Note that I am NOT recommending this. I merely demonstrate the technical possibility.
In general, the use of multiple fonts is not wise. In particular, mixing more than one serif or more than one sans is not recommended unless you really know what you are doing.
Caveat emptor.
However, if you are bent on doing something you shouldn't, you might as well do it right.
Here, I use Venturis ADF for the default serif and sans, setting up macros to switch to Utopia when desired. But do note Bernard's comments concerning erewhon
. Fake small-caps are really not satisfactory. (I avoid them in the example below.) There is absolutely no excuse for using them when genuine small-caps are available.
\documentclass{article}
\usepackage{venturis}
\DeclareRobustCommand\futsie{%
\fontencoding{T1}%
\fontfamily{futs}%
% \fontseries{m}% uncomment if you don't want the command to fail due to an unavailable width/weight and don't mind being bumped back to medium
% \fontshape{n}% uncomment if you don't want the command to fail due to an unavailable shape and don't mind being bumped back to upright
\selectfont
}
\DeclareTextFontCommand\textfut{\futsie}
\begin{document}
{%
\Large\textvt{Don't Try This At Home, Kids!}\par
}
This is in the default serif font.
\textsf{This is a little bit in the default sans.}
More default serif here.
\futsie This changes to the requested font indefinitely.
\sffamily This changes to the default sans indefinitely.
\normalfont This gets back to the default serif indefinitely.
\textfut{Just a bit in the alternative} and back to the default.
{%
\Large\textvtl{Create Your Very Own Typographical Monster!}\par
}
\end{document}
EDIT
The differences between Fourier, as a whole, and Adobe Utopia are quite extensive. Both sets of fonts rely on faked small-caps and neither loads the postscript fonts directly. Both rely on virtual fonts.
However, Fourier provides additional type1 fonts, which supplement those provided by Utopia. A virtual font such as those in the futs
family uses glyphs from a number of different postscript fonts, in addition to fake glyphs based on them.
Here's the AFM for one of the postscript fonts provided by Fourier itself.
StartFontMetrics 2.0
Comment Panose 2 0 0 0 0 0 0 0 0 0
FullName Fourier-Alternate-Roman
FontName Fourier-Alternate-Roman
FamilyName Fourier-Alternate-Roman
Weight Regular
Notice (C) 2003, GUTenberg
Version 001.004
IsFixedPitch false
ItalicAngle 0.00
FontBBox -33 -242 712 705
Ascender 742
Descender -230
XHeight 490
CapHeight 693
UnderlinePosition -100
UnderlineThickness 50
StdHW 35
StdVW 94
EncodingScheme FontSpecific
StartCharMetrics 11
C 32 ; WX 500 ; N space ; B 0 0 0 0 ;
C 33 ; WX 287 ; N dotlessj ; B -33 -242 200 502 ;
C 34 ; WX 501 ; N euro ; B 22 -13 459 705 ;
C 35 ; WX 584 ; N eng ; B 32 -242 529 502 ;
C 36 ; WX 713 ; N Eng ; B 34 -140 669 705 ;
C 37 ; WX 364 ; N perthousandzero ; B 0 -12 315 354 ;
C 38 ; WX 558 ; N mu ; B 40 -242 550 502 ;
C 39 ; WX 593 ; N Engsmall ; B 6 -99 555 515 ;
C 40 ; WX 767 ; N euro2 ; B 0 -12 712 705 ;
C -1 ; WX 0 ; N .null ; B 0 0 0 0 ;
C -1 ; WX 500 ; N CR ; B 0 0 0 0 ;
EndCharMetrics
EndFontMetrics
The first thing to notice about this file is that it is remarkably short. A standard TeX font has 128 or 256 slots for characters. This font only provides a handful.
The second thing to notice is that the characters provided are an odd bunch. There are no letters, for example, even though the font is described bed as 'Roman'.
What is significant about the characters listed is that they are all included in the T1 font encoding, none are included in Adobe Utopia and none can be effectively faked by construction from other characters. That is, these are designed to supplement what Utopia provides.
What futr8t
does is to combine characters from Adobe Utopia regular upright and from Fourier Alternate Roman regular upright into a single TeX font. This can only be done, in the traditional TeX world, using virtual fonts. This is important because it does not require editing Adobe Utopia, which is probably prohibited by the licence.
The Fourier package also provides maths fonts to complement Utopia, text symbols and ornaments and various other things, including Greek for mathematics.
This has nothing to do with size. Utopia is provided in a single size. It can be scaled, as when you request it in a non-default size, but you don't need the sophistication of virtual fonts for that. (Just as well, or we'd all have to stick to 10pt, I think. Nothing else would be even remotely sane.)
Best Answer