summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/imfellenglish/imfellEnglish.sty
blob: 9aebdfa913e2028d22c8c67f35209cf369c45eca (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{imfellEnglish}
    [2015/09/30 (Bob Tennent and autoinst)  Style file for IM Fell English fonts.]

\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}

\newif\ifimfellEnglish@otf 
\ifxetex
  \imfellEnglish@otftrue
\else\ifluatex
  \imfellEnglish@otftrue
\else  % [pdf]LaTeX
  \imfellEnglish@otffalse
\fi\fi

\newcommand*{\IMFELLEnglish@scale}{1}
\RequirePackage{xkeyval}
\DeclareOptionX{scaled}{\renewcommand*{\IMFELLEnglish@scale}{#1}\renewcommand*{\IMFELLEnglishSC@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\IMFELLEnglish@scale}{#1}\renewcommand*{\IMFELLEnglishSC@scale}{#1}}
\DeclareOptionX{type1}{\imfellEnglish@otffalse}

\ProcessOptionsX\relax

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

\ifimfellEnglish@otf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
        Ligatures = TeX ,
        Scale     = \IMFELLEnglish@scale ,
        Extension = .otf }
  \setmainfont{IMFeEN}[
        UprightFont =   *rm28P ,
        ItalicFont = *it28P ,
        BoldFont =   *rm28P ,
        BoldItalicFont =   *it28P ,
      ]
      
  \newfontfamily\scshape[
        UprightFont    = *sc28P,
      ]
      {IMFeEN}

\else % type1

  \def\imfellEnglish@family{IMFELLEnglish-TLF}
  \def\imfellEnglishSC@family{IMFELLEnglishSC-TLF}
  \renewcommand*\rmdefault{\imfellEnglish@family}
  \newcommand*\imfellEnglish{\fontfamily{\imfellEnglish@family}\selectfont}

  \DeclareRobustCommand\scshape{\fontfamily{\imfellEnglishSC@family}\selectfont}

\fi

\ifimfellEnglish@otf
  \defaultfontfeatures{}
\fi

\endinput