diff options
Diffstat (limited to 'fonts/newcomputermodern/doc/newcm-doc.tex')
-rw-r--r-- | fonts/newcomputermodern/doc/newcm-doc.tex | 148 |
1 files changed, 122 insertions, 26 deletions
diff --git a/fonts/newcomputermodern/doc/newcm-doc.tex b/fonts/newcomputermodern/doc/newcm-doc.tex index de5584b201..69ce5eed3c 100644 --- a/fonts/newcomputermodern/doc/newcm-doc.tex +++ b/fonts/newcomputermodern/doc/newcm-doc.tex @@ -8,6 +8,7 @@ \setotherlanguage[variant=polytonic]{greek} \usepackage[hidelinks,pdfa]{hyperref} %\usepackage{xgreek} +\usepackage{pstricks,hvlogos} \usepackage[default,varnothing]{fontsetup} \usepackage{unicodefonttable,graphicx,wrapfig,xcolor,calc} \newfontfamily\lmboldsans{lmsans10-bold.otf} @@ -20,9 +21,11 @@ \newfontfamily\showtiefont[CharacterVariant=5]{NewCM10-Book.otf} \newfontfamily\ipafont[%Renderer = {Harfbuzz}, StylisticSet = {05},ItalicFont=NewCM10-BookItalic]{NewCM10-Book.otf} -% -%%%%%%% Define Bold Math Font for version bold %%%%%%% -\setmathfont{NewCMMath-Bold.otf}[version=bold] +\newfontfamily\middlegreekon[StylisticSet=7]{NewCM10-Book.otf} +\newfontfamily\middlegreekonsans[StylisticSet=6,StylisticSet=7]{NewCMSans10-Book.otf} +\newfontfamily{\mathastext}{NewCMMath-Book.otf} +\newfontfamily{\mathastextnewcm}[StylisticSet=3]{NewCMMath-Book.otf} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%% Devanagari text %%%% \newfontfamily\hinditext[% Script=Devanagari,% @@ -97,14 +100,17 @@ Language=Nepali, \renewcommand{\arraystretch}{1.4} -\title{The New Computer Modern FontFamily\\ version 6.0.0} +\title{The New Computer Modern FontFamily\\ version 7.0.0} \author{Antonis Tsolomitis} %\address{Department of Mathematics\\ University of the Aegean\\ Karlovassi, 832\,00 Samos\\ Greece} %\netaddress{atsol (at) aegean dot gr} %\personalURL{https://myria.math.aegean.gr/~atsol/} %%% End of metadata %%% -\usepackage{pstricks,hvlogos} \begin{document} +\mathversion{bold} +\newsavebox{\mathcalscrA} +\savebox{\mathcalscrA}{$\symcal A$ $\symbfscr A$} +\mathversion{normal} % \rput(-2,-3){\devgray ल}% @@ -176,17 +182,8 @@ Language=Nepali, \null\thispagestyle{empty} -%\vfill -% -%\ttxstackedup \qquad -%{\ttxstackeddown} -% -%\vfill -% - \newpage -%\end{document} \maketitle \tableofcontents @@ -197,8 +194,8 @@ the number of additional glyphs) of the \verb|lm| fonts. It is not just a family adding random missing glyphs but it adds support for several more languages and shapes needed for academic (and not only) work. Currently it supports among others, Greek\footnote{from Claudio Beccari's Greek.}, -Cyrillic\footnote{from the \texttt{cmu} package.}, Hebrew, Cherokee and -Coptic. Since it supports +Cyrillic\footnote{from the \texttt{cmu} package.}, Devanagari, Hebrew, Coptic, Cherokee and +Canadian Aboriginal. Since it supports diacritics stacking the number of languages that use the Latin alphabet is greatly expanded. Diacritics stacking is also needed for Greek for papyrological work and this is also supported. @@ -222,16 +219,21 @@ and you may not have the latest development version and your patches may not apply if created for the published version. + \section{How to load the fonts} The simpler way to load the fonts is through the \verb|fontsetup| package. The command \verb|\usepackage[default]{fontsetup}| -\noindent will load the Book weight of the NewCM family, and +\noindent will load the Book weight of the NewCM family, \verb|\usepackage[olddefault]{fontsetup}| -\noindent will load the Regular weight. +\noindent will load the Regular weight, and + +\verb|\usepackage[sansdefault]{fontsetup}| + +\noindent will load the Sans Serif NewCM family. Also notice that the fonts support the microtype package for fine typographic tuning. See the documentation of microtype for this. @@ -323,7 +325,7 @@ U10307, U10310, U10312, U10314, U1031F and U1032F are {\sffamily\char"10307\char"10310\char"10312\char"10314\char"1031F\char"1032F}. \subsection{Diacritics Stacking} -\marginpar{\begin{center} +\marginpar{\begin{center} \ \\[-1cm] {\color{red}$\rightarrow$}\ \xstacked\quad{\sffamily\xstacked}\quad{\ttfamily\xstacked}\ {\color{red}$\leftarrow$} \end{center}} Diacritics---the full block U+0300 to U+036F---and diacritics stacking @@ -400,6 +402,36 @@ The full Unicode Greek block is supported, which is Pamphilian digamma (ͷ) etc, have been added. For example, it is now possible to write \centerline{βιϐλίο instead of βιβλίο.} + + In order to auto select this conversion for middle beta and theta the StylisticSets + ss07 must be enabled with, say, + + \noindent\verb|\addfontfeatures{StylisticSet=7}|, + + \noindent but for the Sans and Mono fonts \texttt{StylisticSet=6} is also needed, with + + \noindent\verb|\addfontfeatures{StylisticSet=6,StylisticSet=7}|. + + To disable this feature + you can do + + \noindent\verb|\addfontfeature{RawFeature={-ss07}}| + + or + + \noindent\verb|\addfontfeature{RawFeature={-ss06},RawFeature={-ss07}}| + + for the Sans and Mono families. + + \begin{center} + \begin{tabular}{|c|c|c|} \hline + \texttt{Source} & \texttt{βιβλίο} & \texttt{θυμήθηκα}\\ \hline + \texttt{ss07} enabled & {\middlegreekon βιβλίο} & {\middlegreekon θυμήθηκα}\\ \hline + \texttt{ss06} and \texttt{ss07} enabled for Sans & {\middlegreekonsans βιβλίο}& {\middlegreekonsans θυμήθηκα}\\ \hline + \texttt{ss06} and \texttt{ss07} disabled & βιβλίο, \textsf{βιβλίο} &θυμήθηκα, \textsf{θυμήθηκα} \\ \hline + \end{tabular} + \end{center} + \item U1F00--U1FFF for polytonic, and \item U10140--U1018F for ancient Greek numbers. @@ -797,7 +829,11 @@ Renderer=Harfbuzz]{NewCM10Devanagari-Book.otf} The Devanagari fonts were developed with the help of {\devanagaritext निरंजन} (Niranjan) whose name appears in the copyright section of the fonts and I also thank him for -providing the samples below. +providing the samples below. It should also be noted that the design is original +and based on old handwritten books. In old civilizations, such as the Indian one, +it is only natural that the design be affected by how the handwritten +book look. Ink creates ``drop''-like serifs on paper that absorbs it, and the +tool used to write also affects the look of the script. All these were taken into account. \noindent A Sanskrit sample from {\sanskrittext बृहदारण्यकोपनिषद्} (bṛhadāraṇyakopaniṣad) follows: @@ -1198,6 +1234,8 @@ $$\sqrt[3]{x+y\pm 1}=\sum_{n=1}^\infty \int_{K}f_n(x)\,dx.$$ \setmathfont{NewCMMath-Bold.otf} %[version=bold] %\mathversion{bold} +\setmathfont[range={\mathscr,\mathbfscr},StylisticSet=1]{NewCMMath-Book.otf} + Bold inline: $\sqrt[3]{x+y\pm 1}=\sum_{n=1}^\infty \int_{K}f_n(x)\,dx$ and the same in display $$\sqrt[3]{x+y\pm 1}=\sum_{n=1}^\infty \int_{K}f_n(x)\,dx.$$ @@ -1217,7 +1255,54 @@ or \verb|olddefault| options of the \verb|fontsetup| package, change the math ve to bold with \verb|\mathversion{bold}| \textit{before} the commands for chapter and section and switch back to normal with \verb|\mathversion{normal}| \textit{afterwards}. +The \verb|unicode-math| package, according to it's documentation +has still some troubles with ``versions'' and the \verb|range| options. These seem to affect +at least the calligraphic and script math alphabets. In normal version for example +the commands \verb|\symcal| and \verb|\symscr| work as expected, but when one switches +to the bold version the \verb|\symscr| fails. In this case one can use +\verb|\symbfscr|: \usebox{\mathcalscrA} (which was \verb|$\symcal A$ $\symbfscr A$|). + %\mathversion{normal} + +\subsection{Sans Serif Math} + +\setmathfont{NewCMSansMath-Regular.otf} +\newfontfamily{\sansAmSfont}{NewCMSansMath-Regular.otf} +\renewcommand{\AmS}{{\sansAmSfont $\symcal A$\kern-.1667em\lower.5ex\hbox{$\symcal M$}\kern-.125em$\symcal S$}} + + +As of version 7.0.0, the family includes a full-featured Math Sans font. Up to now such a font +did not exist in the CM family (although partial solutions existed), and it +posed a serious problem for scientific writing especially in the preparation of presentations. +The font supplied with NewCM covers all Unicode math slots but it also provides some new features. +The lowercase Latin alphabet has been completely re-worked so that it really looks +as it should when used for Math variables. The letters are + +$$|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|$$ +In Large +\begin{Large} +$$|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|$$ +\end{Large} +Moreover the calligraphic capitals have been re-worked to match +better with the sans serif style (see subsection~\ref{mathscript} for how to select them) +$$\symcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$ + +Same goes for the \verb|\mathbb/\symbb| capital letters. They have been adjusted to match +the Sans design, both in style and weight: +$$\symbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$ +It is also worth noticing that the SansSerifed and the Serifed letters have swapped slots +in the font. So if using the MathSans font and you write for example \verb|$\symsf{ABCDabcd}$| +you will get the Serifed version(!): $\symsf{ABCDabcd}$. This choice facilitates +converting a document with Serifed fonts using Sans for emphasis or differentiation +to keep these characteristics when changed to Sans. + +One can see the Sans Serif Math font in action in the provided file +\verb|testmath-newcm.pdf| which comes form the \AmS-{\sffamily L\kern-.5ex\raise.5ex\hbox{\textsc{a}}\kern-.2exT\kern-.4ex\lower.6ex\hbox{E}X} +bundle (here the logo is written in NewCMSans). + + + + \setmathfont{NewCMMath-Book.otf} \subsection{Optical sizes for more glyphs} @@ -1235,9 +1320,9 @@ Zoom or print and compare with \texttt{lat\-in\-modern-math} font: \end{center} -\subsection{Math Script} +\subsection{Math Script}\label{mathscript} -Calligraphic letters are accessed as usual with \verb|\mathcal| producing +Calligraphic letters are accessed as usual with \verb|\mathcal| or \verb|\symcal|, producing $$\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$ However, mathematicians often need a second level of ``scriptness''. The fonts @@ -1267,12 +1352,25 @@ $$ \setmathfont{NewCMMath-Book.otf}$$\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$ +\subsection{Math Kerning} + +Math kerning has been added to all NewCM Math fonts. This feature +greatly improves Math typesetting, especially for the calligraphic letters but for regular +letters as well, such as, $Y$ or $\Gamma$. + + +\begin{center} + \includegraphics{mathkern-example.pdf} +\end{center} + + + \subsection{Blackboard Bold} The fonts contain as default the \textsc{ams} blackboard bold. These are: $$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$ $$\mathbb{abcdefghijklmnopqrstuvwxyz}$$ -$$\mathbb{0123456789\ \pi\gamma\Gamma\Pi\Sigma\mitBbbD\mitBbbd\mitBbbe\mitBbbi\mitBbbj}$$ +$$\mathbb{0123456789\ \pi\gamma\Gamma\Pi\textrm{\mathastext\char"2140}\mitBbbD\mitBbbd\mitBbbe\mitBbbi\mitBbbj}$$ They also contain a blackboard bold that matches the design of Computer Modern but respecting the fact that most users have been used for a long period to @@ -1296,7 +1394,7 @@ Then the above blackboard bold design changes to \setmathfont[StylisticSet=3]{NewCMMath-Book.otf} $$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$ $$\mathbb{abcdefghijklmnopqrstuvwxyz}$$ -$$\mathbb{0123456789\ \pi\gamma\Gamma\Pi\Sigma\mitBbbD\mitBbbd\mitBbbe\mitBbbi\mitBbbj}$$ +$$\mathbb{0123456789\ \pi\gamma\Gamma\Pi\textrm{\mathastextnewcm\char"2140}\mitBbbD\mitBbbd\mitBbbe\mitBbbi\mitBbbj}$$ \setmathfont{NewCMMath-Book.otf} \newsavebox{\emptysetdefault} @@ -1518,8 +1616,6 @@ I thank Ulrike Fischer for this solution. - - \begin{thebibliography}{9} \bibitem[\textsc{at}]{1} Antonis Tsolomitis, \textit{The NewComputerModern font family}, \textsc{tug}boat Vol.~\textsc{42}, No.~\textsc{1}, \textsc{2021}. \bibitem[\textsc{ipa}rev]{2} Council actions on revisions of the \textsc{ipa}, Phonetic Representation: b) Revision of the \textsc{ipa}, Journal of the International Phonetic Association, Volume \textsc{23}, Issue \textsc{1}, |