diff options
Diffstat (limited to 'Master/texmf-dist/doc/fonts/lato/lato.tex')
-rw-r--r-- | Master/texmf-dist/doc/fonts/lato/lato.tex | 377 |
1 files changed, 283 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/fonts/lato/lato.tex b/Master/texmf-dist/doc/fonts/lato/lato.tex index f5cc4e9a687..705a6efbc59 100644 --- a/Master/texmf-dist/doc/fonts/lato/lato.tex +++ b/Master/texmf-dist/doc/fonts/lato/lato.tex @@ -1,5 +1,5 @@ %% lato.tex -%% Copyright 2011 Mohamed El Morabity +%% Copyright 2017 Mohamed El Morabity % % This work may be distributed and/or modified under the conditions of the LaTeX % Project Public License, either version 1.3 of this license or (at your option) @@ -13,13 +13,16 @@ % % This work consists of all files listed in manifest.txt. -\documentclass{article} + +\documentclass{ltxdoc} \usepackage[american]{babel} \usepackage{booktabs} -\usepackage[default]{lato} +\usepackage[T1]{fontenc} +\usepackage{hologo} +\usepackage[scale=1.12808,mono]{inconsolata} +\usepackage[default,type1]{lato} \usepackage{microtype} -\usepackage{multirow} \usepackage{path} \usepackage{varioref} \usepackage[colorlinks]{hyperref} @@ -29,16 +32,22 @@ pdfauthor={Mohamed El Morabity}% }% -\newcommand{\acronym}[1]{\textsc{\lowercase{#1}}} +\newcommand{\version}{3.0} + +\newcommand{\acronym}[1]{\mbox{\liningfigures{#1}}} \newcommand{\code}{\texttt} \newcommand{\command}{\texttt} +\newcommand{\option}{\texttt} \newcommand{\email}[1]{\href{mailto:#1}{\nolinkurl{#1}}} \newcommand{\name}{} -\newcommand{\package}{\texttt} +\newcommand{\pkg}{\texttt} \newcommand{\parameter}[1]{\textnormal{\textit{#1}}} \newcommand{\program}{} -\title{\LaTeX{} support for Lato\\Version~2.2} +\newcommand{\figuresampleone}{+142\,521\,458.11~\texteuro} +\newcommand{\figuresampletwo}{\textminus 21\,173.91~\$} + +\title{\LaTeX{} support for Lato\\Version~\version} \author{Mohamed \name{El~Morabity}\\\email{melmorabity@fedoraproject.org}} @@ -50,33 +59,24 @@ \section{Introduction} -Lato is a sanserif typeface family designed in the Summer~2010 by Warsaw-based -designer Ćukasz \name{Dziedzic} for the tyPoland foundry (see -figure~\vref{styles}). This font is available at its web site~\cite{lato} as -TrueType files licensed under the \acronym{OFL} version~1.1. +Lato is a sans-serif typeface family designed in the Summer~2010 by +Warsaw-based designer \L ukasz \name{Dziedzic}~\cite{dziedzic} for the +tyPoland foundry. -\begin{figure} - \centering - {% - \flafamily% - {\fontseries{el}\selectfont Lato Hairline}\\ - {\fontseries{el}\selectfont\itshape Lato Hairline Italic}\\ - {\fontseries{l}\selectfont Lato Light}\\ - {\fontseries{l}\selectfont\itshape Lato Light Italic}\\ - Lato Regular\\ - {\itshape Lato Italic}\\ - {\bfseries Lato Bold}\\ - {\bfseries\itshape Lato Bold Italic}\\ - {\fontseries{eb}\selectfont Lato Black}\\ - {\fontseries{eb}\selectfont\itshape Lato Black Italic}% - } - \caption{Available styles for Lato} - \label{styles} -\end{figure} - -This package provides support for this font in \LaTeX{}. It includes the -original TrueType fonts, as well as Type~1 versions, converted for this package -using \program{FontForge} for full support with \program{Dvips}. +Lato consists of nine weights (plus corresponding italics) and +supports more than 100~Latin-based languages, more than +50~Cyrillic-based languages as well as Greek and IPA phonetics. + +The font is available at its web site~\cite{lato} as +\acronym{TTF}-flavored OpenType files licensed under the \acronym{OFL} +version~1.1~\cite{ofl}. + +This package provides support for this font in \LaTeX, including +\hologo{XeLaTeX} and \hologo{LuaLaTeX}. It includes the original +OpenType fonts, as well as Type~1 versions, converted for this package +using \program{FontForge}~\cite{fontforge} and +\program{cfftot1}~\cite{cfftot1} for full support with \LaTeX{} and +\program{Dvips}. \section{Installation} @@ -85,18 +85,26 @@ These directions assume that your \TeX{} distribution is Once the \path|lato.zip| archive extracted: \begin{enumerate} -\item Copy \path|doc/|, \path|fonts/|, \path|source/|, and \path|tex/| - directories to your \path|texmf/| directory (either your local or global +\item Copy \path|doc/|, \path|fonts/|, and \path|tex/| directories to + your \path|texmf/| directory (either your local or global \path|texmf/| directory). -\item Run \command{mktexlsr} to refresh the file name database and make \TeX{} - aware of the new files. -\item Run \command{updmap --enable Map lato.map} to make \program{Dvips}, - \program{dvipdf} and \program{pdf\TeX} aware of the new fonts. +\item Run \command{mktexlsr} to refresh the file name database and + make \TeX{} aware of the new files. +\item Run \command{updmap --enable Map lato.map}\footnote{Starting + with \TeX Live~2017, use \command{updmap-user} for a local + installation, or \command{updmap-sys} for a global one.} to make + \program{Dvips}, \program{dvipdf} and \program{\TeX} aware of the + new fonts. \end{enumerate} -Note that this package requires the \package{keyval}~\cite{keyval} and -\package{slantsc}~\cite{slantsc} (to handle italic/slanted small caps) ones to -work. +Note that this package requires the following packages to work: +\begin{itemize} +\item \pkg{fontaxes} +\item \pkg{fontspec} (for \hologo{XeLaTeX}/\hologo{LuaLaTeX} support) +\item \pkg{ifluatex} +\item \pkg{ifxetex} +\item \pkg{xkeyval} +\end{itemize} \section{Usage} @@ -106,116 +114,297 @@ You can use the Lato font in a \LaTeX{} document by adding the command \begin{verbatim} \usepackage{lato} \end{verbatim} -to the preamble. The package supplies the \code{\char`\\flafamily} command to +to the preamble. The package supplies the \cmd{\lato} command to switch the current font to Lato. \subsection{Options} \subsubsection{Lato as default (sans-serif) font} -You can set \LaTeX{} to use Lato as standard font throughout the whole document -by passing the \code{default} option to the package: +You can set \LaTeX{} to use Lato as standard font throughout the whole +document by passing the \option{default} option to the package: \begin{verbatim} \usepackage[default]{lato} \end{verbatim} -To set Lato as default sans-serif only: +To set Lato as default sans-serif only, use the \option{defaultsans} +option: \begin{verbatim} \usepackage[defaultsans]{lato} \end{verbatim} +\subsubsection{OpenType vs. Type~1} + +Depending on the \LaTeX{} rendering engine used, the package will +automatically use: +\begin{itemize} +\item OpenType fonts with \program{\hologo{XeLaTeX}} and + \program{\hologo{LuaLaTeX}} (the \pkg{fontspec} package will be + therefore loaded) +\item Type~1 fonts with all other \LaTeX{} rendering engines + (especially \program{\hologo{pdfLaTeX}}) +\end{itemize} + +The package was written to provide same functionalities whatever the +\TeX{} rendering engine used. Notice that OpenType fonts supply more +typographic features like additional ligatures or stylistic +alternatives. The table~\vref{tab:features} describes all OpenType +features supported by the Lato font family. Please refer to the +\pkg{fontspec} package documentation~\cite{fontspecdoc} to enable such +features in your documents with \hologo{XeLaTeX} or \hologo{LuaLaTeX}. + +\begin{table} + \centering + \begin{tabular}{ccc} + \toprule + Feature & Description & \pkg{fontspec} option\\ + \midrule + \code{calt} & Contextual Alternates & \code{Contextuals=Alternate}\\ + \code{case} & Case-Sensitive Forms & \code{Letters=Uppercase}\\ + \code{dlig} & Discretionary Ligatures & \code{Ligatures=Rare}\\ + \code{dnom} & Denominators & \code{VerticalPosition=Denominator}\\ + \code{frac} & Fractions & \code{Fractions=On}\\ + \code{kern} & Kerning & \code{Kerning=On}\\ + \code{liga} & Standard Ligatures & \code{Ligatures=Common}\\ + \code{lnum} & Lining Figures & \code{Numbers=Uppercase}\\ + \code{mark} & Mark Positioning & \code{Diacritics=MarkToBase}\\ + \code{numr} & Numerators & \code{VerticalPosition=Numerator}\\ + \code{onum} & Oldstyle Figures & \code{Numbers=Lowercase}\\ + \code{ordn} & Ordinals & \code{VerticalPosition=Ordinal}\\ + \code{pnum} & Proportional Figures & \code{Numbers=Proportional}\\ + \code{salt} & Stylistic Alternates & \code{Style=Alternate}\\ + \code{sinf} & Scientific Inferiors & \code{VerticalPosition=ScientificInferior}\\ + \code{ss01} & Stylistic Set 1 & \code{Alternate=1}\\ + \code{ss02} & Stylistic Set 2 & \code{Alternate=2}\\ + \code{ss03} & Stylistic Set 3 & \code{Alternate=3}\\ + \code{ss04} & Stylistic Set 4 & \code{Alternate=4}\\ + \code{subs} & Subscript & \code{VerticalPosition=Inferior}\\ + \code{sups} & Superscript & \code{VerticalPosition=Superior}\\ + \code{tnum} & Tabular Figures & \code{Numbers=Monospaced}\\ + \bottomrule + \end{tabular} + \caption{OpenType font features supported by Lato fonts} + \label{tab:features} +\end{table} + +To force Type~1 fonts with \program{\hologo{XeLaTeX}} or +\program{\hologo{LuaLaTeX}}, use the \option{type1} option. This may +be useful to avoid loading the \pkg{fontspec} package. + \subsubsection{Font scaling} -The font can be up- and downscale by any factor. This can be used to make Lato -more friendly when used in company with other type faces, e.g., to adapt the -x-height. The package option \code{scale=\parameter{ratio}} will scale the font -according to \parameter{ratio} (1.0 by default), for example: +The font can be up- and downscale by any factor. This can be used to +make Lato more friendly when used in company with other type faces, +e.g., to adapt the x-height. The package option +\option{scale=\parameter{ratio}} will scale the font according to +\parameter{ratio} (1.0 by default), for example: \begin{verbatim} \usepackage[scale=0.95]{lato} \end{verbatim} -\subsection{Encodings} +\subsubsection{Figure versions} + +Lato provides two figure styles (see table~\vref{tab:figures}): + +\begin{itemize} + \item \emph{Lining figures}, designed to match the uppercase letters + in size and color + \item \emph{Old style figures} (also known as text figures), + designed to match lowercase letters +\end{itemize} + +The \pkg{lato} package uses lining figures by default +(\option{lining} option). To select old style figures, use the +\option{oldstyle} option. + +Two figure widths are also available: +\begin{itemize} + \item \emph{Tabular figures}, which each have the same width + \item \emph{Proportional figures}, which vary in width according to + their shape +\end{itemize} + +The \pkg{lato} package uses tabular figures by default +(\option{tabular} option). To select proportional figures, use the +\option{proportional} option. + +\begin{table} + \centering + \begin{tabular}{crr} + \toprule + & \multicolumn{1}{c}{Lining figures} & \multicolumn{1}{c}{Old style figures}\\ + \midrule + Tabular figures& \lato\tabularfigures{\liningfigures{\figuresampleone}} & \lato\tabularfigures{\textfigures{\figuresampleone}}\\ + & \lato\tabularfigures{\liningfigures{\figuresampletwo}} & \lato\tabularfigures{\textfigures{\figuresampletwo}}\\ + \midrule + Proportional figures& \lato\proportionalfigures{\liningfigures{\figuresampleone}} & \lato\proportionalfigures{\textfigures{\figuresampleone}}\\ + & \lato\proportionalfigures{\liningfigures{\figuresampletwo}} & \lato\proportionalfigures{\textfigures{\figuresampletwo}}\\ + \bottomrule + \end{tabular} + \caption{Figure styles} + \label{tab:figures} +\end{table} -The following encodings are supported: -\begin{center} - OT1, T1, TS1 (partial) -\end{center} -To use one or another encoding, give the \LaTeX{} name to the \package{fontenc} -package as usual, as in +Notice that some characters, like math operators in text mode and +currency units, will adapt to the select figure width and style +combination. + +The package also supports and loads the +\pkg{fontaxes}~\cite{fontaxes} package. This package supplies +macros to individually select figure style and width +locally~\cite{fontaxesdoc}. + +\subsubsection{Encodings} + +The following \LaTeX{} encodings are supported: +\begin{description} +\item[Latin] \acronym{OT1}, \acronym{T1}, \acronym{TS1} (partial) +\item[Cyrillic] \acronym{T2A}, \acronym{T2B}, \acronym{T2C}, \acronym{X2} +\item[Greek] \acronym{LGR} (monotonic and polytonic) +\end{description} +To use one or another encoding, give the \LaTeX{} name to the +\pkg{fontenc} package as usual, as in \begin{verbatim} \usepackage[T1]{fontenc} \usepackage{lato} \end{verbatim} -Note that, as usual with OT1 encoded fonts, kerning with accented characters is -treated poorly, if at all. Note difference in kerning between these two encoding -in table~\vref{kerning}. +As usual with \acronym{OT1} encoded fonts, kerning with accented +characters is treated poorly, if at all. Note difference in kerning +between these two encoding in table~\vref{tab:kerning}. It is +therefore advised to always use the Lato font family in any encoding +than \acronym{OT1} when typing diacritics. + \begin{table} \centering \begin{tabular}{ll} \toprule - OT1-encoded&{\flafamily To Ta T\'e}\\ + OT1-encoded & {\lato\fontencoding{OT1}\selectfont To Ta T\'e}\\ \midrule - T1-encoded&{\flafamily\fontencoding{T1}\selectfont To Ta T\'e}\\ + T1-encoded & {\lato\fontencoding{T1}\selectfont To Ta T\'e}\\ \bottomrule \end{tabular} \caption{Kerning with OT1 and T1 encodings} - \label{kerning} + \label{tab:kerning} +\end{table} + +\subsection{Available weights, shapes and variants} + +Table~\vref{tab:fonts} lists the available font series and shapes with +their \acronym{NFSS} classification. Parenthesized combinations are +provided via substitutions. + +\begin{table} + \centering + \begin{tabular}{cccc} + \toprule + Font & Series & Shape & OpenType font file\\ + \midrule + {\lato\fontseries{ul}\selectfont Lato Hairline} & \code{ul} & \code{n} & \path|Lato-Hairline.ttf|\\ + {\lato\fontseries{ul}\selectfont\itshape Lato Hairline Italic} & \code{ul} & \code{it} (\code{sl}) & \path|Lato-HairlineItalic.ttf|\\ + {\lato\fontseries{el}\selectfont Lato Thin} & \code{el} & \code{n} & \path|Lato-Thin.ttf|\\ + {\lato\fontseries{el}\selectfont\itshape Lato Light Thin} & \code{el} & \code{it} (\code{sl}) & \path|Lato-ThinItalic.ttf|\\ + {\lato\fontseries{l}\selectfont Lato Light} & \code{l} & \code{n} & \path|Lato-Light.ttf|\\ + {\lato\fontseries{l}\selectfont\itshape Lato Light Italic} & \code{l} & \code{it} (\code{sl}) & \path|Lato-LightItalic.ttf|\\ + {\lato\mdseries Lato Regular} & \code{m} & \code{n} & \path|Lato-Regular.ttf|\\ + {\lato\mdseries\itshape Lato Italic} & \code{m} & \code{it} (\code{sl}) & \path|Lato-Italic.ttf|\\ + {\lato\fontseries{mb}\selectfont Lato Medium} & \code{mb} & \code{n} & \path|Lato-Medium.ttf|\\ + {\lato\fontseries{mb}\selectfont\itshape Lato Medium Italic} & \code{mb} & \code{it} (\code{sl}) & \path|Lato-MediumItalic.ttf|\\ + {\lato\fontseries{sb}\selectfont Lato Semibold} & \code{sb} & \code{n} & \path|Lato-Semibold.ttf|\\ + {\lato\fontseries{sb}\selectfont\itshape Lato Semibold Italic} & \code{sb} & \code{it} (\code{sl}) & \path|Lato-SemiboldItalic.ttf|\\ + {\lato\bfseries Lato Bold} & \code{b} (\code{bx}) & \code{n} & \path|Lato-Bold.ttf|\\ + {\lato\bfseries\itshape Lato Bold Italic} & \code{b} (\code{bx}) & \code{it} (\code{sl}) & \path|Lato-BoldItalic.ttf|\\ + {\lato\fontseries{eb}\selectfont Lato Heavy} & \code{eb} & \code{n} & \path|Lato-Heavy.ttf|\\ + {\lato\fontseries{eb}\selectfont\itshape Lato Heavy Italic} & \code{eb} & \code{it} (\code{sl}) & \path|Lato-HeavyItalic.ttf|\\ + {\lato\fontseries{ub}\selectfont Lato Black} & \code{ub} & \code{n} & \path|Lato-Black.ttf|\\ + {\lato\fontseries{ub}\selectfont\itshape Lato Black Italic} & \code{ub} & \code{it} (\code{sl}) & \path|Lato-BlackItalic.ttf|\\ + \bottomrule + \end{tabular} + \caption{Available font styles} + \label{tab:fonts} \end{table} -It is therefore advised to always use the Lota fonts in any encoding than OT1 -when typing diacritics. -\subsection{Available weights and variants} +In addition, each font variant combination (figure width/figure style) +corresponds to a \acronym{NFSS} family (see +table~\vref{tab:families}). -Table~\vref{nfss} lists the available font series and shapes with their -\acronym{NFSS} classification. Parenthesized combinations are provided via -substitutions. \begin{table} \centering - \begin{tabular}{llll} + \begin{tabular}{ccc} \toprule - family&encoding&series&shape\\ + & Lining figures & Old style figures\\ + \midrule + Tabular figures & \code{lato-TLF} & \code{lato-TOsF}\\ \midrule - \multirow{2}{*}{fla}&OT1, T1&\multirow{2}{*}{el, l, m, b (bx), eb}&n, it (sl), sc, scit (scsl)\\ - \cmidrule{2-2} - \cmidrule{4-4} - &TS1&&n, it (sl)\\ + Proportional figures & \code{lato-LF} & \code{lato-OsF}\\ \bottomrule \end{tabular} - \caption{Available font series and shapes for Lato} - \label{nfss} + \caption{Available \acronym{NFSS} families} + \label{tab:families} \end{table} -Notice that the small capitals are faked ones (reduced to 80\%). Samples of the font are available in the \href{run:lato-samples.pdf}{\path|lato-samples.pdf|} file. +\subsection{Math support} + +The \pkg{lato} package doesn't provide math support. However the +\pkg{mdsymbol} package~\cite{mdsymbol} provides mathematical symbol +fonts which fit very well with Lato. In addition, the +\pkg{mathspec}~\cite{mathspec} package (for \hologo{XeLaTeX} or +\hologo{LuaLaTeX} engines) or the +\pkg{mathastext}~\cite{mathastext}\footnote{In particular with the + \code{LGR} option to get Greek letters from the Lato fonts} package +(for other \LaTeX{} engines) can be called to use Lato as math font. + \section{Known bugs and improvements} -Please send bug reports and suggestions about the Lato \LaTeX{} support to -\href{mailto:melmorabity@fedoraproject.org}{Mohamed \name{El~Morabity}}. +Please send bug reports and suggestions about the Lato \LaTeX{} +support to \href{mailto:melmorabity@fedoraproject.org}{Mohamed + \name{El~Morabity}}. + +\subsection{Compatibility with previous versions} -\subsection{Small dotless ``j''} +\subsubsection{Legacy \code{fla} family} -The Lato font files do not provide any dotless ``j'' glyph. This \LaTeX{} -support provides a faked one ({\flafamily\j}), available by typing -\code{\char`\\j}, and built using the \command{t1dotlessj} command (from -LCDF~Typetools~\cite{lcdf}). +Previous versions of the package used to provide \code{fla} as default +\acronym{NFSS} family for Lato, and the corresponding \cmd{\flafamily} +switch command. Such family and macro are still available in newer +package versions. In particular, the \code{fla} family is now an alias +for the \code{lato-TLF} one. + +\subsubsection{Smallcaps} + +Since the Lato font family doesn't provide yet ``real'' smallcaps, +faked ones were supplied by previous versions of the \pkg{lato} +package (by scaling down uppercase letters), with a very poor +result. Furthermore, there's no convenient way to generate fake +smallcaps with \hologo{XeTeX} or \hologo{LuaTeX} engines and native +OpenType fonts. + +For these reasons, faked small caps are no longer provided, starting +with version~3.0 of the \pkg{lato} package. Anyway \LaTeX{} should +automatically substitute missing smallcap shapes by normal ones. \section{License} -This package is released under the \LaTeX{} project public license, either -version~1.3c or above~\cite{lppl}. Anyway both the TrueType and Type~1 files are -delivered under the Open Font License version~1.1~\cite{ofl}. +This package is released under the \LaTeX{} project public license, +either version~1.3c or above~\cite{lppl}. Anyway both OpenType and +Type~1 files are delivered under the Open Font License +version~1.1~\cite{ofl}. \begin{thebibliography}{9} +\bibitem{dziedzic} \url{http://www.lukaszdziedzic.eu/} \bibitem{lato} \url{http://www.latofonts.com/} -\bibitem{keyval} - \url{http://www.ctan.org/tex-archive/macros/latex/required/graphics/} -\bibitem{slantsc} - \url{http://www.ctan.org/tex-archive/macros/latex/contrib/slantsc/} -\bibitem{lcdf} \url{http://www.lcdf.org/type/} -\bibitem{lppl} \url{http://www.latex-project.org/lppl/lppl-1-3c.html} \bibitem{ofl} \url{http://scripts.sil.org/OFL_web} +\bibitem{fontforge} \url{https://fontforge.github.io/} +\bibitem{cfftot1} \url{https://www.lcdf.org/type/cfftot1.1.html} +\bibitem{fontspecdoc} \url{https://mirrors.ctan.org/macros/xetex/latex/fontspec/fontspec.pdf} +\bibitem{fontaxes} \url{https://www.ctan.org/pkg/fontaxes} +\bibitem{fontaxesdoc} \url{http://mirrors.ctan.org/macros/latex/contrib/fontaxes/fontaxes.pdf} +\bibitem{mdsymbol} \url{https://www.ctan.org/pkg/mdsymbol} +\bibitem{mathspec} \url{https://www.ctan.org/pkg/mathspec} +\bibitem{mathastext} \url{https://www.ctan.org/pkg/mathastext} +\bibitem{lppl} \url{http://www.latex-project.org/lppl/lppl-1-3c.html} \end{thebibliography} \end{document} |