summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/quattrocento/quattrocento.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/quattrocento/quattrocento.sty')
-rw-r--r--Master/texmf-dist/tex/latex/quattrocento/quattrocento.sty87
1 files changed, 87 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/quattrocento/quattrocento.sty b/Master/texmf-dist/tex/latex/quattrocento/quattrocento.sty
new file mode 100644
index 00000000000..6825ca10b4f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/quattrocento/quattrocento.sty
@@ -0,0 +1,87 @@
+\ProvidesPackage{quattrocento}[%
+ 2012/11/07 (Bob Tennent) Supports Quattrocento fonts for all LaTeX engines. ]
+
+\RequirePackage{ifxetex,ifluatex,textcomp}
+\newif\ifquattrocento@otf
+\ifxetex
+ \RequirePackage{fontspec}
+ \quattrocento@otftrue
+\else\ifluatex
+ \RequirePackage{fontspec}
+ \quattrocento@otftrue
+\else % [pdf]LaTeX
+ \RequirePackage{fontenc}
+ \quattrocento@otffalse
+\fi\fi
+
+\newcommand*{\Quattrocento@scale}{1} % not adjustable
+\newcommand*{\QuattrocentoSans@scale}{1}
+\RequirePackage{xkeyval}
+\DeclareOptionX{scaled}{\renewcommand*{\QuattrocentoSans@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\QuattrocentoSans@scale}{#1}}
+
+\newif\ifquattrocento@sf \quattrocento@sffalse
+\newif\ifquattrocento@rm \quattrocento@rmfalse
+\newif\ifquattrocento@sfdefault \quattrocento@sfdefaultfalse
+\DeclareOptionX{sf}{\quattrocento@sftrue}
+\DeclareOptionX{rm}{\quattrocento@rmtrue}
+\DeclareOptionX{sfdefault}{\quattrocento@sftrue\quattrocento@sfdefaulttrue}
+
+\ProcessOptionsX\relax
+\ifquattrocento@rm\ifquattrocento@sfdefault
+ \PackageWarningNoLine{quattrocento}{%
+ ********************************************\MessageBreak
+ Options rm and sfdefault are incompatible. \MessageBreak
+ \MessageBreak
+ ********************************************}
+\fi\fi
+
+
+\ifquattrocento@rm\else\ifquattrocento@sf\else
+ \quattrocento@rmtrue\quattrocento@sftrue % both false -> both true
+\fi\fi
+
+% Set main and/or sans fonts:
+\ifquattrocento@otf
+ \ifxetex\XeTeXtracingfonts=1\fi
+ \defaultfontfeatures{
+ Ligatures = TeX ,
+ Extension = .otf ,
+ }
+ \ifquattrocento@rm\setmainfont
+ [ UprightFont = * ,
+ ItalicFont = *-Italic ,
+ BoldFont = *-Bold ,
+ BoldItalicFont = *-BoldItalic ]
+ {Quattrocento}
+ \fi
+ \ifquattrocento@sf\setsansfont
+ [ Scale = \QuattrocentoSans@scale ,
+ UprightFont = * ,
+ ItalicFont = *-Italic ,
+ BoldFont = *-Bold ,
+ BoldItalicFont = *-BoldItalic ]
+ {QuattrocentoSans}
+ \fi
+ \ifquattrocento@sfdefault\setmainfont
+ [ Scale = \QuattrocentoSans@scale ,
+ UprightFont = * ,
+ ItalicFont = *-Italic ,
+ BoldFont = *-Bold ,
+ BoldItalicFont = *-BoldItalic ]
+ {QuattrocentoSans}
+ \fi
+\else % type1
+ \ifquattrocento@rm
+ \renewcommand*\rmdefault{Quattrocento-TLF}
+ \fi
+ \ifquattrocento@sf
+ \renewcommand*\sfdefault{QuattrocentoSans-TLF}
+ \fi
+ \ifquattrocento@sfdefault
+ \renewcommand*\rmdefault{QuattrocentoSans-TLF}
+ \fi
+\fi
+
+\endinput
+