summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/typeface/typeface.cfg
blob: 99216730664853a670053a6bea7831e4aeb281b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
% $Id: typeface.cfg 905 2012-06-18 03:44:37Z Geoffrey $
%
\ProvidesFile{\TF@CONFIGFILE}
  [2012/03/05 \TF@PACKAGENAME\space package configuration file]

% Provide some EXTRA encoding choices to typeface package users at
% this site. NB, internal code, so comma not colon-separated lists.
%------------------------------------------------------------------
%   % in this example, make sure xxenc.def and yyenc.def exist
%   % or fontenc will complain
%   \renewcommand*\tf@fontencodingchoices{XX,XY}

% Redefine site default typefaces. Here are some typographically dubious
% examples. Note that since these definitions literally substitute for
% users' package options if not explicitly provided, ensure your syntax
% is correct -- package (sub)options lists should be colon not
% comma-separated.
%-----------------------------------------------------------------------
% \renewcommand*\TF@DEFAULTRMFONT{kpfonts:veryoldstyle:largesmallcaps}
% \renewcommand*\TF@DEFAULTSFFONT{helv:scale:0.75}
% \renewcommand*\TF@DEFAULTTTFONT{luxi}
% \renewcommand*\TF@DEFAULTMATHFONT{iwona:light:condensed}
% \renewcommand*\TF@DEFAULTSYMBOLSFONT{ams}
% \renewcommand*\TF@DEFAULTTEXTFIGURESFONT{palatino:spacing:20:lkern:-20:rkern:5}

% Ditto here. Possibly useful for configuring locales, e.g.,
%-----------------------------------------------------------
% \renewcommand*\TF@DEFAULTFONTENCODING{EU1:T1}
% \renewcommand*\TF@DEFAULTINPUTENCODING{dontload}
% \renewcommand*\TF@DEFAULTTEXTCOMP{safe}
% \renewcommand*\TF@DEFAULTCMAP{ignore}

% Redefine in-built debug colours
%--------------------------------
% \renewcommand*\TF@DEBUG@COLOUR@TS{purple}
% \renewcommand*\TF@DEBUG@COLOUR@SC{magenta}
% \renewcommand*\TF@DEBUG@COLOUR@JF{green}
% \renewcommand*\TF@DEBUG@COLOUR@XF{red}
% \renewcommand*\TF@DEBUG@COLOUR@LININGNUMS{olive}
% \renewcommand*\TF@DEBUG@COLOUR@RM{Indigo}
% \renewcommand*\TF@DEBUG@COLOUR@SF{Maroon}
% \renewcommand*\TF@DEBUG@COLOUR@TT{Green}
% \renewcommand*\TF@DEBUG@COLOUR@MATH{ProcessBlue}
% \renewcommand*\TF@DEBUG@COLOUR@XFNAME{\TF@DEBUG@COLOUR@XF}

% Examples \beforeloadingXXX and \afterloadingXXX,
%   where XXX is symbols, math, rm, sf, tt or textfigures
%--------------------------------------------------------
% \newcommand*\beforeloadingmath{
%   \ifthenelse{\equal{\tf@mathfont}{amsfonts}}{
%     % undefine the following to prevent amsfonts namespace clashes
%     \tf@undefinecommands{\underrightarrow,\underleftarrow}
%     \TF@PackageDebugInfoNoLine[\TF@CONFIGFILE]{%
%       Blew away \string\underrightarrow\space and
%       \string\underleftarrow\MessageBreak
%       symbols before loading amsfonts package}
%   }{}
% }

% User-supplied typeface definitions for the typeface package
%============================================================
% The \newtypeface command can be used to introduce new
% fonts to typeface package management. The command accepts
% one optional and four required parameters:
%   #1: [<optional comma-separated list of aliases for typeface name>]
%   #2: {<typeface name>}
%   #3: {<human-readable typeface name (its print name)>}
%   #4: {<typeface family: rm, sf, tt, math, symbol or textfigures>}
%   #5: {<typeface initialisation code>}
%---------------------------------------------------------------------

% Example typeface definitions follow. Most of these involve
% commercial fonts that will need to be purchased and installed.
%
% NB, bear in mind that unless you override it using the `fontloadorder'
% package option (which you should vigorously try to avoid) the
% typeface package loads fonts in this order:
%    textfigures, symbols, math, rm, sf, tt
% This will make a difference if your code loads and doesn't properly
% account for packages that override font setups configured earlier in
% the chain (best if you can keep your code free of side effects, as
% in the examples below).
%
% Use debug-instrumented command \tf@usefontpackage in preference to
% \usepackage whenever loading font packages, not using it at other times.
%-------------------------------------------------------------------------

% Adobe American Typewriter (strictly speaking, not a monospaced font)
\newtypeface[americantypewriter,americantt,att]{adobeamericantypewriter}
  {Adobe American Typewriter}{tt}{
  % the \scaletypeface command, below, requires compatible *pat.fd files
  \scaletypeface{tt}{\newcommand*\pat@scale{\tf@ttscalefactor}}
  \renewcommand{\ttdefault}{pat}
}

% Adobe Bembo
\newtypeface[bembo]{adobebembo}{Adobe Bembo}{rm}{
  \renewcommand*\rmdefault{pbb}
  \tf@SCencodedosf
}

% Adobe Caslon
\newtypeface{adobecaslon}{Adobe Caslon}{rm}{
  \renewcommand*\rmdefault{pac}
  \tf@SCencodedosf
}

% Adobe Garamond
\newtypeface{adobegaramond}{Adobe Garamond}{rm}{
  \renewcommand*\rmdefault{pad}
  \tf@SCencodedosf
}

% Adobe Gill Sans
\newtypeface[adobegill,gillsans,gill]{adobegillsans}{Adobe Gill Sans}{sf}{
  % the \scaletypeface command, below, requires compatible *pgs.fd files
  \scaletypeface{sf}{\newcommand*\pgs@scale{\tf@sfscalefactor}}
  \renewcommand*\sfdefault{pgs}
}

% Adobe Granjon
\newtypeface{adobegranjon}{Adobe Granjon}{rm}{
  \renewcommand*\rmdefault{pgj}
  \tf@SCencodedosf
}

% Adobe Janson. NB, this is Adobe Janson, NOT Adobe Jenson!
\newtypeface{adobejanson}{Adobe Janson}{rm}{
  \renewcommand*\rmdefault{pjn}
  \tf@SCencodedosf
}

% Adobe Jenson. NB, this is Adobe Jenson, NOT Adobe Janson!
\newtypeface{adobejenson}{Adobe Jenson}{rm}{
  \renewcommand*\rmdefault{paj}
  \TF@NativeOSFError
}

% Adobe Lucida
\newtypeface{adobelucida}{Adobe Lucida}{rm}{
  \renewcommand*\rmdefault{plc}
  \TF@NativeOSFError
}

% Adobe Myriad Pro
\newtypeface{adobemyriadpro}{Adobe Myriad Pro}{sf}{
  \tf@ifsuboption{osf}{\tf@sffontoptions}{
    % Myriad Pro has an OSF variant (depending on your installation)
    \renewcommand*\sfdefault{Myriad-OsF}
    \xdef\tf@sfprintname{\tf@sfprintname\ OSF}
  }{
    \renewcommand*\sfdefault{Myriad-LF}
  }
}

% Adobe Sabon
\newtypeface{adobesabon}{Adobe Sabon}{rm}{
  \ifthenelse{\equal{\tf@osf@method}{\TF@OSF@JF}}{
    \renewcommand*\rmdefault{psbj}  % Native old style figures
    \tf@define@liningfigures{psb}
  }{
    \renewcommand*\rmdefault{psb}   % Lining figures
  }
  \tf@define@oldstylenums@cmd{psbj}
}

% Adobe Sabon text figures
\newtypeface{adobesabon}{Adobe Sabon}{textfigures}{
  \tf@initialisetextfiguresfont{T1}
  \tf@DeclareOsfFontShape{m}{n}  {psbr9d}
  \tf@DeclareOsfFontShape{m}{sc} {psbrc9d}
  \tf@DeclareOsfFontShape{m}{it} {psbri9d}
  \tf@DeclareOsfFontShape{m}{sl} {psbri9d}
  \tf@DeclareOsfFontShape{b}{n}  {psbb9d}
  \tf@DeclareOsfFontShape{b}{it} {psbbi9d}
  \tf@DeclareOsfFontShape{b}{sl} {psbbi9d}
  \tf@DeclareOsfFontShape{bx}{n} {psbb9d}
  \tf@DeclareOsfFontShape{bx}{it}{psbbi9d}
  \tf@DeclareOsfFontShape{bx}{sl}{psbbi9d}
}

% Adobe Times Roman Expert (with true smallcaps and oldstyle figures)
% NB, if you receive `Package textcomp warning: Oldstyle digits unavailable
% for family ptmj' (or ptmx), you might try loading the typeface
% package with option `textcomp=force', e.g,
%    \usepackage[typeface=timesexpert,textcomp=force,...]{typeface}
\newtypeface[timesx]{adobetimesexpert}{Adobe Times Roman Expert}{rm}{
  \ifthenelse{\equal{\tf@osf@method}{\TF@OSF@JF}}{
    \renewcommand*\rmdefault{ptmj}  % Native old style figures
    \tf@define@liningfigures{ptmx}
  }{
    \renewcommand*\rmdefault{ptmx}  % Lining figures
  }
}

\newtypeface[timesx]{adobetimesexpert}{Adobe Times Roman Expert}{textfigures}{
  \tf@initialisetextfiguresfont{T1}
  \tf@DeclareOsfFontShape{m}{n}  {ptmr9d}
  \tf@DeclareOsfFontShape{m}{sc} {ptmrc9d}
  \tf@DeclareOsfFontShape{m}{it} {ptmri9d}
  \tf@DeclareOsfFontShape{m}{sl} {ptmri9d}
  \tf@DeclareOsfFontShape{b}{n}  {ptmb9d}
  \tf@DeclareOsfFontShape{b}{sc} {ptmbc9d}
  \tf@DeclareOsfFontShape{b}{it} {ptmbi9d}
  \tf@DeclareOsfFontShape{b}{sl} {ptmbi9d}
  \tf@DeclareOsfFontShape{bx}{n} {ptmb9d}
  \tf@DeclareOsfFontShape{bx}{sc}{ptmbc9d}
  \tf@DeclareOsfFontShape{bx}{it}{ptmbi9d}
  \tf@DeclareOsfFontShape{bx}{sl}{ptmbi9d}
}

% Adobe Trade Gothic
\newtypeface[atg,tradegothic]{adobetradegothic}{Adobe Trade Gothic}{sf}{
  % the \scaletypeface command, below, requires compatible *ptg.fd files
  \scaletypeface{sf}{\newcommand*\ptg@scale{\tf@sfscalefactor}}
  \renewcommand*\sfdefault{ptg}
}

\newtypeface{ebgaramond}{EB Garamond}{rm}{
  % OTF's available at http://www.georgduffner.at/ebgaramond/
  % Converted to type1 using autoinst (but I screwed up ligatures
  % conversion on my copy somewhere along the way).
  % Note that it's early days for this font, e.g., no bold, bold-italic,
  % and extremely poor italic correction. Nevertheless, what there is
  % right now is very attractive and shows considerable promise.
  \ifthenelse{\equal{\tf@osf@method}{\TF@OSF@JF}}{
    \renewcommand*\rmdefault{EBGaramond-OsF}  % Native old style figures
    \tf@define@liningfigures{EBGaramond-LF}
  }{
    \renewcommand*\rmdefault{EBGaramond-LF}   % Lining figures
  }
  \tf@define@oldstylenums@cmd{EBGaramond-OsF}
}

% Emigre Mrs Eaves
\newtypeface{mrseaves}{Mrs Eaves}{rm}{
  \renewcommand*\bfdefault{b}
  \renewcommand*\mddefault{m}
  \ifthenelse{\equal{\tf@osf@method}{\TF@OSF@JF}}{
    \renewcommand*\rmdefault{MrsEavesOT-OsF}  % Native old style figures
    \tf@define@liningfigures{MrsEavesOT-LF}
  }{
    \renewcommand*\rmdefault{MrsEavesOT-LF}   % Lining figures
  }
  \tf@define@oldstylenums@cmd{MrsEavesOT-OsF}
}

% Hoefler & Frere-Jones Hoefler Text
\newtypeface[hoefler]{hoeflertext}{Hoefler Text}{rm}{
  \renewcommand*\rmdefault{eht}    % TODO: configure lf for HOEFLER TEXT ALT.
  \tf@define@liningfigures{ptm}    % Until then, use Times lf instead. Urggh.
  \tf@define@oldstylenums@cmd{eht} % Redefine \oldstylenums to suit.
}

\newtypeface[hoefler]{hoeflertext}{Hoefler Text}{textfigures}{
  \tf@initialisetextfiguresfont{T1}
  \tf@DeclareOsfFontShape{m}{n}  {ehtr8t}
  \tf@DeclareOsfFontShape{m}{sc} {ehtrc8t}
  \tf@DeclareOsfFontShape{m}{sl} {ehtro8t}
  \tf@DeclareOsfFontShape{m}{it} {ehtri8t}
  \tf@DeclareOsfFontShape{b}{n}  {ehtb8t}
  \tf@DeclareOsfFontShape{b}{sc} {ehtbc8t}
  \tf@DeclareOsfFontShape{b}{sl} {ehtbo8t}
  \tf@DeclareOsfFontShape{b}{it} {ehtbi8t}
  \tf@DeclareOsfFontShape{eb}{n} {ehtc8t}
  \tf@DeclareOsfFontShape{eb}{sc}{ehtcc8t}
  \tf@DeclareOsfFontShape{eb}{sl}{ehtco8t}
  \tf@DeclareOsfFontShape{eb}{it}{ehtci8t}
  \tf@DeclareOsfFontShape{bx}{n} {ehtb8t}
  \tf@DeclareOsfFontShape{bx}{sc}{ehtbc8t}
  \tf@DeclareOsfFontShape{bx}{sl}{ehtbo8t}
  \tf@DeclareOsfFontShape{bx}{it}{ehtbi8t}
}

% Linotype Didot
\newtypeface[ldidot]{linotypedidot}{Linotype Didot}{rm}{
  \renewcommand*\rmdefault{ldo}
  \tf@SCencodedosf
}

% Linotype Sabon
\newtypeface[lsabon]{linotypesabon}{Linotype Sabon}{rm}{
  \renewcommand*\rmdefault{lsb}
  \TF@NativeOSFError
}

% Linotype Times Ten
\newtypeface[timesten]{linotypetimesten}{Linotype Times Ten}{rm}{
  \renewcommand*\rmdefault{ltt}
  \TF@NativeOSFError
}

% Monotype Scotch Roman. Ha ha! Might look good in an ancient history thesis!
\newtypeface[scotchroman]{monotypescotchroman}{Monotype Scotch Roman}{rm}{
  \renewcommand*\rmdefault{ms1}
  \TF@NativeOSFError
}

\newtypeface[vgaramond,varoquaux]{varoquauxgaramond}
            {URW Garamond (Varoquaux)}{rm}{
  % Modded set of URW Garamond fonts (possibly) available at
  %   http://gael-varoquaux.info/computers/garamond/index.html
  % This fontset provides several advantages over URW Garamond, including:
  % smallcaps, osf and long tailed Q. However, like URW Garamond, there are
  % weaknesses. Adobe Garamond offers another alternative.
  \renewcommand*\rmdefault{ggm}\normalfont
  \tf@define@liningfigures{ugm}
  \TF@NativeLFError
}

% Verdana truetype font (see verdana package for further details)
\newtypeface{verdana}{Verdana}{sf}{
  \tf@ifsuboption{nofligatures}{\tf@sffontoptions}{
    \renewcommand{\sfdefault}{vnax} % if f-ligatures cause problems
  }{
    \renewcommand{\sfdefault}{vna}
  }
}

%-------- End typeface.cfg ----------------------------------------------------