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