summaryrefslogtreecommitdiff
path: root/fonts/yfonts-otf/tex/yfonts-otf.sty
blob: b283dd5d9cb1fb769a91b51358b2a4915c7e0fc3 (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
\NeedsTeXFormat{LaTeX2e}[2019-01-01]
\def\fileversion{0.40}
\def\filedate{2022-08-08}
\ProvidesPackage{yfonts-otf}[\filedate\space\fileversion]
\RequirePackage{iftex}[2019-10-24]
\newif\ifYHf@oldumlaut
\newif\ifYHf@gothlongs
\DeclareOption{oldumlaut}{\YHf@oldumlauttrue}
\DeclareOption{varumlaut}{\YHf@oldumlauttrue}
\DeclareOption{gothvarlongs}{\YHf@gothlongstrue}
\ProcessOptions
\iftutex
  \RequirePackage{fontspec}
  \newopentypefeature{Style}{longs}{+ss11}
  \ifYHf@gothlongs
    \newfontfamily\gothfamily{ygoth.otf}%
      [Extension = .otf,
       Alternate=1,
       Ligatures=TeX, RawFeature=+ss11;+rlig;+liga;+hlig]
  \else
    \newfontfamily\gothfamily{ygoth.otf}%
      [Extension = .otf,
       Ligatures=TeX, RawFeature=+ss11;+rlig;+liga;+hlig]
  \fi
  \ifYHf@oldumlaut
    \newfontfamily\swabfamily{yswab.otf}%
      [Extension = .otf,
       Alternate=0,
       Ligatures=TeX, RawFeature=+ss11;+rlig;+liga]
    \newfontfamily\frakfamily{yfrak}%
       [Extension = .otf,
        Alternate=0,
        Ligatures=TeX, RawFeature=+ss11;+rlig;+liga]
  \else
    \newfontfamily\swabfamily{yswab.otf}%
      [Extension = .otf,
       Ligatures=TeX, RawFeature=+ss11;+rlig;+liga]
    \newfontfamily\frakfamily{yfrak.otf}%
      [Extension = .otf,
       Ligatures=TeX, RawFeature=+ss11;+rlig;+liga]
  \fi
  \DeclareTextFontCommand{\textgoth}{\gothfamily}
  \DeclareTextFontCommand{\textswab}{\swabfamily}
  \DeclareTextFontCommand{\textfrak}{\frakfamily}
  \DeclareTextCommand{\Jvar}{TU}{\textfrak{\char"E960}}
  \DeclareTextCommand{\etc}{TU}{\textfrak{\char"E961}}
  \DeclareTextCommand{\longs}{TU}{\char"200C\char"17F}
  \DeclareTextCommand{\shorts}{TU}{s\char"200C}
\else
  \PackageWarning{yfonts-otf}%
     {This package requires LuaTeX or XeTeX engines.
      With other engines, consider using `yfonts.sty', reported}
\fi
\endinput