Debian Codegraph @

TeX/elstob-package.tex

raw
1 \documentclass[12pt]{article}
2
3 \usepackage[
4 weightadjustment=-50,opticalsizeadjustment=-2,slant=12,
5 MainFeatures={StylisticSet=3},
6 ]{elstob}
7
8 \setfontface\samplefootnote{Elstob}[
9 Renderer = HarfBuzz,
10 SizeFeatures = {{Size={5-}, RawFeature={axis={wght=460,opsz=6}}}},
11 ]
12 \setfontface\sampleheader{Elstob}[
13 Renderer = HarfBuzz,
14 SizeFeatures = {{Size={5-}, RawFeature={axis={wght=345,opsz=18}}}}
15 ]
16 \setfontface\mostslanted{Elstob-Italic}[
17 Renderer = HarfBuzz,
18 SizeFeatures = {{Size={5-}, RawFeature={axis={wght=415,opsz=12,slnt=0}}}}
19 ]
20 \setfontface\leastslanted{Elstob-Italic}[
21 Renderer = HarfBuzz,
22 SizeFeatures = {{Size={5-}, RawFeature={axis={wght=415,opsz=12,slnt=15}}}}
23 ]
24
25 \usepackage{microtype}
26 \usepackage{multicol}
27 \usepackage{metalogo}
28 \newcommand{\ltech}{Lua\kern-1.5pt\TeX}
29 \newcommand{\lltech}{Lua\LaTeX}
30 \setmonofont{Fira Mono}[Scale=MatchLowercase,Numbers=Lowercase]
31 \setsansfont{Fira Sans}[Scale=MatchLowercase,Numbers=Lowercase]
32 \newcommand{\fspec}{{\sffamily fontspec}}
33 \usepackage{supertabular}
34 \usepackage[table,dvipsnames]{xcolor}
35 \definecolor{myLightBlue}{RGB}{203,228,249}
36 \definecolor{GunMetalGray}{RGB}{42,52,57}
37 \definecolor{BrickRed}{RGB}{146,18,6}
38 \definecolor{RViolet}{RGB}{70,18,87}
39 \definecolor{myRed}{rgb}{0.5,0,0}
40 \newcommand{\bluerow}{\rowcolor{myLightBlue}}
41 \usepackage{titlesec}
42 \titleformat{\section}[hang]{\Large\color{GunMetalGray}}{\thesection.}{1em}{}
43 \usepackage{fancyhdr}
44 \pagestyle{fancy}
45 \footskip = 30pt
46 \headsep = 30pt
47 \renewcommand{\headrule}{}
48 \fancyhead[L]{}
49 \fancyhead[C]{}
50 \fancyhead[R]{}
51 \fancyfoot[L]{}
52 \fancyfoot[C]{}
53 \fancyfoot[R]{}
54 \newcommand{\src}[1]{{\color{BrickRed}\texttt{#1}}}
55 \linespread{1.1}
56 \title{Elstob}
57 \author{Peter S. Baker}
58 \date{\today}
59 \tolerance=1500
60
61 \begin{document}
62
63 \maketitle
64
65 \section{Introduction}
66
67 \pagestyle{fancy}
68 \fancyhead[CE]{\scshape\color{myRed} {\addfontfeatures{Numbers=OldStyle}\thepage}\hspace{10pt}%
69 \addfontfeature{Letters=UppercaseSmallCaps}\leftmark}
70 \fancyhead[CO]{\scshape\color{myRed} {elstob}\hspace{10pt}{\addfontfeatures{Numbers=OldStyle}\thepage}}
71
72 This package supports Elstob, the variable font for medievalists (and others).
73 The package requires \lltech, since {\ltech} is
74 the only flavor of {\TeX} that supports variable fonts. Elstob is not in CTAN, so you must
75 install the font in your system in order to use it (be sure to get “Elstob,” the variable
76 version, not “ElstobD,” the static font). Place the files \src{elstob.sty} and
77 \src{elstob.lua} in the same
78 directory with the document you're working on. This package loads
79 \fspec, so it is not necessary to load that package separately, even if you are using
80 other fonts alongside Elstob.
81
82 A variable font is one with glyphs that can change not only their size, but also their
83 shape. These changes in shape are defined in one or more \textbf{axes}---for example,
84 \textbf{Weight} (Light, Bold, etc.) and \textbf{Width} (Condensed, Expanded). A traditional
85 “static” font family also has axes, but as every style requires a separate font file,
86 the number of available styles is severely constrained. A variable font, by contrast,
87 offers a practically limitless number of styles in a single file: you choose a style
88 by making a selection of number values (usually called “coordinates”) from the axes,
89 of which Elstob has four (five in the italic):
90
91 \begin{description}
92 \item[Weight] Possible weights run from ExtraLight (200) to ExtraBold (800). By
93 convention, Regular is 400 and Bold is 700.
94 \item[Optical Size] A complex adjustment of a glyph's shape to
95 optimize for particular type sizes: at small sizes (e.g. footnotes), thin stems are
96 thicker, the xheight is higher, and glyphs are a little wider. Values from 6 to 18 correspond to point
97 sizes, but this correspondence is merely the designer's suggestion: changing the
98 font's optical size setting does not change the actual size of the text, and you can use any
99 optical size with type in any actual size.
100 \item[Slant] Italic only. The axis has values from 0 to 15, where 0 is {\mostslanted most
101 slanted} and 15 is {\leastslanted least slanted}. The default is 8.
102 \item[Grade] Increases the weight of glyphs without changing their width. This
103 axis is more useful in web applications than in print.
104 Possible values are 0–1 (fractional values are permitted). The default is 0.
105 \item[Spacing] Increases the width of space characters. In combination with
106 Stylistic Set 18 “Old-Style Punctuation Spacing,” this can approximate the
107 spacing used by early printed books, which was more generous than now.
108 Possible values are 0–1, with 0 as the default.
109 \end{description}
110
111 \noindent You can access all these axes through this package, but
112 especially those most appropriate for printed documents: Weight, Optical Size,
113 Spacing, and Slant.
114
115
116 \section{Loading Elstob}
117
118 Load the package in the usual way, with {\color{BrickRed}\verb|\usepackage{elstob}|}.
119 By default, the main font is not a set of static outlines whose proportions
120 remain the same though they can be scaled, but rather a set of
121 \emph{variable} outlines that change their Weight and Optical Size as the text size increases
122 or decreases. You can see the difference if we scale a line of fine print
123 and a line of header text to the same {\color{BrickRed}\verb|\large|} size:\\[0.5ex]
124
125 \noindent {\large\samplefootnote Here is some sample fine print (6pt).}\\[0.2ex]
126 {\large\sampleheader Here is some sample header text (18pt and up).}\\[0.5ex]
127
128 \noindent The letter-shapes are markedly different, but on the page they look
129 pretty much the same, because the purpose of these changes in
130 shape, in addition to promoting legibility,
131 is to allow blocks of text in different sizes (headers, main text,
132 block quotations, footnotes) to coexist on a page without any of them looking too
133 dark or too light.\footnote{%
134 For example, on a typical {\LaTeX} page a footnote like this, looked at as a block
135 of gray, is usually a little lighter than the main text. But on this page, the
136 “color” of the footnote matches that of the main text. The variation in glyph
137 shape responsible for this effect approximates the way letters in metal type were
138 typically wider and heavier at small sizes.} Evenness of texture makes text in
139 different point sizes \emph{look} the same.
140
141 Elstob's {\color{BrickRed}\verb|\usepackage|} options give you a number of ways to
142 fine-tune the look of your text:
143
144 \begin{description}
145 \item[light] The weight of the type for the main text is Light. As with the default
146 style (and all styles defined by these options), “Light” is not a fixed weight, but
147 a range of weights varying with type size.
148 \item[extralight] The weight of the type for the main text is ExtraLight.
149 \item[medium] The weight of the type for the main text is Medium---that is, darker than
150 Regular but lighter than Bold.
151 \item[semibold] The weight of bold type is somewhat lighter than the usual bold. This may be a
152 good choice if you have selected the \textbf{light} option.
153 \item[extrabold] The weight of bold type is somewhat heavier than the usual bold. This may be a
154 good choice if you have selected the \textbf{medium} option.
155 \item[weightadjustment (or wghtadjust)] Adjusts the weight of the type. For example, if you choose \textbf{medium}
156 for your document (weight averages about 500) and \textbf{extrabold} (weight about 800)
157 and also include the option {\color{BrickRed}\verb|wghtadjust=-25|}, then the weights of medium and extrabold
158 text will be lightened by 25 (475, 775).
159 \item[opticalsizeadjustment (or opszadjust)] Adjusts the optical size. By default, the value of this axis
160 is 8 for 8pt text, 12 for 12pt, etc. (within the range 6–18). But if you pass the
161 option {\color{BrickRed}\verb|opszadjust=-2|}, the optical size axis will have 6 for 8pt type, 10 for
162 12pt, etc. Because the value of the optical size axis must be between 6 and 18, the
163 value of the optical size axis for 6- and 7pt type will be 6.
164 \item[slant] A number from 0 to 15, specifying the slant of the italic face.
165 A value of 0 is {\mostslanted most slanted}, 15 {\leastslanted most upright}.
166 \item[oldspacing] Word-spacing and spacing around puncuation will approximate the conventions
167 observed by typesetters of early printed books, which are more spaciously set than
168 modern books.
169 \item[proportional] Numbers in the document will be proportionally spaced. This is the default.
170 \item[tabular] Numbers will be tabular (monospaced).
171 \item[oldstyle] Numbers will be old-style, harmonizing with lowercase letters. This is the default.
172 \item[lining] Numbers will be lining, harmonizing with uppercase letters.
173 \end{description}
174
175 \section{Customizing the Main Font}
176
177 If the options listed in the previous section don't give you the effect you're looking for,
178 this package's more advanced options allow you to choose
179 from a virtually infinite number of styles. Do this by passing OpenType features
180 for your document's main text \emph{or} for one or more of the four main styles
181 (Regular, Italic, Bold, Bold Italic), and also by supplying custom values for the
182 font's four axes.
183
184 For example, if you want your document to use the conventions observed by early
185 English typesetters for the distribution of \textbf{s} and \textbf{ſ}, load the
186 package this way:
187
188 \footnotesize
189 \begin{verbatim}
190 \usepackage[MainFeatures={
191 Language=English,
192 StylisticSet=8
193 }]{elstob}
194 \end{verbatim}
195 \normalsize
196
197 \noindent If you want to use these conventions only for italic text, use
198 \textbf{MainItalicFeatures} instead of \textbf{MainFeatures}. All of the
199 features you pass via these options must be valid for \fspec: in fact,
200 they are passed straight through to \fspec.
201
202 If you want to customize the four basic styles of the main text, use
203 \textbf{MainRegularSizeFeatures}, \textbf{MainItalicSizeFeatures}, and so on.
204 Each of these defines a list of associative arrays, in which each array in the
205 list prescribes axis coordinates for a range of sizes.
206 For example, here is a hypothetical set of \textbf{SizeFeatures}:
207
208 \footnotesize
209 \begin{verbatim}
210 MainRegularSizeFeatures={
211 {size=10,wght=380,opsz=8},
212 {size=13,wght=370,opsz=10},
213 {size=13,wght=350,opsz=16}
214 },
215 MainItalicSizeFeatures={
216 {size=10,wght=380,opsz=8,slnt=12},
217 {size=13,wght=370,opsz=10,slnt=12},
218 {size=13,wght=350,opsz=16,slnt=12}
219 },
220 MainBoldSizeFeatures={
221 {size=10,wght=620,opsz=8},
222 {size=13,wght=600,opsz=10},
223 {size=13,wght=700,opsz=16}
224 },
225 MainBoldItalicSizeFeatures={
226 {size=10,wght=620,opsz=8,slnt=12},
227 {size=13,wght=600,opsz=10,slnt=12},
228 {size=13,wght=700,opsz=16,slnt=12}
229 }
230 \end{verbatim}\normalsize
231
232 \noindent For each array, a \src{size} key is mandatory: any array without one
233 is ignored. The arrays should be in order of point size. The first array
234 prescribes axis coordinates for all sizes up to \src{size}, the last array for all sizes
235 greater than \src{size}, and any intermediate items a range from the previous to the
236 current \src{size}.\footnote{%
237 If you want only one size array, make \src{size} improbably low (e.g. 5) and place
238 a comma after the closing brace of the array.%
239 } So the ranges covered in each list above are \src{-10}, \src{10-13},
240 and \src{13-}.\footnote{Any modification of the default text size (e.g. in the
241 \src{\textbackslash documentclass} command) can affect the size definitions in these
242 arrays, with the result that (for example)
243 \src{10} no longer means exactly “ten points.” You may have to experiment to get these numbers
244 right.}
245
246 The keys other than \src{size} are the four-letter tags for the font's axes: \src{wght}
247 (Weight), \src{opsz} (Optical Size), \src{slnt} (Slant, italic only), \src{GRAD} (Grade),
248 and \src{SPAC} (Spacing).\footnote{%
249 By convention, tags for axes defined in the OpenType standard are lowercase; custom axes
250 are uppercase. Elstob’s \src{GRAD} and \src{SPAC} are custom axes.%
251 } When a key
252 is omitted, the default value for that axis is used. It is up to you to make sure the values
253 given for each axis are valid---the package does no checking (but {\fspec} will do a good bit
254 of checking for you). When SizeFeatures are given in
255 this way, they override any other options that set or change axis coordinates
256 (e.g. \textbf{weightadjustment}).
257
258 This example defines three sizes, since the (hypothetical) document in question uses
259 only three sizes of type---for footnotes, main text, and headers. For each of these sizes, the
260 weight is a little lighter than the default of 400, and the optical size a little less, giving
261 the page a slightly more spacious look than the default. \textit{Italic type is relatively upright}.
262
263 \section{Selecting Alternate Styles}
264
265 In addition to the document's main font, you can choose from more than fifty
266 predefined styles, most of which match the instances defined in the font.
267 The commands for shifting to these
268 styles are as follows (of the italic styles, only the base “eItalic” is listed;
269 append “Italic” to any of the others, except “eRegular”):
270
271 \begin{multicols}{2}
272 \small\noindent\textbackslash eRegular
273
274 \noindent\textbackslash eItalic
275
276 \noindent\textbackslash eSixPt
277
278 \noindent\textbackslash eEightPt
279
280 \noindent\textbackslash eTenPt
281
282 \noindent\textbackslash eFourteenPt
283
284 \noindent\textbackslash eEighteenPt
285
286 \noindent\textbackslash eExtraLight
287
288 \noindent\textbackslash eSixPtExtraLight
289
290 \noindent\textbackslash eEightPtExtraLight
291
292 \noindent\textbackslash eTenPtExtraLight
293
294 \noindent\textbackslash eFourteenPtExtraLight
295
296 \noindent\textbackslash eEighteenPtExtraLight
297
298 \noindent\textbackslash eLight
299
300 \noindent\textbackslash eSixPtLight
301
302 \noindent\textbackslash eEightPtLight
303
304 \noindent\textbackslash eTenPtLight
305
306 \noindent\textbackslash eFourteenPtLight
307
308 \noindent\textbackslash eEighteenPtLight
309
310 \noindent\textbackslash eMedium
311
312 \noindent\textbackslash eSixPtMedium
313
314 \noindent\textbackslash eEightPtMedium
315
316 \noindent\textbackslash eTenPtMedium
317
318 \noindent\textbackslash eFourteenPtMedium
319
320 \noindent\textbackslash eEighteenPtMedium
321
322 \noindent\textbackslash eSemibold
323
324 \noindent\textbackslash eSixPtSemibold
325
326 \noindent\textbackslash eEightPtSemibold
327
328 \noindent\textbackslash eTenPtSemibold
329
330 \noindent\textbackslash eFourteenPtSemibold
331
332 \noindent\textbackslash eEighteenPtSemibold
333
334 \noindent\textbackslash eBold
335
336 \noindent\textbackslash eSixPtBold
337
338 \noindent\textbackslash eEightPtBold
339
340 \noindent\textbackslash eTenPtBold
341
342 \noindent\textbackslash eFourteenPtBold
343
344 \noindent\textbackslash eEighteenPtBold
345
346 \noindent\textbackslash eExtraBold
347
348 \noindent\textbackslash eSixPtExtraBold
349
350 \noindent\textbackslash eEightPtExtraBold
351
352 \noindent\textbackslash eTenPtExtraBold
353
354 \noindent\textbackslash eFourteenPtExtraBold
355 \end{multicols}
356
357 \noindent Use these commands
358 to shift temporarily to a style other than that of the main text.
359 For example, to shift to the 6pt Medium style for a short phrase, use
360 this code:
361 \begin{center}
362 {\color{BrickRed}\small\verb|{\eSixPtMedium a short phrase}|}.
363 \end{center}
364 The result: {\eSixPtMedium a short phrase}.
365
366 To add features to any of these styles, use the style name
367 (without the prefixed \textbf{e} and with \textbf{Features} appended)
368 as a package option. To change the size features for the style,
369 do the same, but with \textbf{SizeFeatures} instead of \textbf{Features}
370 appended. For example:
371
372 \footnotesize
373 \begin{verbatim}
374 \usepackage[
375 EightPtSemiboldFeatures={
376 Language=English,
377 StylisticSet=2
378 },
379 EightPtSemiboldSizeFeatures={{size=5,wght=650,opsz=8.5},}
380 ]{elstob}
381 \end{verbatim}\normalsize
382
383 \noindent This will shift text in the 8pt Semibold style from default to insular
384 letter-shapes and slightly increase the weight and optical size of all glyphs in that style.
385 While you can supply \textbf{SizeFeatures} for any style, each roman style shares
386 \textbf{Features} with its matching italic. So there is no \textbf{SemiboldItalicFeatures}
387 option, but only \textbf{SemiboldFeatures}.
388
389 \section{Other Commands}
390
391 This package's other commands (listed in Table 1) are offered as conveniences---shorter and more
392 mnemonic than the {\fspec} commands they invoke (though of course all {\fspec} commands
393 remain available). Each of these commands
394 also has a corresponding “text” command that works like
395 {\color{BrickRed}\verb|\textit{}|}—that is, it takes
396 as its sole argument the text to which the command will be applied. Each “text” command
397 consists of the main command with “text” prefixed—for example,
398 {\color{BrickRed}\verb|\textInsularLetterForms{}|}
399 corresponding to {\color{BrickRed}\verb|\InsularLetterForms|}.\linebreak
400 For a fuller account of the OpenType features
401 applied by these commands, see the \textit{Elstob Manual}.
402
403 %\begin{center}
404 \begin{table}[ht]
405 \centering
406 \begin{tabular}{| l | p{2.75in} |}
407 \hline
408 \bluerow\textbackslash AltThornEth & Applies ss01, Alternate thorn and eth.\\
409 \textbackslash InsularLetterForms & Applies ss02, Insular letter-forms.\\
410 \bluerow\textbackslash AlternateFigures & Applies ss03, Alternate Figures.\\
411 \textbackslash ContextualLongS & Applies ss08, Contextual long s.\\
412 \bluerow\textbackslash LanguageSpecificVariants & \small Applies ss09, Language-Specific Variants.\\
413 \textbackslash EarlyEnglishFuthorc & Applies ss12, Early English Futhorc.\\
414 \bluerow\textbackslash ElderFuthark & Applies ss13, Elder Futhark.\\
415 \textbackslash YoungerFuthark & Applies ss14, Younger Futhark.\\
416 \bluerow\textbackslash LongBranchToShortTwig & Applies ss15, Long Branch to Short Twig.\\
417 \textbackslash ContextualRRotunda & Applies ss16, Contextual r rotunda.\\
418 \bluerow\textbackslash OldStylePunctuation & Applies ss18, Old-style Punctuation.\\
419 \textbackslash ecv, \textbackslash textcv & Applies a Character Variant feature.\\
420 \hline
421 \end{tabular}
422 % \end{center}
423 \caption{Stylistic Set and Character Variant Commands}
424 \end{table}
425
426 The syntax of \textbackslash ecv
427 is {\color{BrickRed}\verb|\ecv[num]{num}|}, where the second (required) argument is the number of the Character Variant feature,
428 and the first (optional) argument is an index into the variants provided by that feature (starting with zero, the default).
429 \textbackslash textcv takes an additional required argument ({\color{BrickRed}\verb|\textcv[num]{num}{text}|}— the text to which the
430 feature should be applied.
431
432 \begin{table}[ht]
433 \centering
434 \begin{tabular}{|l|l|l|}
435 \hline
436 \textbackslash ecvD & \textbackslash ecvg & \textbackslash ecvs\\
437
438 \textbackslash ecvd & \textbackslash ecvi & \textbackslash ecvT\\
439
440 \textbackslash ecvF & \textbackslash ecvR & \textbackslash ecvT\\
441
442 \textbackslash ecvf & \textbackslash ecvr & \textbackslash ecvt\\
443
444 \textbackslash ecvG & \textbackslash ecvS & \textbackslash ecvTironianEt\\
445 \hline
446 \end{tabular}
447 \caption{Mnemonics for Character Variants}
448 \end{table}
449
450 Character Variant features can also be selected with mnemonics, listed in Table 2. For example, a feature for
451 lowercase \textbf{g} can be expressed as
452
453 \begin{center}
454 {\color{BrickRed}\small\verb|\textcv[1]{\ecvg}{g}|}
455 \end{center}
456
457 \noindent yielding \textbf{\textcv[1]{\ecvg}{g}}, one of the phonetic characters devised by
458 the Middle English poet Orm.
459
460 \vspace*{\fill}
461
462 \begin{center}
463 \itshape This document is set in 12pt Elstob with Weight 350, Optical Size Adjustment -2, and Italic Slant 12.\\
464 The font used for code is Fira Mono,\\
465 and the sans serif font is Fira Sans.
466 \end{center}
467
468 \end{document}