From 96892ea8d7dd024de36c135845e2981c7f957bc6 Mon Sep 17 00:00:00 2001
From: Andrew Dunning <adunning@users.noreply.github.com>
Date: Sat, 12 Jan 2019 20:39:47 -0500
Subject: LaTeX template: Simplify fontspec usage (#5218)

Simplify the approach of #5212, ensuring that `mainfont` is used as the base font for scaling and that LuaLaTeX does not display the mono font with TeX ligatures (as it does not use the `Mapping=tex-ansi` option).

With a modified version of `\defaultfontfeatures`, fontspec will continue to report scaling against the old default font in the log, but it nonetheless displays main font at the specified size. Using this rather than setting `Scale=MatchLowercase` for each family individually means that users will not lose scaling when upgrading to the new template if they were using other font options. Scaling can be disabled for an individual family by adding the option `Scale=1` to `sansfontoptions`, `monofontoptions`, etc.

Remove the `\setromanfont` command added in #4665, as this is not documented in the fontspec manual and appears to be a deprecated alias for `\setmainfont`.

For the release notes, I should also add that one can imitate the previous appearance with `-V mainfontoptions="Scale=MatchLowercase"`.
---
 test/lhs-test.latex | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'test/lhs-test.latex')

diff --git a/test/lhs-test.latex b/test/lhs-test.latex
index 5d8442f2a..f18af737c 100644
--- a/test/lhs-test.latex
+++ b/test/lhs-test.latex
@@ -12,6 +12,8 @@
   \usepackage{textcomp} % provides euro and other symbols
 \else % if luatex or xelatex
   \usepackage{unicode-math}
+  \defaultfontfeatures{Scale=MatchLowercase}
+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
 \fi
 % use upquote if available, for straight quotes in verbatim environments
 \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
-- 
cgit v1.2.3

