diff options
author | Karl Berry <karl@freefriends.org> | 2017-11-12 22:22:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-11-12 22:22:57 +0000 |
commit | 074914316fc5d6eb8d68e25eb7a77d5265ec3277 (patch) | |
tree | b59afea469aed067ce4e6ad526fe5237b2e31627 /Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty | |
parent | 6e968d3c70d693304b8e3669f22c21d2559d2c29 (diff) |
novel (12nov17)
git-svn-id: svn://tug.org/texlive/trunk@45762 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty b/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty index c715ed5bc61..154cb837a2a 100644 --- a/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty +++ b/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty @@ -13,7 +13,7 @@ %% %% \ProvidesFile{novel-FontDefaults.sty}% -[2017/10/19 v1.43 LaTeX file (default fonts)] +[2017/11/12 v1.43.1 LaTeX file (default fonts)] %% @@ -32,34 +32,36 @@ % %% Now to activate the font definitions: %% The parent font, ancestor of the main font, and some others: -\ifthenelse{\equal{\rmdefault}{lmr}}{% - % At this point, if \rmdefault is lmr, it means that the user did not choose - % a different font. Then, Libertinus Serif or Latin Modern Roman - % will be automatically set as \rmdefault: - \IfFontExistsTF{Libertinus Serif}{ % preferred default - \SetParentFont[% - BoldFont=libertinusserif-semibold.otf,% - BoldItalicFont=libertinusserif-semibolditalic.otf,% - ]{Libertinus Serif} - }{ % backup default: - \SetParentFont[% - SmallCapsFont={Latin Modern Roman Caps}% - ]{Latin Modern Roman}% only because it comes with LaTeX - \let\scshape\oldscshape % or small caps won't work - \let\smcp\oldscshape % ditto +\if@parentfontset\else % fixed in v. 1.43.1 + \ifthenelse{\equal{\rmdefault}{lmr}}{% + % At this point, if \rmdefault is lmr, it means that the user did not choose + % a different font. Then, Libertinus Serif or Latin Modern Roman + % will be automatically set as \rmdefault: + \IfFontExistsTF{Libertinus Serif}{ % preferred default + \SetParentFont[% + BoldFont=libertinusserif-semibold.otf,% + BoldItalicFont=libertinusserif-semibolditalic.otf,% + ]{Libertinus Serif} + }{ % backup default: + \SetParentFont[% + SmallCapsFont={Latin Modern Roman Caps}% + ]{Latin Modern Roman}% only because it comes with LaTeX + \let\scshape\oldscshape % or small caps won't work + \let\smcp\oldscshape % ditto + }% + }{% However, if \rmdefault is not lmr, it means that the user chose the font. + % If the choice was made via \SetParentFont, no problem. But if done by + % incorrect method such as \setmainfont, \renewcommand\rmdefault, + % or \usepackage{fontname}, then an error is thrown (warning prior to v 1.44): + \if@parentfontset\else + \ClassError{novel}{Wrong command used to set main font}% + {You attempted to define the main document font using a command such as^^J% + \string\renewcommand\string\rmdefault\space or \string\usepackage^^J% + or \string\setmainfont. These are incorrect in `novel' class.^^J% + Use \string\SetParentFont\space instead. See `novel' documentation.^^J}% + \fi }% -}{% However, if \rmdefault is not lmr, it means that the user chose the font. - % If the choice was made via \SetParentFont, no problem. But if done by - % incorrect method such as \setmainfont, \renewcommand\rmdefault, - % or \usepackage{fontname}, then an error is thrown (warning prior to v 1.44): - \if@parentfontset\else - \ClassError{novel}{Wrong command used to set main font}% - {You attempted to define the main document font using a command such as^^J% - \string\renewcommand\string\rmdefault\space or \string\usepackage^^J% - or \string\setmainfont. These are incorrect in `novel' class.^^J% - Use \string\SetParentFont\space instead. See `novel' documentation.^^J}% - \fi -}% +\fi % Now we are ready to set the main font: \setmainfont[\parentfontfeatures]{\parentfontname} \let\mainfont\rmfamily\relax % compatibility |