From 4ce3a0d4729af1865e66c9c1cd967f42b0830d26 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 24 Nov 2019 03:00:49 +0000
Subject: CTAN sync 201911240300

---
 macros/latex/contrib/fontsetup/fontsetup.sty | 106 +++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)
 create mode 100644 macros/latex/contrib/fontsetup/fontsetup.sty

(limited to 'macros/latex/contrib/fontsetup/fontsetup.sty')

diff --git a/macros/latex/contrib/fontsetup/fontsetup.sty b/macros/latex/contrib/fontsetup/fontsetup.sty
new file mode 100644
index 0000000000..92dc687d1a
--- /dev/null
+++ b/macros/latex/contrib/fontsetup/fontsetup.sty
@@ -0,0 +1,106 @@
+%\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{fontsetup}[2019/11/07 Easy font setup by Antonis Tsolomitis]
+\typeout{fontsetup: Easy font setup by  Antonis Tsolomitis}
+
+\chardef\fontsetupdefault=0 % TODO fork cm-unicode or complete lm fonts
+\chardef\fontsetupgfsartemisia=1
+\chardef\fontsetupgfsdidot=2
+\chardef\fontsetupgfsdidotclassic=3
+\chardef\fontsetupgfsneohellenic=4
+\chardef\fontsetupcambria=5 %install cambria as a system font. cambria.ttc, cambriai.ttf, cambriab.ttf, cambriaz.ttf
+\chardef\fontsetuplucida=6 %install in TeX tree
+\chardef\fontsetupkerkis=7
+\chardef\fontsetupfira=8 
+\chardef\fontsetuptimes=9
+\chardef\fontsetuppalatino=10 %install Linotype Palatino as a System font. Files pala.ttf palai, palab, palabi. Install PalatinoGreekSmallCaps as a System font.
+\chardef\fontsetupstixtwo=11
+\chardef\fontsetupneokadmus=12
+\chardef\fontsetupmsgaramond=13 %install Microsoft Garamond as a System font. Gara.TTF, Garai, Garabd
+\chardef\fontsetupebgaramond=14
+\chardef\fontsetupminion=15 % Install MinionPro and provided MinionSC as a system font.
+\chardef\fontsetupneoeuler=16
+\chardef\fontsetuplibertinus=17
+
+\chardef\fontsetupfont\fontsetupdefault
+\DeclareOption{default}{\chardef\fontsetupfont\fontsetupdefault}
+\DeclareOption{gfsartemisia}{\chardef\fontsetupfont\fontsetupgfsartemisia}
+\DeclareOption{gfsdidot}{\chardef\fontsetupfont\fontsetupgfsdidot}
+\DeclareOption{gfsdidotclassic}{\chardef\fontsetupfont\fontsetupgfsdidotclassic}
+\DeclareOption{gfsneohellenic}{\chardef\fontsetupfont\fontsetupgfsneohellenic}
+\DeclareOption{cambria}{\chardef\fontsetupfont\fontsetupcambria}
+\DeclareOption{lucida}{\chardef\fontsetupfont\fontsetuplucida}
+\DeclareOption{kerkis}{\chardef\fontsetupfont\fontsetupkerkis}
+\DeclareOption{fira}{\chardef\fontsetupfont\fontsetupfira}
+\DeclareOption{times}{\chardef\fontsetupfont\fontsetuptimes}
+\DeclareOption{palatino}{\chardef\fontsetupfont\fontsetuppalatino}
+\DeclareOption{stixtwo}{\chardef\fontsetupfont\fontsetupstixtwo}
+\DeclareOption{neokadmus}{\chardef\fontsetupfont\fontsetupneokadmus}
+\DeclareOption{msgaramond}{\chardef\fontsetupfont\fontsetupmsgaramond}
+\DeclareOption{ebgaramond}{\chardef\fontsetupfont\fontsetupebgaramond}
+\DeclareOption{minion}{\chardef\fontsetupfont\fontsetupminion}
+\DeclareOption{neoeuler}{\chardef\fontsetupfont\fontsetupneoeuler}
+\DeclareOption{libertinus}{\chardef\fontsetupfont\fontsetuplibertinus}
+\DeclareOption*{\PackageWarning{fontsetup}{Unknown ‘\CurrentOption’}}
+\ProcessOptions
+
+%provide a test to know if a 16bits TeX is used.
+\RequirePackage{ifthen}
+\RequirePackage{iftex}
+\newboolean{TeXUnicode}
+\ifXeTeX
+   \setboolean{TeXUnicode}{true}
+\fi
+\ifLuaTeX  
+   \setboolean{TeXUnicode}{true}
+\fi
+
+
+
+\ifthenelse{\boolean{TeXUnicode}}{%
+  %The user runs unicode engine
+  \ifcase\fontsetupfont
+  \RequirePackage{fspdefaultfontsot}
+\or
+  \RequirePackage{fspgfsartemisiaot}
+\or
+  \RequirePackage{fspgfsdidotot}
+\or
+  \RequirePackage{fspgfsdidotclassicot}
+\or
+  \RequirePackage{fspgfsneohellenicot}
+\or
+  \RequirePackage{fspcambria}
+\or
+   \RequirePackage{fsplucidaot}
+%   \RequirePackage[usefilenames]{lucida-otf} %for some reason it fails
+\or
+  \RequirePackage{fspkerkisot}
+\or
+  \RequirePackage{fspfiraot}
+\or
+  \RequirePackage{fsptimesot}
+\or
+  \RequirePackage{fsppalatinoot}
+\or
+  \RequirePackage{fspstixtwoot}
+\or
+  \RequirePackage{neokadmus}
+\or
+  \RequirePackage{fspmsgaramondot}
+\or
+  \RequirePackage{fspebgaramondot}
+\or
+  \RequirePackage{fspminion}
+\or
+  \RequirePackage{fspneoeulerot}
+\or
+  \RequirePackage{libertinus-otf}
+  \fi
+}{%the user runs 8bit engine
+\relax}
+
+
+
+
+\endinput
+
-- 
cgit v1.2.3

