summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tinos/tinos.sty
blob: 087b29cb9eaac43c7b356d463de047dc73435f0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tinos}
    [2017/01/05 (Bob Tennent)  Supports Tinos fonts for all LaTeX engines.]

\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}

\newif\iftinos@ttf 
\ifxetex
  \tinos@ttftrue
\else\ifluatex
  \tinos@ttftrue
\else  % [pdf]LaTeX
  \tinos@ttffalse
\fi\fi


\newcommand*{\Tinos@scale}{1}
\DeclareOptionX{scaled}{\renewcommand*{\Tinos@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\Tinos@scale}{#1}}


\DeclareOptionX{type1}{\tinos@ttffalse}

\ProcessOptionsX\relax

\iftinos@ttf\else % type1
    \def\tinos@figurestyle{LF}
    \def\tinos@figurealign{T}
\fi


\iftinos@ttf
  \RequirePackage{fontspec}
\else
  \RequirePackage{fontenc,fontaxes}
\fi

\iftinos@ttf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
        Ligatures = TeX ,
        Scale     = \Tinos@scale ,
        Extension = .ttf }
  \setmainfont
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
        BoldItalicFont = *-BoldItalic ]
      {Tinos}
\else % type1
  \def\tinosfamily{Tinos-\tinos@figurealign\tinos@figurestyle}
  \newcommand*\tinos{\fontfamily{\tinos}\selectfont}
  \def\rmdefault{\tinosfamily}
\fi


\iftinos@ttf
  % turn off defaults in case other fonts are selected:
  \defaultfontfeatures{}
\fi

\endinput