Put font loading in template (#85)

Closes https://github.com/moderncv/moderncv/issues/73

Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
This commit is contained in:
Stephan Lachnit 2021-12-13 22:00:04 +01:00 committed by GitHub
commit d3511495b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 17 deletions

View file

@ -83,7 +83,7 @@
% color
\RequirePackage[table]{xcolor}
% font loading
% tex compiler checking for symbol loading
\RequirePackage{iftex}
\newif\ifxetexorluatex
\ifxetex
@ -96,21 +96,6 @@
\fi
\fi
% for luatex and xetex, do not use inputenc and fontenc
% see https://tex.stackexchange.com/a/496643
\ifxetexorluatex
\RequirePackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\RequirePackage{unicode-math}
\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}
\setmathfont{Latin Modern Math}
\else
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
\fi
% hyper links (hyperref is loaded at the end of the preamble to pass options required by loaded packages such as CJK)
\newcommand*\pdfpagemode{UseNone}% do not show thumbnails or bookmarks on opening (on supporting browsers); set \pdfpagemode to "UseOutlines" to show bookmarks