summaryrefslogtreecommitdiff
path: root/tex/context/fonts/mkiv/type-imp-stix.mkiv
blob: b76b1d09b2ac7c43b53ab57cd671277e03cb1644 (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
%D \module
%D   [       file=type-otf,
%D        version=2007.07.30,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Stix,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D We provide typescripts for version one and two of the stix fonts. There is a
%D xits variant based on the first (not opentype) release that also provides
%D bidirectional math.
%D
%D Users should be aware of the fact that the stix filenames keep changing so if
%D something fails, make sure you have the files and that the names below match
%D those on your system. (In \TEX\ distributions there's 2 and Two and math can have
%D -Regular appended or not.
%D
%D There's now also:
%D
%D   stixtwotext-medium.otf
%D   stixtwotext-mediumitalic.otf
%D   stixtwotext-semibold.otf
%D   stixtwotext-semibolditalic.otf

\definefontfeature
  [stixtwomath]
  [ss02=yes] % otherwise weird (non italic) g

\definefontfeature[stixtwomath][copymathscripts=yes] % see lfg file

\starttypescriptcollection[stix]

    % version one

    \starttypescript [\s!math] [stix] [\s!name]
        \definefontsynonym[MathRoman][\s!file:stixmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra}]
    \stoptypescript

    \starttypescript [\s!serif] [stix] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym[\s!Serif]          [\s!file:stix-regular.otf]   [\s!features=\s!default]
        \definefontsynonym[\s!SerifBold]      [\s!file:stix-bold.otf]      [\s!features=\s!default]
        \definefontsynonym[\s!SerifItalic]    [\s!file:stix-italic.otf]    [\s!features=\s!default]
        \definefontsynonym[\s!SerifBoldItalic][\s!file:stix-bolditalic.otf][\s!features=\s!default]
    \stoptypescript

    \starttypescript[stix]
        \definetypeface [stix] [\s!rm] [\s!serif] [stix] [\s!default]
        \definetypeface [stix] [\s!mm] [\s!math]  [stix] [\s!default]
    \stoptypescript

    % version two

    \starttypescript [\s!math] [stixtwo] [\s!name]
        \definefontsynonym[MathRoman][\s!file:stixtwomath-regular.otf] [\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math]
    \stoptypescript

    \starttypescript [\s!serif] [stixtwo] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym[\s!Serif]          [\s!file:stixtwotext-regular.otf]   [\s!features=\s!default]
        \definefontsynonym[\s!SerifBold]      [\s!file:stixtwotext-bold.otf]      [\s!features=\s!default]
        \definefontsynonym[\s!SerifItalic]    [\s!file:stixtwotext-italic.otf]    [\s!features=\s!default]
        \definefontsynonym[\s!SerifBoldItalic][\s!file:stixtwotext-bolditalic.otf][\s!features=\s!default]
    \stoptypescript

    \starttypescript[stixtwo]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [stixtwo] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!serif] [stixtwo] [\s!default]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [dejavu]  [\s!default] [\s!rscale=0.895]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [stixtwo] [\s!default]
    \stoptypescript

\stoptypescriptcollection