mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
Prepared font handling for fontspec (LuaLaTeX or XeLaTeX)
This commit is contained in:
parent
16cf3edd49
commit
a2fc3c3623
13 changed files with 67 additions and 9 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31
moderncv.cls
31
moderncv.cls
|
|
@ -78,14 +78,39 @@
|
|||
|
||||
% if... then... else... constructs
|
||||
\RequirePackage{ifthen}
|
||||
% TODO: move to xifthen and \isempty{<arg>} instead of \equal{<arg>}{}
|
||||
|
||||
% TODO: replace \newcommand by \NewDocumentCommand (LaTeX 3)
|
||||
|
||||
% color
|
||||
\RequirePackage{xcolor}
|
||||
|
||||
% automatic loading of latin modern fonts if present on the system
|
||||
\IfFileExists{lmodern.sty}
|
||||
{\RequirePackage[T1]{fontenc}\RequirePackage{lmodern}}
|
||||
% font loading
|
||||
%\usepackage{ifxetex,ifluatex}
|
||||
%\newif\ifxetexorluatex
|
||||
%\ifxetex
|
||||
% \xetexorluatextrue
|
||||
%\else
|
||||
% \ifluatex
|
||||
% \xetexorluatextrue
|
||||
% \else
|
||||
% \xetexorluatexfalse
|
||||
% \fi
|
||||
%\fi
|
||||
% automatic loading of latin modern fonts
|
||||
%\ifxetexorluatex
|
||||
% \RequirePackage{fontspec}
|
||||
% \defaultfontfeatures{Ligatures=TeX}
|
||||
% \RequirePackage{unicode-math}
|
||||
% \setmainfont{Latin Modern}
|
||||
% \setsansfont{Latin Modern Sans}
|
||||
% \setmathfont{Latin Modern Math}
|
||||
%\else
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\IfFileExists{lmodern.sty}%
|
||||
{\RequirePackage{lmodern}}%
|
||||
{}
|
||||
%\fi
|
||||
|
||||
% symbols like \Telefon, \Mobilefone, \Letter and \Email
|
||||
\RequirePackage{marvosym}
|
||||
|
|
|
|||
|
|
@ -21,13 +21,27 @@
|
|||
%-------------------------------------------------------------------------------
|
||||
% package options
|
||||
%-------------------------------------------------------------------------------
|
||||
\RequirePackage{tgpagella}
|
||||
\renewcommand*{\familydefault}{\rmdefault}
|
||||
|
||||
|
||||
%-------------------------------------------------------------------------------
|
||||
% overall style definition
|
||||
%-------------------------------------------------------------------------------
|
||||
% fonts
|
||||
%\ifxetexorluatex
|
||||
% \setmainfont{Tex-Gyre Pagella}
|
||||
% \setsansfont{Tex-Gyre Pagella}
|
||||
% \setmathfont{Tex-Gyre Pagella}
|
||||
% \setmathfont[range=\mathit,\mathsfit]{Tex-Gyre Pagella Italic}
|
||||
% \setmathfont[range=\mathbfup,\mathbfsfup]{Tex-Gyre Pagella Bold}
|
||||
% \setmathfont[range=\mathbfit,\mathbfsfit]{Tex-Gyre Pagella Bold Italic}
|
||||
%\else
|
||||
\IfFileExists{tgpagella.sty}%
|
||||
{%
|
||||
\RequirePackage{tgpagella}%
|
||||
\renewcommand*{\familydefault}{\rmdefault}}%
|
||||
{}
|
||||
%\fi
|
||||
|
||||
% commands
|
||||
\newcommand*{\maketitlesymbol}{%
|
||||
{~~~\textbullet~~~}}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
|
||||
|
|
|
|||
|
|
@ -26,6 +26,16 @@
|
|||
%-------------------------------------------------------------------------------
|
||||
% overall style definition
|
||||
%-------------------------------------------------------------------------------
|
||||
% fonts
|
||||
%\ifxetexorluatex
|
||||
% \setmainfont{Latin Modern Roman}
|
||||
% \setsansfont{Latin Modern Sans}
|
||||
% \setmathfont{Latin Modern Math}
|
||||
%\else
|
||||
\IfFileExists{lmodern.sty}%
|
||||
{\RequirePackage{lmodern}}%
|
||||
{}
|
||||
%\fi
|
||||
|
||||
|
||||
%-------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -29,9 +29,18 @@
|
|||
% overall style definition
|
||||
%-------------------------------------------------------------------------------
|
||||
% fonts
|
||||
\IfFileExists{kurier.sty}
|
||||
{\RequirePackage[light,math]{kurier}}
|
||||
%\ifxetexorluatex
|
||||
% \setmainfont[Numbers={OldStyle,Proportional}, BoldFont={Kurier Bold}, ItalicFont={Kurier Light Italic}, BoldItalicFont={Kurier Bold Italic}]{Kurier Light}
|
||||
% \setsansfont[Numbers={OldStyle,Proportional}, BoldFont={Kurier Bold}, ItalicFont={Kurier Light Italic}, BoldItalicFont={Kurier Bold Italic}]{Kurier Light}
|
||||
% \setmathfont{Kurier Light}
|
||||
% \setmathfont[range=\mathit,\mathsfit]{Kurier Light Italic}
|
||||
% \setmathfont[range=\mathbfup,\mathbfsfup]{Kurier Bold}
|
||||
% \setmathfont[range=\mathbfit,\mathbfsfit]{Kurier Bold Italic}
|
||||
%\else
|
||||
\IfFileExists{kurier.sty}%
|
||||
{\RequirePackage[light,math]{kurier}}%
|
||||
{}
|
||||
%\fi
|
||||
|
||||
% symbols
|
||||
\renewcommand*{\listitemsymbol}{\labelitemi~}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue