summaryrefslogtreecommitdiff
path: root/fonts/cochineal/doc/cochineal-otf-doc.tex
blob: abecf29a8d24617ca87fa4380a85d8f6e0e5786f (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
% !TEX TS-program = xelatex
\documentclass[11pt]{article} 
\usepackage[margin=1in]{geometry} 
\usepackage[parfill]{parskip}% Begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
%\pdfmapfile{=Cochineal.map}
%\pdfmapfile{=newtx.map}
%\usepackage{amssymb}% don't use with newtxmath
%SetFonts
% cochineal+newtxmath
%\usepackage{fontspec}
%\setmainfont{erewhon}
%\setmainfont{cochineal}
\usepackage[p,osf]{cochineal} % use proportional osf
\setmonofont{Inconsolatazi4-Regular.otf}[Scale=MatchLowercase]
%\usepackage[OT2,LGR,T2A,T1]{fontenc}
%\usepackage{textcomp}
%\usepackage[varqu,varl]{zi4}% inconsolata
%\usepackage{amsmath,amsthm}
%\usepackage[cochineal,vvarbb]{newtxmath}
% option vvarbb gives you stix blackboard bold
%\usepackage[cal=boondoxo]{mathalfa}% less slanted than STIX cal
%\usepackage{bm}
%SetFonts
\usepackage{fonttable}
%\title{The Cochineal Font Package}
%\author{Michael Sharpe}
%\date{\today}  % Activate to display a given date or no date

\begin{document}
\expandafter\show\csname normalfont \endcsname
\setcounter{page}{8}
\section*{Running {\tt cochineal} in XeLaTeX or LuaLaTeX}
The preceding pages of this document were processed using {\tt pdflatex}, which was the only engine supported by {\tt cochineal.sty}. As of version $1.07$, XeLaTeX and LuaLaTeX are also supported. All {\tt cochineal} options and macros formerly limited to {\tt pdflatex} have been modified and now work essentially the same under bother unicode engines, though the output may not always be precisely the same as with {\tt pdflatex}. There are some macros and options available under unicode engines that go beyond what can be done under {\tt pdflatex}.

\textsc{Modified Macros and Options:}
\begin{itemize}
\item
\verb|\textfrac| works better under unicode tex because it is possible to adjust kerning between all characters. The effect should not be very noticable, at least in regular style.
\item {\tt sups}:  the package treats this differently in unicode LaTeX and pdflatex, with handling in the unicode case passed off to the {\tt realscripts} package where the footnote marker font is set to \verb|\normalfont|, meaning that superiors from the current (Cochineal) text font are employed.
\item {\tt theoremfont}, {\tt thmtabular}, {\tt thmlining} all function in a similar manner to {\tt pdflatex}.
\item {\tt swashQ} operates as before.
\item {\tt foresolidus, aftsolidus} are not used in unicode tex.
\item {\tt scosf} operates without change.
%you have the choice of font to render footnote markers. The differences are as follows.
%\begin{itemize}
%\item
%{\bfseries Unicode latex:}
%\begin{itemize}
%\item
%if you include the option {\tt sups} to {\tt cochineal} and there is no {\tt fnmarkerfont=} option set, then  footnote markers are taken from the Cochineal-Roman superiors.
%\item if there is a {\tt fnmarkerfont=} option set, then, whether or not there iss a {\tt sups} option set, then, if available, footnote markers will be taken from the superiors in the font family that {\tt fnmarkerfont=} is set to. (When trying a font family, try this in your preamble:
%\begin{verbatim}
%\newfontfamily\mysu{EBGaramond}{\addfontfeatures{RawFeature=+sups}}
%\end{verbatim}
%and then, in the body of your document, try typesetting
%\begin{verbatim}
%X{\mysu 123}X
%\end{verbatim}

%\end{itemize}
%\item
%{\bfseries pdflatex:}
%\end{itemize}•
%if you do not include the {\tt fnmarkerfont=} option but you do include {\tt sups}, then footnote markers are taken from {\tt Cochineal-Roman-sups}. There is a new option, {\tt fnmarkerfont} that you can use to specify the font to use for footnote markers. It is ignored when using {\tt pdflatex}.
\item \verb|\textcircled| works the same as under {\tt pdflatex}.\textcircled{X}
\end{itemize}
\textsc{New Macros and Options:}
\begin{itemize}
\item
An alternate version of Q, 
\Qswash\space (\verb|\Qswash|) and their small cap versions is available using option {\tt altQ}, which sets {\tt StylisticSet=3}. The alternate versions are {\addfontfeatures{RawFeature=+ss03}Q}, {\addfontfeatures{Style=Swash,RawFeature=+ss03}Q}.
\item
An alternate version of J is available in italic shapes only using option {\tt altJ}, which sets {\tt StylisticSet=2}. The alternate version of \textit{J} is {\itshape {\addfontfeatures{RawFeature=+ss02}\textit{J}}}.
%.\textit{J} {\textbf{Bold}} \textsc{SmallCap}
\item {\tt oldSS} controls whether the new German capital sharp S is used or whether the old SS is retained. The former is the default but the option {\tt oldSS} forces the latter by setting {\tt StylisticSet=1}. The effects are summarized in the following tables.
\begin{center}
  \begin{tabular}{@{} lcl @{}}
    \hline
    Glyph name & glyph & macro\\ 
    \hline
    {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}| or \verb|\SS|\\ 
    {\tt uni1E9E.ss01} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\ 
    {\tt germandbls.sc} & \textsc{\ss} & \verb|{\textsc{\ss}}| \\ 
    {\tt germandbls.sc.ss01} & {\addfontfeature{StylisticSet=1,RawFeature=+smcp}\ss} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\ 
    \hline
  \end{tabular}
\end{center}  
\end{itemize}
%{\bfseries
%\begin{center}
%  \begin{tabular}{@{} lcl @{}}
%    \hline
%    Glyph name & glyph & macro\\ 
%    \hline
%    {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}|\\ 
%    {\tt uni1E9E.alt} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\ 
%    {\tt germandbls.sc.ss01} & {\addfontfeature{StylisticSet=1}\textsc{\ss}} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\ 
%    \hline
%  \end{tabular}
%\end{center}
%}
 \noindent Effect of choice of {\tt StylisticSet}:
 
\begin{center}
  \begin{tabular}{@{} ccccc @{}}
    \hline
    StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\ 
    \hline
    None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\ 
    
    =1 & {\addfontfeature{StylisticSet=1}\ss} & {\addfontfeature{StylisticSet=1}\SS} & {\addfontfeature{StylisticSet=1}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=1}\textsc{\ss}}\\ 
    \hline
  \end{tabular}
\end{center}

\end{document}