summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/linguisticspro/linguisticspro.sty
blob: 4c3810c2be6e6558dc651b5e853c8d4cbaeda6d0 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{linguisticspro}
    [2019/10/13 (Bob Tennent and autoinst)  Style file for LinguisticsPro fonts.]

\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}

\newif\iflinguisticspro@otf 
\ifxetex
  \linguisticspro@otftrue
\else\ifluatex
  \linguisticspro@otftrue
\else  % [pdf]LaTeX
  \linguisticspro@otffalse
\fi\fi

\newif\iflinguisticspro@lining \linguisticspro@liningfalse
\newcommand*{\LinguisticsPro@scale}{1}
\newcommand*{\LinguisticsProInitials@scale}{1}
\RequirePackage{xkeyval}
\DeclareOptionX{scaled}{\renewcommand*{\LinguisticsPro@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\LinguisticsPro@scale}{#1}}
\DeclareOptionX{type1}{\linguisticspro@otffalse}

\DeclareOptionX{lf}{\linguisticspro@liningtrue}
\DeclareOptionX{lining}{\linguisticspro@liningtrue}

\ProcessOptionsX\relax

\iflinguisticspro@otf
  \iflinguisticspro@lining
    \def\linguisticspro@figurestyle{} 
  \else
    \def\linguisticspro@figurestyle{OldStyle} 
  \fi

    
\else % type1
  \iflinguisticspro@lining
    \def\linguisticspro@figurestyle{LF}
  \else
    \def\linguisticspro@figurestyle{OsF}
  \fi
  \def\mdseries@rm{m}
  \def\seriesdefault{\mdseries@rm}
  \def\bfseries@rm{b}

\fi

\iflinguisticspro@otf
  \RequirePackage{fontspec}
\else
  \RequirePackage{fontenc,fontaxes,mweights}
\fi

\iflinguisticspro@otf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
        Ligatures = TeX ,
        Scale     = \LinguisticsPro@scale ,
        Extension = .otf }
  \setmainfont
      [ Numbers = {\linguisticspro@figurestyle},
        UprightFont    = *-Regular ,
        ItalicFont     = *-Italic,
        BoldFont    = *-Bold ,
        BoldItalicFont     = *-BoldItalic ,
      ]
      {LinguisticsPro}
  \newfontfamily\linguisticspro
      [ Numbers = {\linguisticspro@figurestyle},
        UprightFont    = *-Regular ,
        ItalicFont     = *-Italic,
        BoldFont    = *-Bold ,
        BoldItalicFont     = *-BoldItalic ,
      ]
      {LinguisticsPro}
  \newfontfamily\linguisticsproLF
      [ Numbers = {},
        UprightFont    = *-Regular ,
        ItalicFont     = *-Italic,
        BoldFont    = *-Bold ,
        BoldItalicFont     = *-BoldItalic ,
      ]
      {LinguisticsPro}
  \newfontfamily\linguisticsproOsF
      [ Numbers = {OldStyle},
        UprightFont    = *-Regular ,
        ItalicFont     = *-Italic,
        BoldFont    = *-Bold ,
        BoldItalicFont     = *-BoldItalic ,
      ]
      {LinguisticsPro}

\else % type1

  \def\linguisticspro@family{LinguisticsPro-\linguisticspro@figurestyle}
  \renewcommand*\rmdefault{\linguisticspro@family}
  \newcommand*\linguisticspro{\fontfamily{\linguisticspro@family}\selectfont}
  \newcommand*\linguisticsproLF{\fontfamily{LinguisticsPro-LF}\selectfont}
  \newcommand*\linguisticsproOsF{\fontfamily{LinguisticsPro-OsF}\selectfont}

\fi

\def\linguisticsprolgr{\fontencoding{LGR}\fontfamily{LinguisticsPro-OsF}\selectfont}  
\def\linguisticsprot3{\fontencoding{T3}\fontfamily{LinguisticsPro-OsF}\selectfont}  

\iflinguisticspro@otf
  \defaultfontfeatures{}
\fi

\endinput