summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/fonts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-14 20:46:37 +0000
committerKarl Berry <karl@freefriends.org>2019-07-14 20:46:37 +0000
commit5d5aeb009b9fb83051f6382f33a491f792ade98c (patch)
treee165cabecb8d3458d7e6a51e9a76263bd18a39b4 /Master/texmf-dist/source/fonts
parent416a3148be21c91890d5bdc78427d36bcee064ae (diff)
chivo (14jul19)
git-svn-id: svn://tug.org/texlive/trunk@51638 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/fonts')
-rw-r--r--Master/texmf-dist/source/fonts/chivo/Chivo.dtx575
-rw-r--r--Master/texmf-dist/source/fonts/chivo/Chivo.ins4
2 files changed, 419 insertions, 160 deletions
diff --git a/Master/texmf-dist/source/fonts/chivo/Chivo.dtx b/Master/texmf-dist/source/fonts/chivo/Chivo.dtx
index 9a81c0cf70d..53da9d13af8 100644
--- a/Master/texmf-dist/source/fonts/chivo/Chivo.dtx
+++ b/Master/texmf-dist/source/fonts/chivo/Chivo.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: Chivo.dtx
-% Copyright (C) 2016 Arash Esbati <esbati'at'gmx.de>
+% Copyright (C) 2016-2019 Arash Esbati <arash'at'gnu.org>
%
% This work may be distributed and/or modified under the conditions
% of the LaTeX Project Public License (LPPL), either version 1.3c of
@@ -15,7 +15,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{Chivo}
-%<package> [2016/05/05 v1.0 Support for Chivo fonts (AE)]
+%<package> [2019/07/07 v2.0 Support for Chivo fonts (AE)]
%
%<*driver>
\documentclass[a4paper]{ltxdoc}
@@ -24,8 +24,18 @@
\usepackage[OT1,LY1,T1]{fontenc}
\usepackage[scaled=1.09]{zlmtt}
\usepackage{textcomp}
-\usepackage{fonttable,lipsum}
-\usepackage[scaled=1.09]{zlmtt}
+\usepackage{fonttable,lipsum,array,booktabs}
+\usepackage{caption}
+\captionsetup[table]{%
+ format = plain ,
+ labelsep = period ,
+ justification = centerlast ,
+ width = 0.8\linewidth ,
+ position = top ,
+ skip = 5pt ,
+ font = small ,
+ labelfont = bf
+}
\usepackage[activate]{microtype}
\linespread{1.04}
\usepackage{hypdoc}
@@ -74,7 +84,7 @@
%</driver>
% \fi
%
-% \CheckSum{97}
+% \CheckSum{291}
%
% \CharacterTable
% {Upper-case \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
@@ -97,6 +107,13 @@
%
% \MakeShortVerb{\"}
%
+% \changes{v2.0}{2019/07/07}{Add the `scaled' key as requested by FMi}
+% \changes{v2.0}{2019/07/07}{Use NFSS scheme for fonts mapping}
+% \changes{v2.0}{2019/07/07}{Rewrite major part of the code supporting
+% 14 fonts. Harmonize the usage of package options over different TeX
+% engines}
+% \changes{v2.0}{2019/07/07}{Update OTF fonts to version 1.007 now
+% consisting of 14 fonts, 843 glyphs each}
% \changes{v1.0}{2016/05/01}{Initial version}
%
% \title{Using \textsf{Chivo} fonts with LaTeX\thanks{This file has
@@ -108,9 +125,9 @@
% \begin{abstract}
% \noindent
% This package provides the necessary files to use the
-% \textsf{Chivo} fonts with LaTeX. \textsf{Chivo} is a set of eight
-% fonts provided by Héctor Gatti \& Omnibus-Type Team under the Open
-% Font License (OFL).
+% \textsf{Chivo} fonts with LaTeX. \textsf{Chivo} is a set of
+% fourteen fonts provided by Héctor Gatti \& Omnibus-Type Team under
+% the Open Font License (OFL).
% \end{abstract}
%
% \tableofcontents \clearpage
@@ -118,22 +135,24 @@
% \section{Introduction}
% \label{sec:introduction}
%
-% \textsf{Chivo}\footnote{Copyright \textcopyright\ 2011--2015,
-% Omnibus-Type (\url{http://www.omnibus-type.com})} is a set of eight
-% fonts created by Héctor Gatti \& Omnibus-Type Team and provided by
-% Omnibus-Type under the SIL Open Font License, Version 1.1. From the
-% web page:
-% \begin{quote}\sffamily
-% ``\textsf{Chivo} is a grotesque typeface. The strength of
-% \textsf{Chivo} makes it ideal for highlights and headlines.
-% \textsf{Chivo} Regular's elegance is ideal for combining with
-% \textsf{Chivo} Black's strength and for continuous reading
-% settings.''
+% \textsf{Chivo}\footnote{Copyright \textcopyright\ 2011--2019,
+% Omnibus-Type (\url{https://www.omnibus-type.com})} is a set of
+% fourteen fonts created by Héctor Gatti \& Omnibus-Type Team and
+% provided by Omnibus-Type under the SIL Open Font License, Version
+% 1.1. From the web page:
+% \begin{quote}
+% ``Chivo (`goat' in Spanish) is the first Omnibus-Type
+% neo-grotesque typeface family. It has 7 weight variants, plus
+% matching italics. Its solidness and balanced strokes give Chivo
+% both elegance and practicality. Chivo Regular works perfectly in
+% long-reading texts, while Chivo Black is ideal for headlines,
+% banners and highlights. Developed by Héctor Gatti, this is an
+% indispensable ally for any designer.''
% \end{quote}
%
% The fonts were obtained from Omni-Type web
-% page\footnote{\url{http://http://omnibus-type.com/fonts/chivo.php}}.
-% (v1.003, 8~fonts, 335~glyphs each).
+% page\footnote{\url{https://www.omnibus-type.com/fonts/chivo/}}.
+% (v1.007, 14~fonts, 843~glyphs each).
%
% \section{Installation}
% \label{sec:installation}
@@ -147,10 +166,9 @@
% The fonts can be used with traditional (pdf)TeX engine and newer
% XeTeX and LuaTeX engines which can access OTF fonts directly. They
% are described below. In general, this bundle tries not to be smart
-% and loads only \pkg{kvoptions.sty}, \pkg{mweights.sty} or
-% \pkg{fontspec.sty}, depending on the used engine. As the result,
-% some work must be done by the user.
-%
+% and loads only \pkg{kvoptions.sty}, \pkg{mweights.sty},
+% \pkg{fontaxes.sty} or \pkg{fontspec.sty}, depending on the used
+% engine. As the result, some work must be done by the user.
%
% \subsection{Engine independent options}
% \label{sec:engine-indep-opti}
@@ -163,45 +181,52 @@
% Loading the package changes the document's sans serif font to
% \textsf{Chivo}. The package offers some options.
%
-% \DescribeMacro{regular\,\textbar\,light}%
-% The default font series is set with one of "regular" or "light"~--
-% "regular" is the default. Note that these options are defined as
-% complementary ones. Setting one option to `false' sets the other
-% one automatically to `true', i.e.
+% \DescribeMacro{thin\,\textbar\,light}
+% \DescribeMacro{regular\,\textbar\,medium}
+% The default font series is set with one of "thin", "light",
+% "regular" or "medium"~-- "regular" is the default. It can be
+% changed like this:
% \begin{quote}
-% "\usepackage[regular = false]{Chivo}" \\
-% \mbox{} \quad or \\
-% "\usepackage[light = true] {Chivo}"
+% "\usepackage[medium]{Chivo}"
% \end{quote}
-% have the same effect.
%
-% \DescribeMacro{bold\,\textbar\,black}%
-% The default bold series is set with one of "bold" or "black"~--
-% "bold" is the default. Again, these options are complementary as
-% well.
+% \DescribeMacro{bold\,\textbar\,extrabold\textbar\,black}
+% The default bold series is set with one of "bold", "extrabold" or
+% "black"~-- "bold" is the default.
+%
+% \DescribeMacro{lining\,\textbar\,oldstyle}
+% \DescribeMacro{proportional\,\textbar\,tabular}
+% The alignment and style for the figures of the document are set by
+% the options "lining" or "oldstyle" and "proportional" or "tabular".
+% "lining" and "proportional" are the defaults. Short aliases "lf",
+% "osf", "prop" and "tab" are also available. Being boolean options,
+% following example results in proportional oldstyle figures:
+% \begin{quote}
+% "\usepackage[lining=false,tabular=false]{Chivo}"
+% \end{quote}
%
-% \DescribeMacro{familydefault}%
+% \DescribeMacro{familydefault}
% The main font of a document can be switched to \textsf{Chivo} with
% package option "familydefault" or "familydefault=true", e.g.:
% \begin{quote}
% "\usepackage[familydefault]{Chivo}"
% \end{quote}
%
-% \DescribeMacro{opentype\,\textbar\,type1}%
+% \DescribeMacro{opentype\,\textbar\,type1}
% If the automatic engine detection fails, it can be specified by the
% user with one of "opentype" or "type1". Note that these option do
% not take a boolean value "true" or "false".
%
-% \subsection{(pdf)LaTeX specific option}
-% \label{sec:under-pdflatex}
-%
-% \DescribeMacro{scale}%
+% \DescribeMacro{scale\,\textbar\,scaled}
% The size of the \textsf{Chivo} fonts can be adjusted with the
-% "scale" option, e.g.:
+% "scale" or "scaled" option, e.g.:
% \begin{quote}
% "\usepackage[scale=0.97]{Chivo}"
% \end{quote}
%
+% \subsection{(pdf)LaTeX specific notes}
+% \label{sec:under-pdflatex}
+%
% OT1, LY1, T1 and TS1 encodings are supported. \pkg{Chivo.sty}
% does not load the respective packages, it is up to user to load
% them, e.g.:
@@ -211,41 +236,80 @@
% "\usepackage{textcomp}"
% \end{quote}
%
-% \subsection{XeLaTeX and LuaLaTeX specific options}
+% Chivo fonts provide a rich set of figures (see
+% table~\ref{tab:figures}). With traditional engines,
+% \pkg{fontaxes.sty} is loaded and the command \cmd{\fontversion} is
+% available to switch between "lining", "oldstyle", "tabular" and
+% "proportional" styles and alignments. For other versions the
+% following macros are provided:
+% \begin{itemize}
+% \item "\textsu" renders its argument in superior figures.
+% "\textsu{123}" produces \textsu{123}. The corresponding
+% declaration is "\sufigures".
+% \item "\textin" renders its argument in inferior figures.
+% "\textin{123}" produces \textin{123}. The corresponding
+% declaration is "\infigures".
+% \item "\textnu" renders its argument in numerator figures.
+% "\textnu{123}" produces \textnu{123}. The corresponding
+% declaration is "\nufigures".
+% \item "\textde" renders its argument in denominator figures.
+% "\textde{123}" produces \textde{123}. The corresponding
+% declaration is "\defigures".
+% \end{itemize}
+%
+% \subsection{XeLaTeX and LuaLaTeX specific notes}
% \label{sec:under-xelat-lual}
%
% These engines can access OTF fonts directly. The standard interface
% for this purpose is
-% \pkg{fontspec.sty}\footnote{\url{http://ctan.org/pkg/fontspec}}.
-% \pkg{Chivo.sty} detects if XeLaTeX or LuaLaTeX is used and based on
-% options given by \texttt{regular\textbar light} and/or
-% \texttt{bold\textbar black}, it uses \cmd{\defaultfeature} to define
-% "Chivo" and passes it to "\setsansfont", e.g.:
+% \pkg{fontspec.sty}\footnote{\url{https://ctan.org/pkg/fontspec}}.
+% \pkg{Chivo.sty} detects if XeLaTeX or LuaLaTeX are used and passes
+% options given to the package to "\setsansfont" via
+% \cmd{\defaultfeature}. Other \pkg{fontspec.sty} options can be set
+% with \cmd{\defaultfeature+}:
% \begin{quote}
-% "\defaultfontfeatures[Chivo]" \\
-% " {" \\
-% " Extension = .otf ," \\
-% " BoldFont = Chivo-Black ," \\
-% " ItalicFont = Chivo-LightItalic ," \\
-% " BoldItalicFont = Chivo-BlackItalic ," \\
-% " UprightFont = Chivo-Light" \\
-% " }" \\
-% "\AtBeginDocument{\setsansfont{Chivo}}"
-% \end{quote}
-%
-% The "scale" package option does not work with \pkg{fontspec.sty}.
-% This and any other \pkg{fontspec.sty} option can be set with
-% \cmd{\defaultfeature+}, e.g.:
-% \begin{quote}
-% "\usepackage{fontspec}" \\
-% "\usepackage{Chivo}" \\
-% "\defaultfontfeatures+[Chivo]" \\
-% " {" \\
-% " Ligatures = TeX ," \\
-% " Scale = MatchLowercase ," \\
-% " Color = blue" \\
-% " }"
+% "\usepackage{fontspec}" \\
+% "\usepackage{Chivo}" \\
+% "\defaultfontfeatures+[Chivo]{" \\
+% " Scale = MatchLowercase ," \\
+% " Color = blue" \\
+% "}"
% \end{quote}
+% ^^A
+% Table \ref{tab:font-features} contains a list of available font
+% features.
+% \begin{table}[tbp]
+% \centering
+% \caption{Chivo font features}
+% \label{tab:font-features}
+% \begin{tabular}{@{}>{\ttfamily}ll@{}}
+% \toprule
+% aalt & Access All Alternates \\
+% case & Case-Sensitive Forms \\
+% ccmp & Glyph Composition/Decomposition \\
+% cpsp & Capital Spacing \\
+% dnom & Denominators \\
+% frac & Fractions \\
+% kern & Kerning \\
+% liga & Standard Ligatures \\
+% lnum & Lining Figures \\
+% mark & Mark Positioning \\
+% mkmk & Mark to Mark Positioning \\
+% numr & Numerators \\
+% onum & Oldstyle Figures \\
+% ordn & Ordinals \\
+% pnum & Proportional Figures \\
+% sinf & Scientific Inferiors \\
+% subs & Subscript \\
+% sups & Superscript \\
+% tnum & Tabular Figures \\
+% zero & Slashed Zero \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% LaTeX font selection macros like \cmd{\fontseries} work with these
+% engines as well.
%
% \clearpage
%
@@ -282,17 +346,35 @@
% \subsection*{Italic}
% {\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
%
+% \subsection*{Medium}
+% {\fontseries{sb}\selectfont\lipsum[1]\lipsum*[2] \quad 1234567890}
+%
+% \subsection*{Medium Italic}
+% {\fontseries{sb}\selectfont\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
+%
% \subsection*{Bold}
% {\bfseries\lipsum[1]\lipsum*[2] \quad 1234567890}
%
% \subsection*{Bold italic}
% {\bfseries\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
%
+% \subsection*{Extra Bold}
+% {\fontseries{eb}\selectfont\lipsum[1]\lipsum*[2] \quad 1234567890}
+%
+% \subsection*{Extra Bold italic}
+% {\fontseries{eb}\selectfont\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
+%
% \subsection*{Black}
-% {\fontseries{k}\selectfont\lipsum[1]\lipsum*[2] \quad 1234567890}
+% {\fontseries{ub}\selectfont\lipsum[1]\lipsum*[2] \quad 1234567890}
%
% \subsection*{Black italic}
-% {\fontseries{k}\selectfont\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
+% {\fontseries{ub}\selectfont\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
+%
+% \subsection*{Thin}
+% {\fontseries{el}\selectfont\lipsum[1]\lipsum*[2] \quad 1234567890}
+%
+% \subsection*{Thin italic}
+% {\fontseries{el}\selectfont\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
%
% \subsection*{Light}
% {\fontseries{l}\selectfont\lipsum[1]\lipsum*[2] \quad 1234567890}
@@ -300,6 +382,27 @@
% \subsection*{Light italic}
% {\fontseries{l}\selectfont\itshape\lipsum[1]\lipsum*[2] \quad 1234567890}
%
+% \subsection*{Figures}
+%
+% \begin{table}[!h]
+% \centering
+% \caption{Figure styles and alignments}
+% \label{tab:figures}
+% \begin{tabular}{@{}ll@{}}
+% \toprule
+% Proportional lining & \_\figureversion{prop,lf}0123456789\_ \\
+% Tabular lining & \_\figureversion{tab,lf}0123456789\_ \\
+% Proportional oldstyle & \_\figureversion{prop,osf}0123456789\_ \\
+% Tabular oldstyle & \_\figureversion{tab,osf}0123456789\_ \\
+% Superiors & \_\sufigures 0123456789\_ \\
+% Inferiors & \_\infigures 0123456789\_ \\
+% Numerators & \_\nufigures 0123456789\_ \\
+% Denominators & \_\defigures 0123456789\_ \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+%
% \StopEventually{^^A
% \PrintChanges
% }
@@ -315,23 +418,17 @@
% --encoding=OT1,T1,LY1 \
% --ts1 \
% --sanserif \
-% --defaultlining \
-% --defaulttabular \
-% --nooldstyle \
-% --noproportional \
% --nosmallcaps \
% --noswash \
% --notitling \
-% --nosuperiors \
-% --noinferiors \
+% --inferiors=subs \
% --fractions \
% --noornaments \
-% --noupdmap \
+% --ligatures \
% --verbose \
-% Chivo-*.otf
+% Chivo-*.otf
% \end{verbatim}
% \vspace{-\baselineskip}
-%
% We don't use the \pkg{Chivo.sty} generated by "autoinst" and use our
% version instead.
%
@@ -342,33 +439,45 @@
%<*package>
% \end{macrocode}
%
+% Require the packages \pkg{ifxetex.sty} and \pkg{ifluatex.sty}:
+% \begin{macrocode}
+\RequirePackage{ifxetex}
+\RequirePackage{ifluatex}
+% \end{macrocode}
+%
% First, we need a switch to know which engine is used:
% \begin{macrocode}
\newif\ifChivo@otf
-\ifdefined\XeTeXinterchartoks % we are in XeTeX
+\ifxetex % we are in XeTeX
\Chivo@otftrue
\else
- \ifdefined\directlua % we are in LuaTeX
+ \ifluatex % we are in LuaTeX
\Chivo@otftrue
+ \else
+ \Chivo@otffalse
\fi
\fi
% \end{macrocode}
%
% Load the packages we rely on:
% \pkg{fontspec.sty}\footnote{\url{https://www.ctan.org/pkg/fontspec}}
-% or
-% \pkg{mweights.sty}\footnote{\url{https://www.ctan.org/pkg/mweights}}:
+% for LuaTeX and XeTeX, or
+% \pkg{mweights.sty}\footnote{\url{https://www.ctan.org/pkg/mweights}}
+% and
+% \pkg{fontaxes.sty}\footnote{\url{https://www.ctan.org/pkg/fontaxes}}
+% for (pdf)LaTeX:
% \begin{macrocode}
\ifChivo@otf
\RequirePackage{fontspec}
\else
\RequirePackage{mweights}
+ \RequirePackage{fontaxes}
\fi
% \end{macrocode}
%
% We use
% \pkg{kvoptions}\footnote{\url{https://www.ctan.org/pkg/kvoptions}}
-% for our purposes:
+% for key handling:
% \begin{macrocode}
\RequirePackage{kvoptions}
% \end{macrocode}
@@ -380,132 +489,282 @@
}
% \end{macrocode}
%
-% The basic strategy for font related keys is to declare them as
-% complementary options.
+% The basic strategy for font and figure version related keys is to
+% declare them as boolean options.
% \begin{macrocode}
+\DeclareBoolOption{thin}
+\DeclareBoolOption{light}
\DeclareBoolOption{regular}
-\DeclareComplementaryOption{light}{regular}
+\DeclareBoolOption{medium}
\DeclareBoolOption{bold}
-\DeclareComplementaryOption{black}{bold}
+\DeclareBoolOption{extrabold}
+\DeclareBoolOption{black}
+\DeclareBoolOption{lining}
+\DeclareComplementaryOption{oldstyle}{lining}
+\DeclareBoolOption{tabular}
+\DeclareComplementaryOption{proportional}{tabular}
% \end{macrocode}
%
-% "scale" key is special: With (pdf)LaTeX, it is a string option, with
-% XeLaTeX and LuaLaTeX, it is a void option and generates a warning.
+% Alias keys are defined as boolean keys as well:
+% \begin{macrocode}
+\DeclareBoolOption{lf}
+\DeclareComplementaryOption{osf}{lf}
+\DeclareBoolOption{tab}
+\DeclareComplementaryOption{prop}{tab}
+% \end{macrocode}
+% "scale" and "scaled" keys are special: With (pdf)LaTeX, "scale" is a
+% string option, "scaled" is an alias and sets \cmd{\Chivo@scale}
+% which is defined by the "scale" key. With XeLaTeX and LuaLaTeX,
+% they set the macro \cmd{\Chivo@otf@scale} which is later used in
+% \cmd{\defaultfontfeatures}.
% \begin{macrocode}
\ifChivo@otf
- \DeclareVoidOption{scale}{\relax}
+ \newcommand*\Chivo@otf@scale{}
+ \define@key{Chivo}{scale}[1.0]{%
+ \def\Chivo@otf@scale{#1}%
+ }
+ \define@key{Chivo}{scaled}[1.0]{%
+ \def\Chivo@otf@scale{#1}%
+ }
\else
\DeclareStringOption[1.0]{scale}
+ \define@key{Chivo}{scaled}[1.0]{%
+ \renewcommand*\Chivo@scale{#1}%
+ }
\fi
% \end{macrocode}
%
-% "familydefault" switches the default font to \textsf{Chivo}.
+% "familydefault" switches the default font to \textsf{Chivo}:
% \begin{macrocode}
\DeclareBoolOption{familydefault}
% \end{macrocode}
%
% The next 2 are for users where the automatic engine detection might
-% fail.
+% fail:
% \begin{macrocode}
\DeclareVoidOption{opentype}{\Chivo@otftrue}
\DeclareVoidOption{type1}{\Chivo@otffalse}
% \end{macrocode}
%
-% Execute the default options and process them.
+% Execute the default options and process the rest.
% \begin{macrocode}
-\setkeys{Chivo}{regular,bold}
+\setkeys{Chivo}{regular,bold,lining,proportional}
\ProcessKeyvalOptions{Chivo}
% \end{macrocode}
%
-% Definition for "regular" and "light" keys for traditional engines:
+% Process the alias keys and set the real one with \cmd{\kvsetkeys}:
% \begin{macrocode}
-\ifChivo@otf \else
- \ifChivo@regular
+\ifChivo@lf
+ \kvsetkeys{Chivo}{lining=true}
+\else
+ \kvsetkeys{Chivo}{lining=false}
+\fi
+\ifChivo@tab
+ \kvsetkeys{Chivo}{tabular=true}
+\else
+ \kvsetkeys{Chivo}{tabular=false}
+\fi
+% \end{macrocode}
+%
+% We need some macros to store the figure alignment and style and font
+% defintions:
+% \begin{macrocode}
+\newcommand*\Chivo@figurestyle{}
+\newcommand*\Chivo@figurealign{}
+\newcommand*\Chivo@otf@regular{}
+\newcommand*\Chivo@otf@italic{}
+\newcommand*\Chivo@otf@bold{}
+\newcommand*\Chivo@otf@bolditalic{}
+% \end{macrocode}
+%
+% Definition for "thin", "light", "regular" and "medium" keys for all
+% engines:
+% \begin{macrocode}
+\ifChivo@regular
+ \ifChivo@otf
+ \def\Chivo@otf@regular{Regular}
+ \def\Chivo@otf@italic{Italic}
+ \else
\def\mdseries@sf{m}
+ \fi
+\fi
+\ifChivo@medium
+ \ifChivo@otf
+ \def\Chivo@otf@regular{Medium}
+ \def\Chivo@otf@italic{MediumItalic}
+ \else
+ \def\mdseries@sf{sb}
+ \fi
+\fi
+\ifChivo@light
+ \ifChivo@otf
+ \def\Chivo@otf@regular{Light}
+ \def\Chivo@otf@italic{LightItalic}
\else
\def\mdseries@sf{l}
\fi
-\fi
+\fi
+\ifChivo@thin
+ \ifChivo@otf
+ \def\Chivo@otf@regular{Thin}
+ \def\Chivo@otf@italic{ThinItalic}
+ \else
+ \def\mdseries@sf{el}
+ \fi
+\fi
% \end{macrocode}
%
-% Definition for "bold" and "black" keys for traditional engines:
+% Definition for "bold", "extrabold" and "black" keys for all engines:
% \begin{macrocode}
-\ifChivo@otf \else
- \ifChivo@bold
+\ifChivo@bold
+ \ifChivo@otf
+ \def\Chivo@otf@bold{Bold}
+ \def\Chivo@otf@bolditalic{BoldItalic}
+ \else
\def\bfseries@sf{b}
+ \fi
+\fi
+\ifChivo@extrabold
+ \ifChivo@otf
+ \def\Chivo@otf@bold{ExtraBold}
+ \def\Chivo@otf@bolditalic{ExtraBoldItalic}
\else
- \def\bfseries@sf{k}
+ \def\bfseries@sf{eb}
\fi
-\fi
+\fi
+\ifChivo@black
+ \ifChivo@otf
+ \def\Chivo@otf@bold{Black}
+ \def\Chivo@otf@bolditalic{BlackItalic}
+ \else
+ \def\bfseries@sf{ub}
+ \fi
+\fi
+% \end{macrocode}
+%
+% Definition for figure styles for all engines:
+% \begin{macrocode}
+\ifChivo@lining
+ \ifChivo@otf
+ \def\Chivo@figurestyle{Lining}
+ \else
+ \def\Chivo@figurestyle{LF}
+ \fi
+\else
+ \ifChivo@otf
+ \def\Chivo@figurestyle{OldStyle}
+ \else
+ \def\Chivo@figurestyle{OsF}
+ \fi
+\fi
+% \end{macrocode}
+%
+% Definition for figure alignments for all engines:
+% \begin{macrocode}
+\ifChivo@tabular
+ \ifChivo@otf
+ \def\Chivo@figurealign{Monospaced}
+ \else
+ \def\Chivo@figurealign{T}
+ \fi
+\else
+ \ifChivo@otf
+ \def\Chivo@figurealign{Proportional}
+ \else
+ \def\Chivo@figurealign{}
+ \fi
+\fi
+% \end{macrocode}
+%
+% Standard setup for \pkg{fontaxes.sty}. This is only relevant for
+% (pdf)LaTeX:
+% \begin{macrocode}
+\ifChivo@otf \else
+ \fa@naming@exception{figures}{{superior}{proportional}}{Sup}
+ \fa@naming@exception{figures}{{superior}{tabular}}{Sup}
+ \def\sufigures{\@nomath\sufigures
+ \fontfigurestyle{superior}\selectfont}
+ \DeclareTextFontCommand{\textsu}{\sufigures}
+ \let\textsuperior\textsu
+
+ \fa@naming@exception{figures}{{inferior}{proportional}}{Inf}
+ \fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
+ \def\infigures{\@nomath\infigures
+ \fontfigurestyle{inferior}\selectfont}
+ \DeclareTextFontCommand{\textin}{\infigures}
+ \let\textinferior\textin
+
+ \fa@naming@exception{figures}{{numerators}{proportional}}{Numr}
+ \fa@naming@exception{figures}{{numerators}{tabular}}{Numr}
+ \def\nufigures{\@nomath\nufigures
+ \fontfigurestyle{numerators}\selectfont}
+ \DeclareTextFontCommand{\textnu}{\nufigures}
+ \let\textnumerator\textnu
+
+ \fa@naming@exception{figures}{{denominators}{proportional}}{Dnom}
+ \fa@naming@exception{figures}{{denominators}{tabular}}{Dnom}
+ \def\defigures{\@nomath\defigures
+ \fontfigurestyle{denominators}\selectfont}
+ \DeclareTextFontCommand{\textde}{\defigures}
+ \let\textdenominator\textde
+\fi
% \end{macrocode}
%
% For XeLaTeX/LuaLaTeX, we define the font features depending on the
% given package options:
% \begin{macrocode}
\ifChivo@otf
- \ifChivo@regular
- \ifChivo@bold
- \defaultfontfeatures[Chivo]
- {
- Extension = .otf ,
- BoldFont = Chivo-Bold ,
- ItalicFont = Chivo-Italic ,
- BoldItalicFont = Chivo-BoldItalic ,
- UprightFont = Chivo-Regular
- }
- \else
- \defaultfontfeatures[Chivo]
- {
- Extension = .otf ,
- BoldFont = Chivo-Black ,
- ItalicFont = Chivo-Italic ,
- BoldItalicFont = Chivo-BlackItalic ,
- UprightFont = Chivo-Regular
- }
- \fi
- \else
- \ifChivo@bold
- \defaultfontfeatures[Chivo]
- {
- Extension = .otf ,
- BoldFont = Chivo-Bold ,
- ItalicFont = Chivo-LightItalic ,
- BoldItalicFont = Chivo-BoldItalic ,
- UprightFont = Chivo-Light
- }
- \else
- \defaultfontfeatures[Chivo]
- {
- Extension = .otf ,
- BoldFont = Chivo-Black ,
- ItalicFont = Chivo-LightItalic ,
- BoldItalicFont = Chivo-BlackItalic ,
- UprightFont = Chivo-Light
- }
- \fi
- \fi
+ \defaultfontfeatures[Chivo]{%
+ Extension = .otf ,
+ Ligatures = {TeX,Common} ,
+ Scale = \Chivo@otf@scale ,
+ UprightFont = *-\Chivo@otf@regular ,
+ ItalicFont = *-\Chivo@otf@italic ,
+ BoldFont = *-\Chivo@otf@bold ,
+ BoldItalicFont = *-\Chivo@otf@bolditalic ,
+ FontFace = {el}{n}{*-Thin} ,
+ FontFace = {el}{it}{*-ThinItalic} ,
+ FontFace = {l}{n}{*-Light} ,
+ FontFace = {l}{it}{*-LightItalic} ,
+ FontFace = {m}{n}{*-Regular} ,
+ FontFace = {m}{it}{*-Italic} ,
+ FontFace = {sb}{n}{*-Medium} ,
+ FontFace = {sb}{it}{*-MediumItalic} ,
+ FontFace = {b}{n}{*-Bold} ,
+ FontFace = {b}{it}{*-BoldItalic} ,
+ FontFace = {eb}{n}{*-ExtraBold} ,
+ FontFace = {eb}{it}{*-ExtraBoldItalic} ,
+ FontFace = {ub}{n}{*-Black} ,
+ FontFace = {ub}{it}{*-BlackItalic} ,
+ Numbers = {\Chivo@figurestyle,\Chivo@figurealign}
+ }
\fi
% \end{macrocode}
%
-% Switch the sans serif font to \textsf{Chivo}; the fonts provide
-% only tabular lining figures. With \pkg{fontspec}, we delay the
-% \cmd{\setsansfont} until "AtBeginDocument" so that user can provide
-% additional features with \cmd{\defaultfontfeatures+}.
+% Switch the sans serif font to \textsf{Chivo}. With \pkg{fontspec},
+% we delay the \cmd{\setsansfont} until "AtBeginDocument" so that user
+% can provide additional features with \cmd{\defaultfontfeatures+}.
% \begin{macrocode}
\ifChivo@otf
\AtBeginDocument{%
\setsansfont{Chivo}%
}
\else
- \renewcommand*{\sfdefault}{Chivo-TLF}
+ \renewcommand*\sfdefault{%
+ Chivo-\Chivo@figurealign\Chivo@figurestyle
+ }
\fi
% \end{macrocode}
%
% Switch the default font if the respective key is given:
% \begin{macrocode}
\ifChivo@familydefault
- \renewcommand*{\familydefault}{\sfdefault}
- \ifChivo@otf\else
+ \ifChivo@otf
+ \AtBeginDocument{%
+ \setmainfont{Chivo}%
+ }
+ \else
+ \renewcommand*\familydefault{\sfdefault}
\ifChivo@regular \else
\edef\seriesdefault{\mdseries@sf}
\fi
diff --git a/Master/texmf-dist/source/fonts/chivo/Chivo.ins b/Master/texmf-dist/source/fonts/chivo/Chivo.ins
index d0aed346d1e..c3eb44fd46a 100644
--- a/Master/texmf-dist/source/fonts/chivo/Chivo.ins
+++ b/Master/texmf-dist/source/fonts/chivo/Chivo.ins
@@ -1,6 +1,6 @@
%%
%% File: Chivo.ins
-%% Copyright (c) 2016 Arash Esbati
+%% Copyright (c) 2016-2019 Arash Esbati
%%
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License (LPPL), either version 1.3c of
@@ -16,7 +16,7 @@
\preamble
-Copyright (C) 2016 Arash Esbati <esbati'at'gmx.de>
+Copyright (C) 2016-2019 Arash Esbati <arash'at'gnu.org>
This work may be distributed and/or modified under the conditions
of the LaTeX Project Public License (LPPL), either version 1.3c of