summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/lucida-otf/lucida-otf-doc.tex
blob: f3208a4bcb5ab5a42b6bdeccf9ea06ee0c08bda5 (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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
%% $Id: lucida-otf-doc.tex 750 2018-03-29 12:29:53Z herbert $
% Copyright 2012-2015 TeX Users Group.
% 
% Copying and distribution of this file, with or without modification,
% are permitted in any medium, without royalty.

\listfiles
\documentclass[11pt]{article}
\usepackage{geometry}

\usepackage{fontspec}
\newfontface\Lucida{LucidaBrightOT}
\usepackage{xcolor}

\usepackage[useKerning,
            TT={Scale=0.88,FakeStretch=0.9},
            SS={Scale=0.9},
            RM={Scale=0.9},
            DefaultFeatures={Ligatures=TeX}]{lucida-otf}  % support opentype math fonts

\newfontface\LucidaKern{LucidaBrightOT}[RawFeature=+lucidaletterkerning]

\newcommand\sK[1]{\textcolor{red}{\rlap{\Lucida\large#1}}\textcolor{blue}{\LucidaKern\large#1}}
\usepackage{biblatex}
\addbibresource{\jobname.bib}
\usepackage{array}
\usepackage{metalogo} % for \XeTeX logo
\usepackage{booktabs} % for examples
\usepackage{ltablex} % for examples
\usepackage{listings} % for code
\usepackage{dtk-logos} % for Wikipedia W


\pagestyle{headings}

\usepackage[colorlinks,hyperfootnotes=false]{hyperref}
% define \code for url-like breaking of typewriter fragments.
\ifx\nolinkurl\undefined \let\code\url \else \let\code\nolinkurl \fi

% Define \cs to prepend a backslash, and be unbreakable:
\DeclareRobustCommand\cs[1]{\mbox{\texttt{\char`\\#1}}}

% An environment like quote, but less space above and more below:
\newenvironment{demoquote}
   {\tabularx{\dimexpr\linewidth+\marginparwidth}{@{} X >{\ttfamily}l @{}}}
   {\endtabularx}


\title{Support for the Lucida OpenType fonts from TUG}
\author{Herbert Voß}
\begin{document}
\maketitle
\tableofcontents

\section{Introduction}

{\def\thefootnote{}
% article.cls uses 1.8em for the footnote indent.
\footnotetext{\kern-1.8em \textregistered\ Lucida is a trademark of
Bigelow \& Holmes Inc.\ registered in the U.S. Patent \& Trademark
Office and other jurisdictions.}
}

This document contains examples of the Lucida OpenType fonts available
through TUG.  They can be used with any OpenType-aware application,
including the Lua\TeX\ and \XeTeX\ extensions of \TeX\ (but not
pdf\TeX).

A brief overview:

\begin{itemize}
\item Math fonts: Lucida Bright Math and Lucida Bright Math Demi,
extended OpenType versions of the original Type~1 Lucida math fonts.

\item Three text families (regular, italic, bold, bold italic) also 
coming from the original Type~1 distribution: Lucida Bright, Lucida
Sans, and Lucida Sans Typewriter.

\item Three specialized fonts from the original Type~1
distribution: Blackletter, Calligraphy, and Handwriting.

\item Two additional monospaced font families (same four variants):
Lucida Grande Mono DK and Lucida Console DK.  These have O (oh), and Q
glyphs modified to a somewhat squarish shape, and the 0~(zero) glyph
open rather than slashed, as preferred by Don Knuth.  As usual, Lucida
ConsoleDK has shorter capitals than Grande Mono, among other smaller
changes.  (If you don't have the DK fonts and want to remake this
document as a test, you'll need to remove the references to them.)

\end{itemize}

The package \texttt{lucida-otf} supports all families with specific optional
arguments:

\begin{tabular}{@{} >{\ttfamily}l l @{}}\\\toprule
\emph{name} & \emph{meaning}\\\midrule
RM & Lucida Bright (Roman)\\
SS & Lucida Sans\\
TT & Lucida Sans Typewriter\\
GTT & Lucida GrandeDK\\
CTT & Lucida ConsoleDK \\
MM & Lucida Math\\
MMbold & Lucida Boldmath\\
BL & Lucida Blacklatter\\
CAL & Lucida Calligraphy\\
HW & Lucida Handwriting\\
DefaultFeatures & for all font styles\\\bottomrule
\end{tabular}

\bigskip
Except math all fonts are preset with \texttt{Scale=0.92}. For this documentation
we use instead:

\begin{verbatim}
\usepackage[TT={Scale=0.88,FakeStretch=0.9},
            SS={Scale=0.9},
            RM={Scale=0.9},
            DefaultFeatures={Ligatures=TeX}]{lucida-otf}  % support opentype lucida fonts
\end{verbatim}

\begin{sloppypar}
The standard font families \texttt{rm}, \texttt{sf}, and \texttt{tt} 
can be used as usual for any \LaTeX\  engine. The other specific Lucida fonts
can be used by one of the macros \cs{LucidaBlackletter}, 
\cs{LucidaCalligraphy}, 
\cs{LucidaHandwriting},
\cs{LucidaGrandeMonoDK}, and
\cs{LucidaConsoleDK}. They are defined as:
\end{sloppypar}





\begin{verbatim}
% The specialized one-off fonts:
\newfontface\LucidaBlackletter{Lucida Blackletter OT}[\lucidaBL@features]
\newfontface\LucidaCalligraphy{Lucida Calligraphy OT Italic}[\lucidaCAL@features]
\newfontface\LucidaHandwriting{Lucida Handwriting OT Italic}[\lucidaHW@features]
%
% GrandeMono and Console fonts for an example:

\newfontfamily\LucidaGrandeMonoDK{LucidaGrandeMonoDK}[
  \lucidaGrandeTT@features,
      ItalicFont = * Italic,
        BoldFont = * Bold,
  BoldItalicFont = * Bold Italic
]
%
\newfontfamily\LucidaConsoleDK{LucidaConsoleDK}[%
  \lucidaConsoleTT@features,
      ItalicFont = * Italic,
        BoldFont = * Bold,
  BoldItalicFont = * Bold Italic
]
\end{verbatim}

By default the fonts are defined by their symbolic name. As an alternative you can load 
the package with the option \texttt{usefilenames}. 

\begin{verbatim}
\usepackage[usefilenames,
            TT={Scale=0.88,FakeStretch=0.9},
            SS={Scale=0.9},
            RM={Scale=0.9},
            DefaultFeatures={Ligatures=TeX}]{lucida-otf}  % support opentype math fonts
\end{verbatim}



Then all definitions uses the
extension \texttt{.otf} and the filename of the fonts:

\begin{verbatim}
% The specialized one-off fonts:
\newfontface\LucidaBlackletter{LucidaBlackletterOT}[Extension=.otf,\lucidaBL@features]
\newfontface\LucidaCalligraphy{LucidaCalligraphyOT-Italic}[Extension=.otf,\lucidaCAL@features]
\newfontface\LucidaHandwriting{LucidaHandwritingOT-Italic}[Extension=.otf,\lucidaHW@features]
%
% GrandeMono and Console fonts for an example:

\newfontfamily\LucidaGrandeMonoDK{LucidaGrandeMonoDK}[
       Extension = .otf,
  \lucidaGrandeTT@features,
      ItalicFont = *-Italic,
        BoldFont = *-Bold,
  BoldItalicFont = *-BoldItalic
]
%
\newfontfamily\LucidaConsoleDK{LucidaConsoleDK}[%
       Extension = .otf,
  \lucidaConsoleTT@features,
      ItalicFont = *-Italic,
        BoldFont = *-Bold,
  BoldItalicFont = *-BoldItalic
]
\end{verbatim}

\section{Kerning}

For Lua\LaTeX\ 
the package uses by default a kerning table (Kerning table \texttt{lucida-otf.kern} was created 
by Bruno Bischoffberger (\url{https://github.com/whilealive/LaTexStyles}) and extended by the original
kernings from YandY (\url{http://tug.org/yandy}).

An example (Blue is  \emph{with} kerning):



\noindent
\sK{AC}, \sK{AG}, \sK{AJ}, \sK{AO}, \sK{AQ}, \sK{AS}, \sK{AT}, \sK{AU}, \sK{AV}, \sK{AW}, 
\sK{Aa}, \sK{Ac}, \sK{Ae}, \sK{Ao}, \sK{Ap}, \sK{Aq}, \sK{At}, 
\sK{Av}, \sK{Ay}, \sK{Az}, \sK{Ce}, \sK{Co}, \sK{Cw}, \sK{Cy}, \sK{Da}, \sK{De}, \sK{Do},
	\sK{Fa}, \sK{Fe}, \sK{Fy}, \sK{Ha}, \sK{He}, \sK{Ib}, \sK{Io}, \sK{Iq}, \sK{Ja}, 
	\sK{Je}, 
	\sK{Jo}, \sK{Ka}, \sK{Ke}, \sK{Ko}, \sK{Ku}, \sK{Ky},
	\sK{Ly}, \sK{Na}, \sK{Ni}, \sK{No}, \sK{Oa}, \sK{Og}, \sK{Oh}, \sK{Ok}, \sK{Ol}, 
	\sK{Ot}, \sK{Pa}, \sK{Po}, \sK{Pv}, \sK{Pw},
	\sK{Ra}, \sK{Rd}, \sK{Re}, \sK{Rj}, \sK{Ro}, \sK{Ru}, \sK{Rw}, \sK{Ry}, \sK{Ta}, 
	\sK{Td}, \sK{Te}, \sK{To}, \sK{Tr}, \sK{Ts}, \sK{Tu}, \sK{Tw}, \sK{Ty}, \sK{Tz},
	\sK{Va}, \sK{Ve}, \sK{Vo}, \sK{Vs}, \sK{Wa}, \sK{We}, \sK{Wo}, \sK{Wy}, \sK{Ya}, 
	\sK{Ye}, \sK{Yi}, \sK{Yo}, \sK{Yp}, \sK{Ys}, \sK{Yu},
	\sK{Za}, \sK{Ze}, \sK{Zo}, \sK{Zu}, \sK{Zü}, \sK{Zy}


If you do not want to use the kerning table, then load the package with the optional argument \texttt{useKerning=false}.



\section{Text examples}

\newcommand\demotext{%
  For \textsterling 45, almost anything can
  be found floating in fields. 
  !`THE DAZED BROWN FOX QUICKLY GAVE 12345--67890 JUMPS!
  --- ?`But aren't Kafka's Schlo\ss{} and
  \AE sop's \OE uvres often na\"\i ve vis-\`a-vis the d\ae monic
  ph\oe nix's official r\^ole in fluffy souffl\'es?}

\newcommand*\demotextsc{\textsc{\ Sphinx of black quartz, judge my vow}.}

\newcommand*\otfoldstylenums{\addfontfeatures{Numbers={OldStyle}}}
\newcommand*\demotextosf{\ \otfoldstylenums{0123456789}.}

The basic text family is \code{LucidaBrightOT}, with the usual four
variants---\allowbreak regular, italic, bold, and bold italic, all with
oldstyle figures; small caps are available in the upright shapes.



\noindent
\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}}
\demotext\demotextsc \demotextosf & LucidaBrightOT\\[4pt]
\itshape\demotext\demotextosf & LucidaBrightOT-Italic\\[4pt]
\bfseries\demotext\demotextsc \demotextosf & LucidaBrightOT-Demibold\\[4pt]
\bfseries\itshape\demotext\demotextosf & LucidaBrightOT-DemiboldItalic\\[12pt]
%\end{tabularx}
~ & ~ \\
%\noindent
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}}
\sffamily\demotext & LucidaSansOT\\[4pt]
\sffamily\itshape\demotext & LucidaSansOT-Italic\\[4pt]
\sffamily\bfseries\demotext & LucidaSansOT-Demibold \\[4pt]
\sffamily\bfseries\itshape\demotext & LucidaSansOT-DemiboldItalic\\[12pt]
%\end{tabularx}
~ & ~ \\

%\noindent
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}}
\ttfamily\demotext &    LucidaSansTypewriterOT\\[4pt]
\ttfamily\itshape\demotext & LucidaSansTypewriterOT-Oblique\\[4pt]
\ttfamily\bfseries\demotext & LucidaSansTypewriterOT-Bold\\[4pt]
\ttfamily\bfseries\itshape\demotext & LucidaSansTypewriterOT-BoldOblique\\[12pt]
%\end{tabularx}
~ & ~ \\%
%\noindent
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}}
\LucidaGrandeMonoDK\demotext & LucidaGrandeMonoDK\\[4pt]
\LucidaGrandeMonoDK\itshape\demotext & LucidaGrandeMonoDK-Italic\\[4pt]
\LucidaGrandeMonoDK\bfseries\demotext & LucidaGrandeMonoDK-Bold\\[4pt]
\LucidaGrandeMonoDK\bfseries\itshape\demotext & LucidaGrandeMonoDK-BoldItalic\\[12pt]
%\end{tabularx}
%
~ & ~ \\%
%\noindent
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}}
\LucidaConsoleDK\demotext & LucidaConsoleDK\\[4pt]
\LucidaConsoleDK\itshape\demotext & LucidaConsoleDK-Italic\\[4pt]
\LucidaConsoleDK\bfseries\demotext & LucidaConsoleDK-Bold\\[4pt]
\LucidaConsoleDK\bfseries\itshape\demotext & LucidaConsoleDK-BoldItalic\\[12pt]
%\end{tabularx}
%
~ & ~ \\%
%\noindent
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}}
\LucidaBlackletter\demotext & LucidaBlackletterOT\\[4pt]
\LucidaCalligraphy\demotext & LucidaCalligraphyOT\\[4pt]
\LucidaHandwriting\demotext & LucidaHandwritingOT\\
\end{tabularx}

%\setmainfont{LucidaBright}


\section{Math examples}

\begin{verbatim}
Here's some text. And here's some math:
\[ 
  \phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} 
\]
And now bold math:
\boldmath
\[ 
  \phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} 
\]
\unboldmath
Euro and copyright symbols are available: \texteuro\ \textcopyright.
\end{verbatim}

Here's some text. And here's some math:
\[ 
  \phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} 
\]
And now bold math:
\boldmath
\[ 
  \phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} 
\]
\unboldmath
Euro and copyright symbols are available: \texteuro\ \textcopyright.


\begin{verbatim}
And now more bold math:
\[ 
  \symbf{\phi(x)}=\int_{-\infty}^{x} e^{-x^{2}/2} 
\]
\end{verbatim}

And now more bold math:
\[ 
  \symbf{\phi(x)}=\int_{-\infty}^{x} e^{-x^{2}/2} 
\]

\section{Closing}

If you have questions or problems regarding installation or use, please
email \code{lucida@tug.org}; this is an open and publicly archived list
for Lucida discussion; you can subscribe on the web at
\url{http://lists.tug.org/lucida}.  On the other hand, questions or
problems related to ordering or licensing should go to
\code{lucida-admin@tug.org}.

Finally, B\&H's web site for Lucida is \url{http://lucidafonts.com},
and the home page for Lucida and \TeX\ is \url{http://tug.org/lucida}.

The font list of this documentation is:

\footnotesize\ttfamily
\expandafter\IfFileExists\expandafter{\jobname.txt}%
  {\lstinputlisting{\jobname.txt}}{}

\normalfont\rmfamily

\nocite{*}
\printbibliography


\end{document}