summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/andika/andika.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/andika/andika.sty')
-rw-r--r--Master/texmf-dist/tex/latex/andika/andika.sty72
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/andika/andika.sty b/Master/texmf-dist/tex/latex/andika/andika.sty
new file mode 100644
index 00000000000..0d100a7bec2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/andika/andika.sty
@@ -0,0 +1,72 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{andika}
+ [2022/02/17 (Bob Tennent) Supports Andika fonts for all LaTeX engines.]
+
+\RequirePackage{xkeyval,iftex}
+
+\newif\ifandika@otf
+\ifxetex
+ \andika@otftrue
+\else\ifluatex
+ \andika@otftrue
+\else % [pdf]LaTeX
+ \andika@otffalse
+\fi\fi
+
+\newif\ifandika@default \andika@defaultfalse
+
+\newcommand*{\Andika@scale}{1}
+\DeclareOptionX{scaled}{\renewcommand*{\Andika@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\Andika@scale}{#1}}
+
+\DeclareOptionX{default}{\andika@defaulttrue}
+\DeclareOptionX{sfdefault}{\andika@defaulttrue}
+\DeclareOptionX{type1}{\andika@otffalse}
+
+\ProcessOptionsX\relax
+
+\ifandika@otf
+
+\else % type1
+ \def\bfseries@sf{b}
+ \def\mdseries@sf{m}
+\fi
+
+\ifandika@otf
+ \RequirePackage{fontspec}
+\else
+ \RequirePackage{fontenc,fontaxes,mweights}
+\fi
+
+\ifandika@otf
+ \ifxetex\XeTeXtracingfonts=1\fi
+ \defaultfontfeatures{
+ Ligatures = TeX ,
+ Scale = \Andika@scale ,
+ Extension = .ttf }
+ \setsansfont
+ [ UprightFont = *-Regular ,
+ ItalicFont = *-Italic ,
+ BoldFont = *-Bold ,
+ BoldItalicFont = *-BoldItalic ]
+ {Andika}
+
+ % grab current family in case of subsequent change:
+ \let\andikafamily\sfdefault
+ \ifandika@default\renewcommand*\familydefault{\andikafamily}\fi
+
+\else % type1
+
+ \def\andikafamily{andk-TLF}
+ \newcommand*\andika{\fontfamily{\andikafamily}\selectfont}
+ \def\sfdefault{\andikafamily}
+ \ifandika@default\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi
+
+\fi
+
+\ifandika@otf
+% turn off defaults in case other fonts are selected:
+ \defaultfontfeatures{}
+\fi
+
+\endinput