| 1 |
\chapter{Junicode and {\TeX}}\hypertarget{JunicodeAndTeX}{} |
| 2 |
|
| 3 |
\section{Loading the packages} |
| 4 |
|
| 5 |
There are packages for both Junicode (the static font) and Junicode VF (the variable font) |
| 6 |
in CTAN, the {\TeX} repository, and also |
| 7 |
in the {\TeX} Live distribution (run \src{tlmgr} to get them). Both static and variable versions |
| 8 |
have a convenient script for loading and managing the font: use |
| 9 |
{\color{BrickRed}\verb|\usepackage{junicode}|} for the static font and |
| 10 |
{\color{BrickRed}\verb|\usepackage{junicodevf}|} for the variable font (which requires \ltech). |
| 11 |
These commands accept several options commonly used in font packages: |
| 12 |
|
| 13 |
\begin{description} |
| 14 |
\item[light] The weight of the type for the main text is light instead of regular. |
| 15 |
\item[medium] The weight of the type for the main text is medium, somewhat heavier than regular. |
| 16 |
\item[semibold] The weight of bold type is somewhat lighter than the usual bold. This may be a |
| 17 |
good choice if you have selected the \option{light} option. |
| 18 |
\item[condensed] The width of the type is narrow. Note that in the static font, |
| 19 |
bold type cannot be condensed: when |
| 20 |
this option is selected, any bold type in the text will have normal width. |
| 21 |
\item[semicondensed] The width of the type is wider than condensed but narrower than the default. |
| 22 |
In the static font, bold type cannot be semicondensed. |
| 23 |
\item[expanded] The width of the type is about 125\%. Note that in the static font, light type |
| 24 |
cannot be expanded: using both the \option{light} and the \option{expanded} options will produce |
| 25 |
an error. |
| 26 |
\item[semiexpanded] The width of the type is wider than the default but narrower than expanded. |
| 27 |
In the static font, light type cannot be semiexpanded. |
| 28 |
\item[proportional] Numbers in the document will be proportionally spaced. This is the default. |
| 29 |
\item[tabular] Numbers will be tabular (or monospaced). |
| 30 |
\item[oldstyle] Numbers will be old-style, harmonizing with lowercase letters. |
| 31 |
\item[lining] Numbers will be lining, harmonizing with uppercase letters. |
| 32 |
\item[renderer] Choose a renderer: this can be any of those accepted by fontspec (the default |
| 33 |
is OpenType). This should not generally be changed. |
| 34 |
\end{description} |
| 35 |
|
| 36 |
\noindent With the variable font, terms like “light” and “semibold” (and, for that matter, |
| 37 |
“regular”) do not denote a fixed |
| 38 |
shape the way they do with the static font, but rather a |
| 39 |
range of weights and widths that vary with the point size. You can see these variations |
| 40 |
if we scale a line of footnote |
| 41 |
text and a line of header text to the same {\color{BrickRed}\verb|\large|} size: |
| 42 |
|
| 43 |
\begin{quote} |
| 44 |
\large\samplefootnote Here is some sample text for footnotes (about 8pt).\\ |
| 45 |
\sampleheader Here is some sample text for headers (18pt or larger). |
| 46 |
\end{quote} |
| 47 |
|
| 48 |
\noindent The glyphs for footnote text are heavier and wider than those for headers, recalling the way |
| 49 |
punchcutters in the era of metal type often designed small sizes to be relatively thicker and wider |
| 50 |
than main text or titles. This promoted legibility at small sizes and also evenness of color on |
| 51 |
pages with diverse text blocks. |
| 52 |
|
| 53 |
Junicode VF provides vastly more flexibility than static Junicode, starting with two options that go |
| 54 |
with the weight and width options listed above: |
| 55 |
|
| 56 |
\begin{description} |
| 57 |
\item[weightadjustment] Adjusts the weight of the type by adding this number. |
| 58 |
For example, if you choose \option{medium} for your document (weight averaging about 500) |
| 59 |
and \option{bold} (weight around 700), and also include the option \src{weightadjustment=-25}, |
| 60 |
then the weights of medium and bold text will be lightened by 25 (to 475 and 675). |
| 61 |
\item[widthadjustment] Adjusts the width of the type by adding this number. For example, if you |
| 62 |
choose \option{semicondensed} for your document (width averaging 87.5), and you also include |
| 63 |
the option {\color{BrickRed}\verb|widthadjustment=5|}, then the average width will be 92.5, between |
| 64 |
\option{semicondensed} and \option{regular}. |
| 65 |
\end{description} |
| 66 |
|
| 67 |
\section{Advanced Options} |
| 68 |
|
| 69 |
If you are using the variable font and the basic options listed above don't yield the results |
| 70 |
you want, the options listed in this section allow you to choose from an effectively infinite |
| 71 |
number of styles. Do this by supplying custom axis coordinates for one or more of the four basic |
| 72 |
styles of the main text (Regular, Italic, Bold, BoldItalic) via package options called |
| 73 |
\option{SizeFeatures}. For example, here are the \option{SizeFeatures} for this document: |
| 74 |
|
| 75 |
\footnotesize |
| 76 |
\begin{verbatim} |
| 77 |
\usepackage[ |
| 78 |
MainRegularSizeFeatures={ |
| 79 |
{size=8.6,wght=550,wdth=120}, |
| 80 |
{size=10.99,wght=475,wdth=115}, |
| 81 |
{size=21.59,wght=400,wdth=112.5}, |
| 82 |
{size=21.59,wght=351,wdth=100} |
| 83 |
}, |
| 84 |
MainItalicSizeFeatures={ |
| 85 |
{size=8.6,wght=550,wdth=118}, |
| 86 |
{size=10.99,wght=475,wdth=114}, |
| 87 |
{size=21.59,wght=450,wdth=111}, |
| 88 |
{size=21.59,wght=372,wdth=98} |
| 89 |
}, |
| 90 |
MainBoldSizeFeatures={ |
| 91 |
{size=8.6,wght=700,wdth=120}, |
| 92 |
{size=10.99,wght=700,wdth=115}, |
| 93 |
{size=21.59,wght=650,wdth=112.5}, |
| 94 |
{size=21.59,wght=600,wdth=100} |
| 95 |
}, |
| 96 |
MainBoldItalicSizeFeatures={ |
| 97 |
{size=8.6,wght=700,wdth=118}, |
| 98 |
{size=10.99,wght=700,wdth=114}, |
| 99 |
{size=21.59,wght=650,wdth=111}, |
| 100 |
{size=21.59,wght=600,wdth=98} |
| 101 |
} |
| 102 |
]{junicodevf} |
| 103 |
\end{verbatim} |
| 104 |
\normalsize |
| 105 |
|
| 106 |
\noindent These options consist of lists of associative arrays, each |
| 107 |
prescribing axis coordinates for a range of sizes. In these arrays, |
| 108 |
the \src{size} key is mandatory: any array without one is ignored. The |
| 109 |
arrays should be in order of point size. The first array |
| 110 |
prescribes axis coordinates for all sizes up to \src{size}, the last array for all sizes |
| 111 |
greater than \src{size}, and any intermediate arrays a range from the previous to the |
| 112 |
current \src{size}.\footnote{\ % |
| 113 |
If you want only one size array, make \src{size} improbably low (e.g. 5) and place |
| 114 |
a comma after the closing brace of the array.% |
| 115 |
} So the ranges covered in each list above are \src{-8.6}, \src{8.6-10.99}, |
| 116 |
\src{10.99-21.59}, |
| 117 |
and \src{21.59-}.\footnote{\ Any modification of the default text size (e.g. in the |
| 118 |
\src{\textbackslash documentclass} command) can affect the size definitions in these |
| 119 |
arrays, with the result that (for example) |
| 120 |
\src{10} no longer means exactly “ten points.” You may have to experiment to get these numbers |
| 121 |
right.} |
| 122 |
|
| 123 |
The keys other than \src{size} are the four-letter tags for the font's axes: \src{wght} |
| 124 |
(Weight), \src{wdth} (Width), and \src{ENLA} (Enlarge).\footnote{\ % |
| 125 |
By convention, tags for axes defined in the OpenType standard are lowercase; custom axes |
| 126 |
are uppercase. Junicode’s \src{ENLA} is a custom axis.% |
| 127 |
} When a key |
| 128 |
is omitted, the default value for that axis is used. It is up to the user to make sure the values |
| 129 |
given for each axis are valid---the package does no checking (though {\fspec} will do a good bit |
| 130 |
of checking for you). When \option{SizeFeatures} are given in |
| 131 |
this way, they override any other options that set or change axis coordinates |
| 132 |
(e.g. \option{weightadjustment}). |
| 133 |
|
| 134 |
The \option{SizeFeatures} options can only set axis coordinates; with the \option{Features} |
| 135 |
options you can |
| 136 |
set OpenType features for the main text or for the four main styles individually. |
| 137 |
|
| 138 |
For example, if you want your document to use the conventions observed by early |
| 139 |
English typesetters for the distribution of \textex{s} and \textex{ſ}, load the |
| 140 |
package this way: |
| 141 |
|
| 142 |
\footnotesize |
| 143 |
\begin{verbatim} |
| 144 |
\usepackage[MainFeatures={ |
| 145 |
Language=English, |
| 146 |
StylisticSet=8 |
| 147 |
}]{junicodevf} |
| 148 |
\end{verbatim} |
| 149 |
\normalsize |
| 150 |
|
| 151 |
\noindent If you want to use these conventions only for text in the regular style, use |
| 152 |
\option{MainRegularFeatures} instead of \option{MainFeatures}. For the other styles, use |
| 153 |
\option{MainItalicFeatures}, \option{MainBoldFeatures}, and \option{MainBoldItalicFeatures}. |
| 154 |
All of the |
| 155 |
features you pass via these options must be valid for \fspec: in fact, |
| 156 |
they are passed straight through to \fspec. |
| 157 |
|
| 158 |
\section{Selecting Alternate Styles} |
| 159 |
|
| 160 |
In addition to the document's main font, you can choose from up to fifty |
| 161 |
predefined styles---thirty-eight if you are using the static font (in the list below, |
| 162 |
styles available only to variable font users are {\color{BrickRed}red}). |
| 163 |
The commands for shifting to these |
| 164 |
styles are as follows (of the italic styles, only the base “jItalic” is listed; |
| 165 |
append “Italic” to any of the others, except “jRegular”): |
| 166 |
|
| 167 |
\begin{multicols}{3} |
| 168 |
\jCond\textbackslash jRegular |
| 169 |
|
| 170 |
\textbackslash jItalic |
| 171 |
|
| 172 |
\textbackslash jCond |
| 173 |
|
| 174 |
\textbackslash jSmCond |
| 175 |
|
| 176 |
\textbackslash jSmExp |
| 177 |
|
| 178 |
\textbackslash jExp |
| 179 |
|
| 180 |
\textbackslash jLight |
| 181 |
|
| 182 |
\textbackslash jCondLight |
| 183 |
|
| 184 |
\textbackslash jSmCondLight |
| 185 |
|
| 186 |
{\color{BrickRed}\textbackslash jSmExpLight} |
| 187 |
|
| 188 |
{\color{BrickRed}\textbackslash jExpLight} |
| 189 |
|
| 190 |
\textbackslash jMedium |
| 191 |
|
| 192 |
\textbackslash jCondMedium |
| 193 |
|
| 194 |
\textbackslash jSmCondMedium |
| 195 |
|
| 196 |
\textbackslash jSmExpMedium |
| 197 |
|
| 198 |
\textbackslash jExpMedium |
| 199 |
|
| 200 |
\textbackslash jSmbold |
| 201 |
|
| 202 |
{\color{BrickRed}\textbackslash jCondSmbold} |
| 203 |
|
| 204 |
{\color{BrickRed}\textbackslash jSmCondSmbold} |
| 205 |
|
| 206 |
\textbackslash jSmExpSmbold |
| 207 |
|
| 208 |
\textbackslash jExpSmbold |
| 209 |
|
| 210 |
\textbackslash jBold |
| 211 |
|
| 212 |
{\color{BrickRed}\textbackslash jCondBold} |
| 213 |
|
| 214 |
{\color{BrickRed}\textbackslash jSmCondBold} |
| 215 |
|
| 216 |
\textbackslash jSmExpBold |
| 217 |
|
| 218 |
\textbackslash jExpBold |
| 219 |
|
| 220 |
\end{multicols} |
| 221 |
|
| 222 |
\noindent These commands will be self-explanatory if you bear in mind Junicode's |
| 223 |
abbreviations for style names: Cond=Condensed, Exp=Expanded, Sm=Semi.\footnote{\ % |
| 224 |
The purpose of these abbreviations is to keep font names under the character-limit |
| 225 |
imposed by some systems.} Use |
| 226 |
them to shift temporarily to a style other than that of the main text. |
| 227 |
For example, to shift to the Condensed Light style for a short phrase, use |
| 228 |
this code: |
| 229 |
\begin{center} |
| 230 |
{\color{BrickRed}\small\verb|{\jCondLight a short phrase}|}. |
| 231 |
\end{center} |
| 232 |
The result: {\jCondLight a short phrase}. |
| 233 |
|
| 234 |
To add features to any of these styles (variable font only), use the style name |
| 235 |
(without the prefixed “j” and with \option{Features} appended) |
| 236 |
as a package option. To change the size features for the style, |
| 237 |
do the same, but with \option{SizeFeatures} instead of \option{Features} |
| 238 |
appended: |
| 239 |
|
| 240 |
\footnotesize |
| 241 |
\begin{verbatim} |
| 242 |
\usepackage[ |
| 243 |
CondLightFeatures={ |
| 244 |
Language=English, |
| 245 |
StylisticSet=2 |
| 246 |
}, |
| 247 |
CondLightSizeFeatures={{size=5,wght=325,wdth=80},} |
| 248 |
]{junicodevf} |
| 249 |
\end{verbatim} |
| 250 |
\normalsize |
| 251 |
|
| 252 |
\noindent This will shift text in the Condensed Light style from default to insular |
| 253 |
letter-shapes and slightly increase the weight and width of all glyphs in that style. |
| 254 |
Here the \option{SizeFeatures} section is very simple (as in the package file itself), |
| 255 |
but you can have as many size ranges as you want, just as you can for the main font. |
| 256 |
|
| 257 |
\section{The Enlarge Axis} |
| 258 |
|
| 259 |
The variable package defines four different styles for Junicode VF’s |
| 260 |
\hyperlink{enlarge}{Enlarge axis}, in four sizes: |
| 261 |
|
| 262 |
\begin{center} |
| 263 |
\begin{tabular}{ l l l } |
| 264 |
Not Enlarged & abc & \textit{abc}\\ |
| 265 |
\textbackslash EnlargedOne & {\EnlargedOne abc} & {\EnlargedOneItalic abc}\\ |
| 266 |
\textbackslash EnlargedTwo & {\EnlargedTwo abc} & {\EnlargedTwoItalic abc}\\ |
| 267 |
\textbackslash EnlargedThree & {\EnlargedThree abc} & {\EnlargedThreeItalic abc}\\ |
| 268 |
\textbackslash EnlargedFour & {\EnlargedFour abc} & {\EnlargedFourItalic abc}\\ |
| 269 |
\end{tabular} |
| 270 |
\end{center} |
| 271 |
|
| 272 |
\noindent You can produce an italic version of the enlarged minuscule by appending “Italic” to |
| 273 |
the style name. You can also customize these styles with \option{SizeFeatures}: |
| 274 |
|
| 275 |
\footnotesize |
| 276 |
\begin{verbatim} |
| 277 |
\usepackage[ |
| 278 |
EnlargedThreeSizeFeatures={{size=5,ENLA=85},} |
| 279 |
]{junicodevf} |
| 280 |
\end{verbatim} |
| 281 |
\normalsize |
| 282 |
|
| 283 |
\noindent This example will set all axes except for \src{ENLA} to their default coordinates. |
| 284 |
You can, of course, define other axes, and, as with Junicode’s other \option{SizeFeatures} options, |
| 285 |
as many size arrays as you like. \option{Features} options are not available for the Enlarged |
| 286 |
styles. |
| 287 |
|
| 288 |
\section{Other Commands} |
| 289 |
|
| 290 |
The font packages’ other commands (listed in the following table) are offered as conveniences, |
| 291 |
being shorter and more |
| 292 |
mnemonic than the {\fspec} commands they invoke (though of course all {\fspec} commands |
| 293 |
remain available). Each of these commands |
| 294 |
also has a corresponding “text” command that works like |
| 295 |
{\color{BrickRed}\verb|\textit{}|}---that is, it takes |
| 296 |
as its sole argument the text to which the command will be applied. Each “text” command |
| 297 |
consists of the main command with “text” prefixed---for example, |
| 298 |
{\color{BrickRed}\verb|\textInsularLetterForms{}|} |
| 299 |
corresponding to {\color{BrickRed}\verb|\InsularLetterForms|}. For a fuller account of the OpenType features |
| 300 |
applied by these commands, see \hyperlink{FeatureReference}{Chapter 4, Feature Reference}. |
| 301 |
|
| 302 |
\begin{center}\small |
| 303 |
%\begin{table}[ht] |
| 304 |
\centering |
| 305 |
\tablehead{\hline} |
| 306 |
\tabletail{\hline} |
| 307 |
\begin{supertabular}{| l | p{2.75in} |} |
| 308 |
\bluerow\textbackslash AltThornEth & Applies ss01,\index{ss01} Alternate thorn and eth.\\ |
| 309 |
\textbackslash InsularLetterForms & Applies ss02,\index{ss02} Insular letter-forms.\\ |
| 310 |
\bluerow\textbackslash IPAAlternates & Applies ss03,\index{ss03} IPA alternates.\\ |
| 311 |
\textbackslash HighOverline & Applies ss04,\index{ss04} High Overline.\\ |
| 312 |
\bluerow\textbackslash MediumHighOverline & Applies ss05,\index{ss05} Medium-high Overline.\\ |
| 313 |
\textbackslash EnlargedMinuscules & Applies ss06,\index{ss06} Enlarged minuscules.\\ |
| 314 |
\bluerow\textbackslash Underdotted & Applies ss07,\index{ss07} Underdotted.\\ |
| 315 |
\textbackslash ContextualLongS & Applies ss08,\index{ss08} Contextual long s.\\ |
| 316 |
\bluerow\textbackslash AlternateFigures & Applies ss09,\index{ss09} Alternate Figures.\\ |
| 317 |
\textbackslash EntitiesAndTags & Applies ss10,\index{ss10} Entities and Tags.\\ |
| 318 |
\bluerow\textbackslash EarlyEnglishFuthorc & Applies ss12,\index{ss12} Early English Futhorc.\\ |
| 319 |
\textbackslash ElderFuthark & Applies ss13,\index{ss13} Elder Futhark.\\ |
| 320 |
\bluerow\textbackslash YoungerFuthark & Applies ss14,\index{ss14} Younger Futhark.\\ |
| 321 |
\textbackslash LongBranchToShortTwig & Applies ss15,\index{ss15} Long Branch to Short Twig.\\ |
| 322 |
\bluerow\textbackslash ContextualRRotunda & Applies ss16,\index{ss16} Contextual r rotunda.\\ |
| 323 |
\textbackslash RareDigraphs & Applies ss17,\index{ss17} Rare Digraphs.\\ |
| 324 |
\bluerow\textbackslash OldStylePunctuation & Applies ss18,\index{ss18} Old-style Punctuation.\\ |
| 325 |
\textbackslash LatinToGothic & Applies ss19,\index{ss19} Latin to Gothic.\\ |
| 326 |
\bluerow\textbackslash LowDiacritics & Applies ss20,\index{ss20} Low Diacritics.\\ |
| 327 |
\textbackslash jcv, \textbackslash textcv & Applies any Character Variant feature (see below).\\ |
| 328 |
\end{supertabular} |
| 329 |
%\caption{Stylistic Set and Character Variant Commands} |
| 330 |
%\end{table} |
| 331 |
\end{center} |
| 332 |
|
| 333 |
The syntax of \textbackslash jcv |
| 334 |
is {\color{BrickRed}\verb|\jcv[num]{num}|}, where the second (required) argument is the number of the Character Variant feature, |
| 335 |
and the first (optional) argument is an index into the variants provided by that feature (starting with zero, the default). |
| 336 |
\textbackslash textcv takes an additional required argument ({\color{BrickRed}\verb|\textcv[num]{num}{text}|}---the text to which the |
| 337 |
feature should be applied. |
| 338 |
|
| 339 |
Character Variant features can also be selected by means of commands consisting of the prefix |
| 340 |
{\color{BrickRed}\verb|\jcv|} plus any letter of the basic Latin alphabet (e.g. {\color{BrickRed}\verb|\jcvA|}, |
| 341 |
{\color{BrickRed}\verb|\jcvz|}), or any of the mnemonics below. |
| 342 |
For example, a feature for |
| 343 |
lowercase \textbf{a} can be expressed as {\color{BrickRed}\verb|\textcv[2]{\jcva}{a}|},\index{cv02} |
| 344 |
yielding \textbf{\textcv[2]{\jcva}{a}}. |
| 345 |
|
| 346 |
\begin{multicols}{3} |
| 347 |
\small\jCond\textbackslash jcvaa |
| 348 |
|
| 349 |
\textbackslash jcvAE |
| 350 |
|
| 351 |
\textbackslash jcvae |
| 352 |
|
| 353 |
\textbackslash jcvAO |
| 354 |
|
| 355 |
\textbackslash jcvao |
| 356 |
|
| 357 |
\textbackslash jcvAogonek |
| 358 |
|
| 359 |
\textbackslash jcvaogonek |
| 360 |
|
| 361 |
\textbackslash jcvASCIItilde |
| 362 |
|
| 363 |
\textbackslash jcvasterisk |
| 364 |
|
| 365 |
\textbackslash jcvav |
| 366 |
|
| 367 |
\textbackslash jcvbrevebelow |
| 368 |
|
| 369 |
\textbackslash jcvcombiningdieresis |
| 370 |
|
| 371 |
\textbackslash jcvcombiningdoublemacron |
| 372 |
|
| 373 |
\textbackslash jcvcombininginsulard |
| 374 |
|
| 375 |
\textbackslash jcvcombiningopena |
| 376 |
|
| 377 |
\textbackslash jcvcombiningoverline |
| 378 |
|
| 379 |
\textbackslash jcvcombiningrrotunda |
| 380 |
|
| 381 |
\textbackslash jcvcombiningzigzag |
| 382 |
|
| 383 |
\textbackslash jcvcomma |
| 384 |
|
| 385 |
\textbackslash jcvcurrency |
| 386 |
|
| 387 |
\textbackslash jcvdbar |
| 388 |
|
| 389 |
\textbackslash jcvdcroat |
| 390 |
|
| 391 |
\textbackslash jcvEng |
| 392 |
|
| 393 |
\textbackslash jcvEogonek |
| 394 |
|
| 395 |
\textbackslash jcvetabbrev |
| 396 |
|
| 397 |
\textbackslash jcvexclam |
| 398 |
|
| 399 |
\textbackslash jcvflorin |
| 400 |
|
| 401 |
\textbackslash jcvGermanpenny |
| 402 |
|
| 403 |
\textbackslash jcvglottal |
| 404 |
|
| 405 |
\textbackslash jcvlb |
| 406 |
|
| 407 |
\textbackslash jcvlhighstroke %somehow escaped the documentation |
| 408 |
|
| 409 |
\textbackslash jcvmacron |
| 410 |
|
| 411 |
\textbackslash jcvmiddot |
| 412 |
|
| 413 |
\textbackslash jcvoPolish |
| 414 |
|
| 415 |
\textbackslash jcvounce |
| 416 |
|
| 417 |
\textbackslash jcvperiod |
| 418 |
|
| 419 |
\textbackslash jcvpunctuselevatus |
| 420 |
|
| 421 |
\textbackslash jcvquestion |
| 422 |
|
| 423 |
\textbackslash jcvrum |
| 424 |
|
| 425 |
\textbackslash jcvsemicolon |
| 426 |
|
| 427 |
\textbackslash jcvslash |
| 428 |
|
| 429 |
\textbackslash jcvspacingusabbrev |
| 430 |
|
| 431 |
\textbackslash jcvspacingzigzag |
| 432 |
|
| 433 |
\textbackslash jcvsterling |
| 434 |
|
| 435 |
\textbackslash jcvthorncrossed |
| 436 |
|
| 437 |
\textbackslash jcvTironianEt |
| 438 |
|
| 439 |
\textbackslash jcvYogh |
| 440 |
\end{multicols} |